quant.ai
MCP server for US stock quant research that provides explainable ratings, support/stop levels, and reasoning for any ticker. It enables AI assistants to analyze and discuss stocks inline within the same chat.
README
quant.ai
Quant research for US stocks, built to live inside your AI assistant. Plug it into Claude or Codex via MCP and ask about any ticker — get explainable ratings, key levels, and the reasoning, then discuss it in the same chat. Also works as a one-command CLI.
quant.ai is a command-line quant-research toolkit for US equities, built for everyday investors. Type one command and get an explainable rating, key support/stop levels, and the reasoning behind them — all derived from historical prices, fully offline-friendly, and with no brokerage attached.
⚠️ Research only — not investment advice. It never places or suggests live orders. Output is English by default; add
--lang zh(or pick atquant-ai init) for Chinese (中文).
Quick start
pip install -e . # or: pip install -r requirements.txt
quant-ai doctor # environment self-check (deps + data connectivity)
quant-ai analyze AAPL # rate one stock in seconds
No entry point? python -m quant_agent analyze AAPL works the same.
What you get
<img src="assets/analyze-example.svg" alt="Real output of quant-ai analyze AAPL" width="820">
Real output from quant-ai analyze AAPL — English by default, --lang zh for Chinese. Ratings range from Strong Buy through Neutral to Strong Sell. Add --output-dir to export Markdown + JSON, or --chart for a PNG chart.
Use it inside Claude or Codex
The headline feature — expose quant.ai as an MCP server and let your AI assistant call it:
claude mcp add quant-research -- python -m quant_agent.mcp_server
Then just ask, in the same chat where you work:
"What's the read on NVDA?" · "Any long-term buy candidates today?" · "Compare AAPL and MSFT."
Claude (or Codex) calls into real project data, shows you the quant analysis, and you discuss it inline — no separate website, no copy-pasting. See README_CN.md for Claude Desktop / Codex config.
Highlights
- 🤖 Lives inside your AI assistant — the headline feature. Plug the built-in MCP server into Claude or Codex and ask "what's the read on NVDA?" It pulls real quant analysis from this project, so you see the analysis and discuss it in one conversation. Most stock-analysis tools are standalone websites — this one is embedded in the AI you already chat with.
- 🎯 Zero-config single-stock analysis —
analyze AAPLreturns rating, returns, RSI, volatility, MA positions, support/stop levels, and human-readable reasons. - 🧩 Personalized watchlist —
quant-ai initbuilds a universe that is 2/3 your own picks (companies + sectors you care about) and 1/3 discovered by the engine from the wider market. - 🔬 Research backtests — cross-sectional signals (12-1 momentum, 20/50 trend, 1-month reversal, low-vol), signal-weight search, walk-forward stability analysis, plus SPY and equal-weight baselines to separate alpha from beta.
- 📊 Local dashboard & daily market report — a no-key market-intelligence brief and an interactive Markets dashboard, served locally.
- 🛡️ Safe by design — deterministic signals + risk layer, friendly degradation on network/data errors, paper trading only — never submits real orders.
Daily market report & dashboard
quant-ai market-report builds a daily US-equity research brief — market overview, watch / high-risk lists, quant picks by holding horizon, and free news headlines — in an Anthropic-style design:
<img src="assets/market-report-example.png" alt="Daily market report" width="820">
quant-ai serve-dashboard (or write-dashboard) renders backtest diagnostics — headline metrics, alerts, period breakdown, risk checks, positions and trades — with a built-in EN / 中文 toggle:
<img src="assets/dashboard-example.png" alt="Local dashboard" width="820">
Common commands
| Command | What it does |
|---|---|
quant-ai analyze AAPL MSFT NVDA |
Rate one or more stocks |
quant-ai analyze --file watchlist.txt |
Rate symbols from a file |
quant-ai init |
Build a personalized watchlist (interactive) |
quant-ai analyze --watchlist |
Rate your personalized watchlist |
quant-ai run-backtest --config configs/default.yaml |
Run the research backtest |
quant-ai market-report |
Generate the daily market-intel report |
quant-ai serve-dashboard |
Start the local dashboard service |
quant-ai doctor |
Environment self-check |
How it works
- Data — daily OHLCV from Yahoo Finance (
yfinance) by default, or local CSV/Parquet. Cached and validated. - Signals — cross-sectional, point-in-time-lagged factors, z-scored per day.
- Portfolio & risk — deterministic target weights under position/turnover/liquidity limits.
- Evaluation — train / validation / test split, walk-forward windows, and benchmark-relative metrics (Sharpe, Sortino, Calmar, max drawdown, alpha/beta).
- AI (optional) — an LLM only reviews and narrates research; it never generates orders. Falls back to an offline template when no API key is set.
Documentation
- Full manual (Chinese): README_CN.md — detailed config, backtest/walk-forward, dashboard API, MCP integration, output files.
- Changelog: CHANGELOG.md · Contributing: CONTRIBUTING.md · Roadmap: roadmap.md
Tests
python -m pytest # 47 tests, network-free
python -m ruff check quant_agent tests conftest.py
Disclaimer
This project is for quantitative research and education only. It analyzes historical prices and produces research signals — not investment advice, and not authorization to trade. Markets carry risk; you are responsible for your own decisions.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。