riskprism
riskprism
将美国股票组合风险分解为其因子谱。
探索器: https://risk-prism-production.up.railway.app · Agent 模型卡: /model.md
一个开源的、Barra 风格的基础因子风险模型,旨在开箱即可供 AI 代理使用:一个 Python 库、一个 MCP 服务器,以及每周发布的模型产物,覆盖大多数流动性强的美国普通股。
7 个风格因子(规模、价值、动量、波动性、流动性、质量、杠杆)+ 12 个行业(Fama-French 方案)+ 一个市场因子
免费、可再分发数据链:来自 SEC EDGAR(公共领域)的基础数据和 SIC 代码,价格来自可插拔提供商
混合分发:预计算产物(暴露度、因子协方差、特定风险)按周发布,并且完整流水线开放,任何人都可以复现或扩展它们
免责声明:研究软件,按原样提供。此处内容不构成投资建议。
面向 AI 智能体(MCP)
{
"mcpServers": {
"riskprism": {
"command": "riskprism-mcp",
"env": { "RISKPRISM_ARTIFACTS": "/path/to/artifacts" }
}
}
}暴露的工具:get_model_info、get_portfolio_risk、get_factor_exposures、stress_test、check_coverage。权重为组合权重(空头为负);波动率为年化小数。
Related MCP server: Portfolio Rotation MCP Server
面向人类(Python)
from riskprism import RiskModel
model = RiskModel.load("artifacts")
report = model.portfolio_risk({"AAPL": 0.4, "MSFT": 0.3, "XOM": 0.3})
print(report["total_vol"], report["factor_var_contributions"])
model.stress_test({"AAPL": 1.0}, {"market": -0.10, "momentum": -0.05})自行构建模型
pip install -e ".[dev]"
export RISKPRISM_EDGAR_UA="your-project (you@example.com)" # SEC fair-access policy
riskprism-build --max-names 3000 --out artifacts # yahoo prices, no key needed
riskprism-build --prior artifacts_prev --out artifacts # append new weeks to a prior build
riskprism-build --provider tiingo ... # licensed data, needs TIINGO_API_KEY每周 GitHub Action 精确运行此流程并发布产物目录;参见 .github/workflows/build-model.yml。
探索器
一个零后端静态站点(托管在 Railway 上,由每次每周构建重新渲染),用于探索模型:累计因子收益、因子波动率和相关性、带压力测试滑块的客户端组合风险沙盒、每股股票的因子画像,以及可视化方法论讲解。所有数学计算都在浏览器中基于嵌入的产物运行。
智能体可在 /model.md(由 /llms.txt 索引)获得每次构建的纯 Markdown 镜像:模型卡、因子定义、相关性以及完整覆盖列表——无需 DOM 解析。
在本地渲染所有内容:
riskprism-site --artifacts artifacts --out site # index.html + model.md + llms.txt模型摘要
组件 | 选择 |
时间范围 | 中期(周收益,年化输出) |
估计 | 横截面 WLS(√市值权重),市值加权行业约束 |
因子协方差 | EWMA——波动率半衰期 13 周,相关性半衰期 26 周,PSD 修复 |
特定风险 | EWMA 残差波动率与按历史长度混合的结构(基于特征)先验 |
全域 | 估计:价格 ≥ $2,ADV ≥ $1M,26 周以上历史 · 覆盖:所有存活且 ≥ $1 的股票,先验填补空白 |
历史 | 前向捕获:每周构建追加到先前版本;退市股票被推算,幸存者偏差逐渐衰减 |
完整方法论见 docs/METHODOLOGY.md;设计决策及其理由见 docs/DECISIONS.md。
许可证
代码采用 MIT 许可证。发布的模型产物是从 SEC EDGAR(公共领域)和第三方价格提供商构建的派生数据——数据许可讨论见 docs/DECISIONS.md。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenancePortfolio risk analytics MCP server — VaR, Monte Carlo simulation, stress testing, portfolio optimization, options Greeks, and correlation analysis. Real market data via Yahoo Finance. Free tier available, Pro at $29/mo.101382MIT
- AlicenseAqualityDmaintenanceMCP server for portfolio rotation analysis. Score holdings and candidates across 5 dimensions, identify optimal swaps, validate with risk checks and backtests.11MIT
- AlicenseNot gradedqualityBmaintenanceA quantitative finance MCP server providing 24 tools for option pricing, portfolio optimization, risk measurement, fixed income analysis, and utility functions, enabling AI clients to perform professional financial calculations.MIT
- FlicenseAqualityBmaintenanceMCP server providing portfolio analytics tools: beta to a benchmark, sector correlation, and FIFO trade matching with realized/unrealized P&L using Yahoo Finance prices.3
Related MCP Connectors
Portfolio risk analytics — VaR, Monte Carlo, optimization, options Greeks, stress testing.
HPSILab Quant finance MCP for US stocks, ETFs, options, Monte Carlo, backtesting, and risk analysis.
7-factor stock scoring MCP server. US/HK/CN, 74 stocks. Free + Premium (USDC/Base). x402 ready.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wanxinwanxin/risk-prism'
If you have feedback or need assistance with the MCP directory API, please join our Discord server