Why this exists
LLMs hallucinate numbers. QuantContext enforces a strict boundary:- LLM layer:decides what to compute, selects parameters, explains results
- QuantContext layer:executes deterministic Python computation, returns structured JSON
- Data layer:yfinance (prices + fundamentals), Kenneth French (Fama-French factors)
The three tools
screen_stocks
Screen a stock universe by fundamental, momentum, value, quality, technical, or multi-factor criteria. Returns ranked candidates.
backtest_strategy
Test a strategy historically with a rebalance-loop engine. Returns equity curve, trade log, and performance metrics (CAGR, Sharpe, max drawdown).
factor_analysis
Decompose strategy returns into Fama-French factors (market, size, value, momentum). Returns alpha with t-statistic and factor loadings.
