quantlab.dataset.config.BaseDatasetConfig#
- class quantlab.dataset.config.BaseDatasetConfig(*, zarr_file_path, start_date=None, end_date=None, symbols=None, kwargs=None, resample_freq=None, resample_how=None, name=None)[source]#
Bases:
FrozenConfigFields every dataset shares, whatever it holds.
Both market panels and constituent (index membership) panels build on this class. Market-specific fields live on
DatasetConfig. The dates and symbols bound what the build path (from_raw_data,from_raw_data_chunked,update) converts from raw files; reading a range of the store ispanel(start, end, symbols), which does not use them.Examples
>>> cfg = BaseDatasetConfig( ... zarr_file_path="/data/us_equity/1d/stock.zarr", ... start_date="2020-01-01", ... end_date="2020-12-31", ... symbols=("AAPL", "MSFT"), ... ) >>> cfg.kwargs, cfg.name (None, None)
- end_date = None#
Last date to convert from raw files, inclusive.
Nonemeans no upper bound.
- kwargs = None#
Free-form options a specific dataset class may read (for example
data_typefor tick data).Noneis treated as empty.
- name = None#
Dotted import path of the dataset class; filled by the config setter and used to rebuild the dataset from its serialised config.
- resample_freq = None#
Bar size the panel is resampled onto when it is requested or saved;
Nonekeeps the store’s own bars. Set byresample().
- resample_how = None#
How each variable is aggregated into a resampled bar: one
ResampleMethodfor every variable, or a{variable: method}dict naming every variable. Required whenresample_freqis set.
- start_date = None#
First date to convert from raw files, inclusive.
Nonemeans no lower bound.
- symbols = None#
Convert only these symbols.
Nonemeans every symbol.
- zarr_file_path#
Path of the Zarr store the dataset reads from and writes to.