Skip to content

data_updater_v2.tables.prices

prices.py — the raw price tables: one daily and one intraday table per family.

Every table carries the one bar shape (data_clients/bars.py), as traded (unadjusted):

id the listing id (the universe row's: the ticker era the ┐ key
bar was fetched under) │
date the bar's start as a UTC instant (a daily bar: its day ┘
at 00:00) — intraday adds bar_interval to the key
symbol our symbol as fetched (the universe's: SPY, GSPC, BTC-USD, GC)
utc_date · utc_time that instant's UTC parts
est_date · est_time the same instant on the US/Eastern wall clock
open · high · low · close unadjusted prices
volume unadjusted: shares, contracts, the vendor's index number,
or DOLLARS for crypto; null where no trusted number exists
coin_volume crypto only: base-currency units

Keyed by the listing id, never the ticker: a ticker another security takes later is another id, so its rows never meet the old security’s (a rebuild of one never retires the other’s), and a rename’s new era lands under its own id beside the old one’s (the security, global_id, joins them in dbt). Rows are never rewritten to a new ticker.

A daily bar’s day is the venue’s: the ET session date for listings, the UTC day for crypto. Only finished days land (the day still trading is never stored). Adjusted series, total return and aligned panels are dbt’s, built from these and the corporate-action tables.

Families: equity, etf, index, crypto, commodity — ten tables, named {family}_daily_prices and {family}_intraday_prices. Market facts only: no provider, fetched_at or run columns; each coin comes from one source (Bitstamp where it lists the pair, else the composite), so the key needs none.

Classes

CommodityDailyPrice

Bases: _Bar, Base

CommodityIntradayPrice

Bases: _Bar, _Interval, Base

CryptoDailyPrice

Bases: _Bar, _Coins, Base

CryptoIntradayPrice

Bases: _Bar, _Interval, _Coins, Base

EquityDailyPrice

Bases: _Bar, Base

EquityIntradayPrice

Bases: _Bar, _Interval, Base

EtfDailyPrice

Bases: _Bar, Base

EtfIntradayPrice

Bases: _Bar, _Interval, Base

IndexDailyPrice

Bases: _Bar, Base

IndexIntradayPrice

Bases: _Bar, _Interval, Base