quantlab.acquisition.config.AcquisitionConfig#
- class quantlab.acquisition.config.AcquisitionConfig(market, frequency, vendor, raw_data_dir_path, watermark_path, symbols, start_date=None, end_date=None, kwargs=None, name=None)[source]#
Bases:
objectConfig of a raw-data download for one market, frequency and vendor.
Examples
>>> cfg = AcquisitionConfig( ... market="us_equity", ... frequency="1d", ... vendor="tiingo", ... raw_data_dir_path="/data/downloads/us_equity/1d/tiingo", ... watermark_path="/data/downloads/us_equity/1d/_watermarks/tiingo", ... symbols=("AAPL", "MSFT"), ... start_date="2020-01-01", ... kwargs={"max_workers": 4}, ... ) >>> cfg.symbols ('AAPL', 'MSFT')
- end_date = None#
Last date to fetch, inclusive.
Nonemeans the latest available.
- frequency#
The acquisition frequency (daily, minute or tick).
- kwargs = None#
Vendor-specific options (batch sizes, feeds,
data_type).Noneis treated as empty.
- market#
The market being downloaded.
- name = None#
Dotted import path of the acquisition class; filled by the config setter.
- raw_data_dir_path#
Root of the raw tree the shards are written into.
- start_date = None#
First date to fetch, inclusive.
Nonemeans the vendor’s earliest.
- symbols#
The symbols to download.
- to_dict()[source]#
Return the config as a plain dict via
dataclasses.asdict.Examples
>>> cfg.to_dict()["kwargs"] {'max_workers': 4}
- vendor#
The vendor the data is fetched from.
- watermark_path#
Directory holding the per-symbol watermarks that let an interrupted download resume.