Give your trading agent
a quant brain.
QuantContext is an MCP server that gives AI agents real quant computation: stock screening, strategy backtesting, and Fama-French factor analysis. Every number is computed from real market data, using proven models.
Works with Claude, Codex, OpenCode, and any MCP-compatible agent.
claude mcp add quantcontext -- quantcontextor: pip install quantcontext-mcp
> Screen S&P 500 for value stocks with positive momentum
Found 23 matches. Top 5:
| TICKER | PE | MOM_6M | SCORE |
| GILD | 12.3 | +18.4% | 0.84 |
| VZ | 8.7 | +12.1% | 0.71 |
| MO | 9.1 | +9.8% | 0.68 |
Why this exists
Built for systems that trade real money.
Data providers give agents eyes. Brokers give them hands. QuantContext gives them a brain.
Agents hallucinate numbers
Ask an LLM for a Sharpe ratio. Confident guess. Ask again, different number. QuantContext computes from real data. Same input, same output.
Agents can't verify themselves
AI agents skip steps, fabricate results, and report numbers they never computed. Trading agents need external, deterministic verification.
No API keys required
Public data only: Yahoo Finance and the Kenneth French Data Library. No account, no quotas, no billing.
The tools
Three tools today. More shipping soon.
Every number computed from real market data. Click a tool to see example I/O.
See it in action
Describe a strategy. Get real analysis.
One prompt. The agent confirms the exact parameters it will use, runs the backtest, and breaks down the returns.
> Backtest a top-20% momentum strategy on Nasdaq 100, monthly rebalance, last 2 years
Strategy: Buy the top 20% of Nasdaq 100 stocks by 200-day price momentum, rebalanced monthly. Starting with $100,000.
universe: nasdaq100
screen: momentum_screen
lookback: 200 days, top 20%
rebalance: monthly
period: 2023-03-07 to 2025-03-07
sizing: equal_weight
capital: $100,000
Backtest Results — 2 years, 24 rebalances
CAGR
+34.2%
Sharpe
1.42
Max Drawdown
-8.7%
Win Rate
61%
Factor Analysis — Fama-French 4-Factor
Annualized Alpha
+4.7%t=1.87 (not significant)
R-squared
0.78
| Factor | Loading | t-stat | Note |
| Mkt-RF | 1.21 | 14.3 | Market beta |
| SMB | 0.08 | 0.71 | No size tilt |
| HML | -0.31 | -3.12 | Growth-leaning |
| Mom | 0.89 | 9.45 | Strong momentum |
Bottom line: The 34% return is real, but mostly systematic exposure to market and momentum factors. Alpha of 4.7% is not statistically significant (|t| < 2). The strategy earns the momentum premium, not idiosyncratic edge.
Every number above was computed from historical market data.
See full example in docsTry these prompts
From question to conviction.
Screen, backtest, decompose. Copy any prompt below into your agent.
“Find S&P 500 stocks with PE < 15, positive momentum”
23 matches · Top: GILD (PE 12.3, Mom +18.4%)
“Equal-weight top 5, monthly rebalance, 2 years”
Return +34.2% · Sharpe 1.42 · Max DD −8.7%
“Where is the alpha coming from?”
Alpha 4.7% (t=1.87) · HML 0.49 · R² 0.78
Every number above was computed from historical market data.
Start in 30 seconds.
Install the package and connect it to your AI agent. No API keys, no configuration, no account required. Works with any MCP-compatible client.
claude mcp add quantcontext -- quantcontextpip install quantcontext-mcpSkip the build. Start trading.
Your quant agent team, running 24/7. Strategies out of the box, portfolio monitoring, market screening. QuantContext computation built in. We're building a hosted version so you don't have to.