quantlab.dataset.sharadar.point_in_time.ReleaseSpec#

class quantlab.dataset.sharadar.point_in_time.ReleaseSpec(variables=<factory>, dates=(), stamp='release_date', stale_after_days=None)[source]#

Bases: object

What a release panel shows: its variables and the column its staleness is measured from.

Parameters:
variablesMapping[str, Mapping]

Each variable of the panel and its attributes, in panel order.

datestuple of str, default ()

The datetime variables among them: a store widened by a new symbol fills its stored days with NaT (ReleasePanelDataset).

stampstr or None, default "release_date"

The column holding the release date of the row a cell shows: the cell is stale once stale_after_days have passed since it, and a cell where it is null shows nothing. None for a panel without staleness.

stale_after_daysint or None, default None

Days after its release date a row no newer row has replaced stops being shown; None never.

Examples

>>> ReleaseSpec(variables={"revenue": {"unit": "currency"}}, stale_after_days=365).stamp
'release_date'