Market Data Processing Service#
Market Data Service for loading and concatenating per-ticker price data.
Orchestrates the loading of individual ticker files from a directory, extracts the configured price column, and concatenates them into a single PyArrow table with dates as the first column and one column per ticker.
- class MarketDataService[source]#
Bases:
objectLoads per-ticker files, extracts the price column, and concatenates into a single PyArrow table with columns [date, TICKER1, TICKER2, …].
- load_and_concat_prices(input_handlers: list[InputHandlerInterface], tickers: set[str], configuration: Configuration) Table[source]#
Load each ticker’s price series and concatenate into one table.
Each ticker is loaded via the first input_handlers entry able to provide it, then the resulting per-ticker tables are aligned on their union of dates and merged into a single wide table.
- Parameters:
input_handlers (list[InputHandlerInterface]) – Input handlers to try, in order, for loading each ticker.
tickers (set[str]) – Ticker symbols to load.
configuration (Configuration) – Run configuration, used to resolve the user’s date/price column names and data source settings.
- Returns:
Table with a
datecolumn followed by one price column per ticker in tickers, sorted alphabetically.- Return type:
pa.Table
- Raises:
DataLoadingError – If any ticker fails to load, or if no ticker data was loaded.