SPY / SPX system overview
This is the system design index for the running box. It exists so the
code on main and Brad’s mental model stay the same document.
One file per section — pick a page from the index on the left or the cards below. High-level first; formula pages are stub anchors only — no derivations here. No pandas lecture, no secrets, no API keys.
The whole system on one slide
Warehouse → math at a glance
clean/ under DATA_ROOT (default /data/massive)
marketdata.catalog.read_asof — last file ≤ instant, per underlying
Own invert of last/close — European BSM or American CRR. Never NaN; never vendor σ
SPX/SPXW analytic BSM; SPY American CRR (ATM slice on cron)
pricing.drift_check — ATM identities first; vendor diffs optional
python -m pricing.from_market → python -m pricing.drift_check
Sections
Four packages — ingest, marketdata, pricing, signals — plus tests, deploy, scripts.
What lands where; irreplaceable vs backfillable; write-only datasets.
Sources, vendor constraints, every job, the NY schedule (timers + crontab fallback), session timeline, entitlements.
Typed parquet reads, OPRA allowlist (SPY/SPX/SPXW/VIX/VIXW), as-of semantics, fail-loud validate.
Engines (European BSM / American CRR), both IV inverters, ATM curve, raw-SVI surface.
The from_market chain end to end: as-of load → own IV → own Greeks.
drift_check at 17:00 ET — identity-first pass/fail, and what a FAIL means.
Which Healthcheck fired, whether repair.sh can help, early close, disk/prune.
Vega, theta, F, T, r — this repo’s units vs the usual vendor traps.
ClickHouse, VVIX, trading-day theta, SPY/VIX smiles — deliberately absent. SVI surface and the rates warehouse have shipped.
The end-to-end loop this system is aiming at — execution, ledger, and portfolio risk included. A proposal, not the box.
In the tree, deliberately unfixed — the desk index of IMPROVEMENTS.md.
Anchors into pricing/; derivations live in code, not here.
Every .env variable and code-level setting that changes behavior.
Secrets, installed crontab, self-hosted runner, Healthchecks, IBKR Flex — machine state the repo cannot declare.