quantlab.dataset.sharadar.stores.build_stores#

quantlab.dataset.sharadar.stores.build_stores(download_dir, data_dir, *, start=None, stores=None)[source]#

Build or extend the stores from the raw tier, each beside a README.md and a component.json.

Each store is built with update(), so it keeps the chunk ledger update_stores reads; a store that already exists is extended, not rebuilt. Every store’s folder gets its component.json, and a README.md when it has none.

Parameters:
download_dirstr or Path

The download root holding the raw tier (sharadar/).

data_dirstr or Path

The data root the stores go under.

startstr or None, default None

The first day the stores hold, YYYY-MM-DD; None is the whole history of the raw tier.

storesiterable of str or None, default None

The names of the stores to build; every store when omitted.

Returns:
StoreUpdate

Each store built (BUILT) or extended (UPDATED), with its conversion result.

Raises:
Exception

Whatever a store’s build raises; the stores after it are not built.

Examples

Needs the raw tier of a first download:

outcome = build_stores("/data/quantlab/downloads", "/data/quantlab", start="2010-01-01")
print("\n".join(outcome.lines()))