quantlab.dataset.sharadar.fiscal_years#

Point-in-time history of each company’s latest fiscal years (SF1 ARY), keyed by permaticker.

SF1’s ARY dimension holds one row per company, fiscal year and filing, each dated at its SEC filing date (its release date); a restatement of a year is a new row with a later date, never a rewrite. The quarterly fundamentals panel (quantlab.dataset.sharadar.fundamentals) shows only the latest period’s row, so it cannot say what a company earned three years ago as known today. SharadarFiscalYearsDataset shows that history: on every trading day, per security, it holds the latest years fiscal years whose rows are available by that day, newest first, as <indicator>_fy0 (the latest fiscal year) .. <indicator>_fy<years - 1>.

A row is placed at its available date, the first SEP trading day on or after its release date, the same rule as the fundamentals panel. So:

  • a fiscal year appears from its own release date, never earlier, and its arrival shifts the older years one slot back;

  • each slot shows its fiscal year’s latest filing available by that day, so a restatement of any year, the newest or an older one, is shown from its own release date;

  • a slot whose year is not yet known (fewer than years are released) is NaN, and its reportperiod_fy<k> is NaT;

  • a security shows nothing once the row shown in fy0 (the newest fiscal year’s latest filing) was released more than stale_after_days ago.

A fiscal year is identified by its reportperiod: a company that moves its fiscal year end has two slots a few months apart.

The calendar is SEP’s trading days and the symbol axis the int64 permaticker, as for the other Sharadar panels. Besides the indicator variables (float64, unit from INDICATORS), reportperiod_fy<k> holds each slot’s fiscal year end and release_date the filing date of the row shown in fy0. The store grows with update(): new trading days are appended and a stored day is never rewritten.

Examples#

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

config = SharadarFiscalYearsConfig(
    zarr_file_path="/data/quantlab/market/sharadar/sharadar_sf1_fiscal_years/sharadar_sf1_fiscal_years.zarr",
    raw_data_dir_path="/data/quantlab/downloads/sharadar",
)
SharadarFiscalYearsDataset(config).update()
panel = SharadarFiscalYearsDataset(config).panel("2024-01-02", "2024-03-28")
panel["eps_fy0"].attrs["unit"]  # 'USD/share'

Classes

SharadarFiscalYearsDataset

Daily point-in-time panel of each company's latest fiscal years, keyed by permaticker.

Functions

slot_name

Return the variable name of name in fiscal-year slot slot.