UtilsData: UtilsData Class

UtilsDataR Documentation

UtilsData Class

Description

Various help data.

Super class

findata::DataAbstract -> UtilsData

Methods

Public methods


Method new()

Create a new UtilsData object.

Usage
UtilsData$new(azure_storage_endpoint = NULL, context_with_config = NULL)
Arguments
azure_storage_endpoint

Azure storate endpont

context_with_config

AWS S3 Tiledb config

Returns

A new 'UtilsData' object.


Method get_ticker_data()

Get tick data from finam source using QuantTools.

Usage
UtilsData$get_ticker_data(symbol)
Arguments
symbol

Equity symbol

Returns

Get investing com ea data.


Method get_split_factor()

Get split data from the web and calculate split factors.

Usage
UtilsData$get_split_factor(ticker)
Arguments
ticker

Stock ticker

Returns

Stock splits


Method adjust_fm_tiledb()

Adjusted instraday data for splits and dividends

Usage
UtilsData$adjust_fm_tiledb(
  save_uri = "D:/equity-usa-minute-fmpcloud-adjusted",
  minute_uri = "D:/equity-usa-minute-fmpcloud"
)
Arguments
save_uri

TileDB uri for saving

minute_uri

TileDB uri with unadjusted minute data.

Returns

Adjusted data saved to AWS S3 bucket


Method sp500_history()

Get SP500 stocks for every date.

Usage
UtilsData$sp500_history(qc_spy_path)
Arguments
qc_spy_path

to spy constitues

Returns

Data table of Sp500 tickers


Method get_market_data()

Help function to import clean data from Azureblob.

Usage
UtilsData$get_market_data(symbols = c("aapl", "aal"), frequency = "hour")
Arguments
symbols

Symbols

frequency

Frequency can be hour and minute.

Returns

Data table with market prices


Method adjust_market_data()

adjust market data for splits and/or dividends

Usage
UtilsData$adjust_market_data(
  market_data,
  factor_files,
  type = c("all", "dividends", "splits"),
  cols_adjust = c("o", "h", "l", "c")
)
Arguments
market_data

Market data of OHLCV type.

factor_files

Factor files must contain columns: - symbol - date - price_factor - split_factor

type

Type of adjustment.

cols_adjust

Columns to adjust.

Returns

Data table with adjusted market prices.


Method get_map_files_tiledb()

Help function to get map files.

Usage
UtilsData$get_map_files_tiledb(
  save_uri = "s3://equity-usa-mapfiles",
  symbol_uri = "https://en.wikipedia.org/wiki/S%26P_100"
)
Arguments
save_uri

TileDB uri.

symbol_uri

TileDB uri for saved files

Returns

Maped files.


Method get_map_files_qc()

Get map files from Quantconnect map_files folder

Usage
UtilsData$get_map_files_qc(symbols, path_map_files)
Arguments
symbols

Symbols

path_map_files

Path to map_files directory

Returns

Data table with mapped symbols.


Method get_factor_files_qc()

Get factor files from Quantconnect factor_files folder

Usage
UtilsData$get_factor_files_qc(symbols, path_factor_files)
Arguments
symbols

Symbols

path_factor_files

Path to factor_files directory

Returns

Data table with factor files data for symbol.


Method adjust_fmp()

Adjust FMP market data

Usage
UtilsData$adjust_fmp(
  file_path,
  file_path_save,
  path_map_files,
  path_factor_files,
  trading_hours = TRUE,
  parallel = FALSE
)
Arguments
file_path

File path to parquet file that contains market data.

file_path_save

Path to which save the data.

path_map_files

Path to map files directory

path_factor_files

Path to factor files directory

trading_hours

Should we keep only trading hours in output DT.

parallel

should we use parallle package. If yes set plan.

Returns

Data table adjusted market data.


Method sync()

NAS sync

Usage
UtilsData$sync(local_dir, nas_dir, direction = "upload")
Arguments
local_dir

File path to parquet file that contains market data.

nas_dir

Path to which save the data.

direction

downlaod or upload.

Returns

Nothin to return


Method fundamnetals_agg()

Merged Fundamental data

Usage
UtilsData$fundamnetals_agg(
  balance_sheet,
  income_statement,
  cash_flow,
  financial_growth,
  financial_metrics,
  financial_ratios
)
Arguments
balance_sheet

file to balance sheet csv's.

income_statement

file to income statement csv's.

cash_flow

file to cash flow csv's.

financial_growth

file to financial growth csv's.

financial_metrics

file to financial metrics csv's.

financial_ratios

file to financial ratios csv's.

Returns

Nothin to return


Method clone()

The objects of this class are cloneable with this method.

Usage
UtilsData$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


MislavSag/findata documentation built on June 2, 2025, 12:34 p.m.