You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Produce a daily, date-partitioned Silver-layer Parquet snapshot of the full options chains for a fixed universe of liquid equity-index and metals ETFs. The snapshot feeds two downstream consumers:
SilverSQLTool (Scripts/retrieval/sql_tools.py) — queried at agent runtime via DuckDB for IV skew, put/call ratio, liquidity analysis, and options pricing spread.
MasterRetriever always-on GPR patch (Scripts/retrieval/master_retriever.py) — colocated ingestion ensures the IV-regime classifier always has a same-day anchor.
importduckdbcon=duckdb.connect()
df=con.execute(""" SELECT snapshot_date, symbol, COUNT(*) as contracts, AVG(implied_volatility) as avg_iv FROM read_parquet('Data/2_Silver_Processed/Options_Market_Data/*/*.parquet') WHERE is_liquid = true AND dte BETWEEN 7 AND 45 GROUP BY 1, 2 ORDER BY 1 DESC, 2""").df()
print(df)
End-to-end retrieval test
python -m Scripts.tests.test_master_retriever
# Test case: "What is the current IV skew for SPY?"
6. Dependencies
Library
Purpose
yfinance
Options chain API
pandas
Vectorised enrichment
numpy
Numerical operations
pyarrow
Parquet serialisation
pip install yfinance pandas numpy pyarrow
Runtime prerequisite:collect_data_state.json must have a valid options_daily key so SilverSQLTool._get_anchor_date("options") returns a current business day.