Token导航 LogoToken导航TokenDH.com
Quant Companion MCP logo
金融服务未说明官方级别未说明来源级核验

Quant Companion MCP

MCP Server

一个为AI助手提供实时期权分析和交易策略能力的模型上下文协议(MCP)服务器。

工具数

17

提示词数

0

GitHub Stars

1

资源数

0
TypeScriptClaude金融数据Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Ademscodeisnotsobad

提供方

Ademscodeisnotsobad

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

量化伴侣MCP

模型上下文协议(MCP)服务器,为AI助手提供实时期权分析和交易策略功能。

为什么使用这个

  • 不再在谷歌上搜索期权价格 --只需问“AAPL 200通话值多少钱?”
  • 即时希腊人 --实时计算delta、gamma、theta、vega
  • 用简明英语进行回溯测试 --“对SPY过去5年的动量策略进行回溯测试”
  • 波动性分析 --比较隐含与历史、现货定价过高的期权
  • 蒙特卡罗模拟 --“到3月份,NVDA达到150美元的可能性有多大?”
  • 无需编码 --和克劳德谈谈,就像你和量化分析师一样

人工智能无法产生数字幻觉。每一个价格、每一个希腊、每一次模拟都来自实际的市场数据和确定性数学。

______________________________________________________________________

示例提示

期权分析

"What's the implied volatility on TSLA options right now vs its 30-day historical vol?"

"Price a 6-month AAPL 200 call with current market conditions"

"Show me the volatility smile for SPY options expiring next month"

"Is there any unusual options activity on NVDA today?"

概率与模拟

"What's the probability NVDA ends above $140 in 3 months?"

"Run a Monte Carlo simulation on AAPL for the next 6 months"

"Compare price forecasts using GBM vs local vol vs SABR models for META"

策略与回溯测试

"Backtest a 20/50 moving average crossover strategy on SPY from 2020 to now"

"Run the momentum_plus strategy on QQQ and show me the trades"

"Compare momentum_plus_multi against buy-and-hold SPY over 10 years"

"What would my returns be if I ran a dual momentum strategy on these ETFs?"

风险分析

"Calculate Sharpe ratio, max drawdown, and VaR for this portfolio"

"How much would I have lost in the 2022 bear market with this strategy?"

"What's the worst-case scenario for holding TSLA calls through earnings?"

快速查找

"What's AAPL trading at right now?"

"Get me SPY price history for the last 2 years"

"Show me all available option expirations for GOOGL"

______________________________________________________________________

快速入门(5分钟)

先决条件

  • 已安装Node.js 18+
  • Claude桌面应用程序

步骤1:克隆和构建

git clone https://github.com/yourusername/quant-companion-mcp.git
cd quant-companion-mcp
npm install
npm run build

步骤2:查找您的Claude配置文件

窗户:

%APPDATA%\Claude\claude_desktop_config.json

通常: C:\Users\YourName\AppData\Roaming\Claude\claude_desktop_config.json

macOS:

~/Library/Application Support/Claude/claude_desktop_config.json

Linux:

~/.config/Claude/claude_desktop_config.json

如果文件不存在,请创建它。

步骤3:添加MCP服务器

打开配置文件并添加以下内容(将路径替换为实际路径):

{
  "mcpServers": {
    "quant-companion": {
      "command": "node",
      "args": ["C:/full/path/to/quant-companion-mcp/packages/mcp-tools/dist/index.js"],
      "env": {
        "POLYGON_API_KEY": ""
      }
    }
  }
}

重要提示: 使用完整的绝对路径。在Windows上使用正斜杠或转义反斜杠。

步骤4:重新启动克劳德桌面

完全退出Claude Desktop(不仅仅是关闭窗口)并重新打开它。

步骤5:验证它是否有效

打开新聊天并询问:

What's AAPL trading at right now?

如果你看到一个真实的价格,你很好。如果Claude表示无法访问市场数据,请检查配置中的路径。

______________________________________________________________________

可选:使用Polygon.io获得更好的数据

雅虎财经在大多数用例中运行良好,但在期权链上存在费率限制。对于较重的使用:

  1. 在获取免费API密钥https://polygon.io
  2. 将其添加到您的配置中:
{
  "mcpServers": {
    "quant-companion": {
      "command": "node",
      "args": ["C:/path/to/packages/mcp-tools/dist/index.js"],
      "env": {
        "POLYGON_API_KEY": "your_key_here"
      }
    }
  }
}

如果Polygon速率限制,系统会自动回退到雅虎。

______________________________________________________________________

你能做什么

市场数据

  • get_current_price:实时股票/ETF价格
  • get_historical_prices:任何日期范围的OHLCV数据
  • get_options_chain:包含罢工和到期的完整期权链

期权定价

  • price_option_black_choles:所有希腊人的欧洲期权定价
  • price_option_monte_carlo:带置信区间的MC定价
  • compute_implied_vol:从观测价格中退出IV

波动性分析

  • compute_historical_vol:基于价格历史的已实现波动率
  • get_vol_smile:IV曲线跨罢工(单次到期)
  • get_vol_surface:全IV表面(走向×成熟度)
  • summarize_vol_regime:高压与高压的比较及解释

模拟与预测

  • simulate_price:基于概率分析的GBM价格模拟
  • simulate_price_with_local_vol:使用体积曲面进行倾斜调整的模拟
  • compare_models_predictures_distribution:比较GBM、Local Vol、SABR、Heston
  • backtest_forecast_accuracy:预测模型的历史准确性

风险与策略

  • compute_risk_metrics:Sharpe、Sortino、最大回撤、VaR
  • run_backtest:策略回溯测试(MA交叉、动量、均值回归、双动量)
  • detect_unusual_activity:选项流分析(卷峰值、扫描)

______________________________________________________________________

建筑

Claude / AI Assistant
        |
        | MCP Protocol (stdio)
        v
    mcp-tools
        - 18 MCP tool definitions
        - Market data providers (Yahoo Finance, Polygon.io)
        - Input validation (Zod schemas)
        |
        | Function calls
        v
    quant-core
        - Black-Scholes pricing & Greeks
        - Monte Carlo simulations
        - Implied volatility solver (Newton-Raphson)
        - Vol smile & surface computation
        - Risk metrics (Sharpe, Sortino, VaR, max drawdown)
        - Strategy backtesting framework
        - SABR & Heston stochastic vol models
        
        Pure functions. No side effects. No network calls.

______________________________________________________________________

项目结构

packages/
  quant-core/           # Pure TypeScript math library
    blackScholes.ts     # BS pricing & Greeks
    monteCarlo.ts       # MC simulations
    impliedVol.ts       # Newton-Raphson IV solver
    volatility.ts       # Historical vol calculations
    volSmile.ts         # Smile curve computation
    volSurface.ts       # Surface interpolation
    risk.ts             # Sharpe, Sortino, VaR, drawdown
    backtest.ts         # Simple backtesting (MCP tools)
    sabr.ts             # SABR model calibration
    heston.ts           # Heston stochastic vol
    strategy/           # Advanced strategy framework

  mcp-tools/            # MCP server
    index.ts            # Server entry point (stdio transport)
    marketData.ts       # Yahoo/Polygon data providers
    tools/              # 18 MCP tool definitions

______________________________________________________________________

发展

# Run tests
npm test

# Build all packages
npm run build

# Dev mode (auto-rebuild)
npm run dev

______________________________________________________________________

故障排除

克劳德说它无法访问这些工具

  • 确保配置中的路径是绝对正确的
  • 检查你是否跑过 npm run build
  • 完全重新启动Claude Desktop(退出,而不仅仅是关闭)

获取速率受限

  • 添加多边形API键以获得更好的限制
  • 间隔快速射击选项链请求

数字看起来不对

  • 检查市场是否开放(盘后价格可能会过时)
  • 免费套餐的选项数据最多可延迟15分钟

赫斯顿/SBR速度慢

  • 第一次校准需要2-3秒,后续通话更快
  • 对于随机体积模型来说,这是意料之中的

______________________________________________________________________

已知问题

  • 雅虎财经积极限制期权链看涨期权的利率,多边形回退有助于
  • 赫斯顿校准在第一次运行时可能很慢(约2-3秒)
  • Vol曲面插值在远距离OTM撞击时变得奇怪

______________________________________________________________________

许可证

麻省理工学院

目录标签

目录标签

TypeScriptClaude金融数据期权分析本地部署量化交易实时数据风险分析蒙特卡洛模拟

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

17

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP