quantlab.dataset.sharadar.fundamentals#

Point-in-time panel of Sharadar fundamentals (SF1), keyed by permaticker.

SF1 holds one row per company, dimension and filing. Only the as-reported dimensions are point-in-time: ARQ (each fiscal quarter) and ART (trailing twelve months). Their date is the SEC filing date, the row’s release date, and a later filing that restates a period is a new row rather than a rewrite of the old one. The most-recent dimensions (MRQ, MRY, MRT) are dated at the period end and rewritten on restatement, so they would leak a value one to three months early; they stay in the raw tier and never enter a store.

SharadarFundamentalsDataset places each row of one as-reported dimension at its available date, the first SEP trading day on or after its release date, and is point-in-time (as the Compustat panel of ADR 0003 is): on every trading day it shows, per security, the row with the latest fiscal period among the rows available by that day, and within that period the latest filing. So:

  • a restatement of a period is shown from its own release date, never earlier;

  • a later filing of an older period never replaces a newer period’s row;

  • a row no newer row has replaced stops being shown stale_after_days after its release date (365 by default, as for Compustat).

The panel’s calendar is SEP’s trading days, so it lines up with the price panels bar for bar, and its symbol axis is the int64 permaticker, as theirs is. Each of SF1’s 105 indicators is a float64 variable whose unit attribute is the vendor’s unit type from INDICATORS (currency is the reporting currency, USD, ratio, units, per share); release_date and reportperiod (the fiscal period end) say which row is shown. The store grows with update(): new trading days are appended and a stored day is never rewritten, so a value the vendor changes later (SF1 rows are refreshed by lastupdated, SharadarClient.updated_table) reaches only the days after the update.

Examples#

Build the quarterly store from a downloaded raw tier and read a quarter:

config = SharadarFundamentalsConfig(
    zarr_file_path="/data/quantlab/market/sharadar/sharadar_sf1_arq/sharadar_sf1_arq.zarr",
    raw_data_dir_path="/data/quantlab/downloads/sharadar",
)
SharadarFundamentalsDataset(config).update()
panel = SharadarFundamentalsDataset(config).panel("2024-01-02", "2024-03-28")
panel["revenue"].attrs["unit"]  # 'currency'

SF1 also holds DAILY’s valuation indicators, as of each filing. Merged with the DAILY panel (MergedDataset), they are renamed sf1_marketcap, sf1_ev, sf1_pe and so on (COLUMN_MAP), so marketcap is DAILY’s daily value.

Classes

SharadarFundamentalsDataset

Daily point-in-time panel of one as-reported SF1 dimension, keyed by permaticker.