The LLM Boundary
QuantContext enforces a strict boundary between what LLMs do and what code does:Why Determinism Matters for Trading
LLMs hallucinate numbers. QuantContext ensures every number returned to an agent is:- Computed from actual market data:not generated, estimated, or hallucinated
- Deterministic:same inputs produce identical outputs, always
- Auditable:the computation path is pure Python with no randomness
How the Tools Work
screen_stocks
screen_stocks
SKILL_REGISTRY. Each skill receives a pandas DataFrame and returns a filtered/ranked DataFrame. Stages execute sequentially.backtest_strategy
backtest_strategy
factor_analysis
factor_analysis
Data Sources and Caching
First call: Downloads market data (~10s for S&P 500). Subsequent calls use the cache.
Performance: Screening under 1s, backtesting 3–8s.
Total disk usage: ~50MB for full S&P 500 coverage.
