quantlab.dataset.config.MergedDatasetConfig#

class quantlab.dataset.config.MergedDatasetConfig(*, datasets, name=None)[source]#

Bases: FrozenConfig

Config of a merged dataset: the datasets it merges, in order.

A merged dataset holds no store of its own, so this config has no path, dates or symbols; each input keeps its own config. datasets is a component field, so to_dict() nests each input’s config dict under it and MergedDataset.from_config rebuilds them.

Examples

With index and etf two datasets built earlier:

>>> cfg = MergedDatasetConfig(datasets=[index, etf])
>>> len(cfg.datasets)
2
>>> [d["zarr_file_path"] for d in cfg.to_dict()["datasets"]]
['/data/us_equity/1d/sp500.zarr', '/data/us_equity/1d/spy.zarr']
datasets#

The datasets merged, in order. A list is stored as a tuple.

name = None#

Dotted import path of the dataset class; filled by the config setter.