quantlab.config.stock_kline_config#

quantlab.config.stock_kline_config(start_date=None, end_date=None, symbols=None, kwargs=None, market='us_equity', frequency='1d', subdir='nasdaq_data', store_name='stock.zarr', vendor='tiingo')[source]#

Build the DatasetConfig for daily US-equity bars.

Raw parquet is read from downloads/{market}/{frequency}/{subdir}/{vendor} and the panel is stored at data/{market}/{frequency}/{store_name}. subdir and store_name let a second roster (for example a full-market backfill) live beside the NASDAQ-only one instead of overwriting it. The raw path ends at the vendor segment on purpose: StockDataset checks that the directory basename equals vendor before scanning, which rules out an accidental scan one level up that would merge two vendors’ shards.

Parameters:
start_datestr | None, default None

First date to load, ISO format; None means unbounded.

end_datestr | None, default None

Last date to load, inclusive; None means unbounded.

symbolstuple[str, …] | None, default None

Symbols to keep; None leaves the selection to the dataset.

kwargsdict | None, default None

Extra dataset options.

marketMarket, default “us_equity”

Market label used in the storage paths.

frequencyFrequency, default “1d”

Bar frequency used in the storage paths.

subdirstr, default “nasdaq_data”

Raw-data subdirectory beneath the market/frequency root.

store_namestr, default “stock.zarr”

Zarr store filename.

vendorVendor, default “tiingo”

Vendor whose shards the raw directory holds, also recorded on the config. Defaults to "tiingo", which is what existing callers have on disk.

Examples

With the storage root set to /mnt/quant:

>>> cfg = stock_kline_config(start_date="2020-01-01", symbols=("AAPL",))
>>> cfg.raw_data_dir_path
'/mnt/quant/downloads/us_equity/1d/nasdaq_data/tiingo'
>>> cfg.zarr_file_path
'/mnt/quant/data/us_equity/1d/stock.zarr'
>>> stock_kline_config(subdir="us_all", store_name="us_all.zarr").zarr_file_path
'/mnt/quant/data/us_equity/1d/us_all.zarr'