RiskModels
Use this read-only MCP server to query US equity risk, returns, hedging, and portfolio analytics.
Single-stock risk: get latest risk snapshot, decompose risk by market/sector/subsector/residual, compute ETF hedge ratios and dollar hedges.
Multi-stock comparison: compare 2–100 tickers on risk layers.
Returns & attribution: fetch daily dividend-adjusted total returns, split returns into factor and residual components, get residual returns and recommended hedge depth.
Signals: compute basket residual mean-reversion signals.
Macro & factors: get macro factor correlations and macro/sector ETF factor returns.
Fundamentals: retrieve point-in-time quarterly fundamentals, valuation betas, cost of debt, WACC, economic profit.
Portfolio analytics: analyze long-only portfolios (hedge levels, ETF hedges), get full portfolio risk snapshots, long/short exposure and neutralizing trades, and selection-vs-drift attribution.
Brokerage: read linked brokerage positions.
Rankings & screening: get single-stock percentile ranks, screen ranked universe, cohort statistics, and peer groups.
Search & reference: resolve tickers/ETFs/funds/13F filers, get fund/filer/ETF profiles, and benchmark fit.
Pricing: pay-as-you-go per call (most $0.005–$0.25; portfolio risk snapshot $1.25; some free).
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
RiskModels provides clean dividend-adjusted total returns, factor risk decomposition, return attribution, and ETF-executable hedge ratios for US equities — over REST, a typed SDK, and a built-in MCP server. The dataset is simulation-grade: it covers on the order of 16,000 US stocks across the full historical panel, while at each month end the model’s headline universe is the largest ~3,000 by market cap—the set the API surfaces for everyday returns, risk, and hedging.
Post-regression outputs (hedge ratios, explained-risk decompositions, and related L1–L3 series) are served from the first date whose full estimation window is covered: hedge ratios from 2010-12-08, explained-risk shares and stock variance from 2011-12-07, L* residual levels from 2013-01-01. Split- and dividend-adjusted returns (the inputs to the rolling regressions) begin 2006-01-04. The API is AI-agent ready, including a built-in Model Context Protocol (MCP) server for seamless integration with LLMs.
RiskModels API Developer Portal
This repository is the authoritative public API reference for the RiskModels equity risk model API, featuring:
📖 Model methodology — ERM3 overview (canonical; also mirrored on riskmodels.net)
📚 Comprehensive API Documentation — OpenAPI 3.0.3 specification, guides, and examples
🌐 Developer Portal — Beautiful Next.js site (this repo) deployed at riskmodels.app
🐍 Python & TypeScript Examples — Production-ready code in
examples/🤖 AI Agent Integration — MCP server, OAuth2, and agent manifest
Use in Cursor (Agent Plugin)
This repository is an Agent Plugins package: plugin.json and mcp.json at the repository root. The plugin connects Cursor to the hosted RiskModels MCP server. It contains no code that runs on your machine and no credentials.
File | What it declares |
Plugin | |
One server, |
Install
In Cursor, open the Marketplace and search for RiskModels.
Install it for your user or for the current project.
Cursor adds the
riskmodelsMCP server. Its tools appear once you sign in.
Sign in
The server uses OAuth 2.1 with PKCE. Cursor handles the flow, and nothing goes in the plugin files:
When Cursor first connects to the
riskmodelsserver, the server asks for sign-in and Cursor opens a browser at riskmodels.app.Sign in with Google or an email link, or choose Sign in with a password instead.
The consent screen shows Signed in as <email>. If that is the wrong account, click Use a different account first, then Allow.
Cursor stores the token. The tools are read-only: they return data and never place orders or change your account.
Pricing and account
A RiskModels account is required. New accounts start with $20 of prepaid credit. A payment method is collected at signup for verification and is not charged until you top up.
Usage is pay-as-you-go and billed per tool call against that balance. Most single-stock calls cost $0.005; fundamentals cost $0.02, and a full portfolio exposure report costs $0.25. Rates and plans: riskmodels.app/pricing.
Optional: link a brokerage account (Alpaca, Connect Trade or Plaid) in riskmodels.net Settings, and
riskmodels_get_my_positionsreads that book.
Example: NVDA
Ask in Cursor's agent chat:
Decompose NVDA's risk with RiskModels and give me the ETF hedge for a $100,000 position.
The agent calls riskmodels_decompose for the market / sector / subsector / stock-specific split of NVDA's variance and the hedge ratio at each level. Then it calls riskmodels_decompose again with a dollar amount to turn those ratios into dollar trades in SPY and the sector and subsector ETFs. The numbers are live model output as of the latest trading day.
The Claude plugin (claude-plugin/) and the local developer MCP server (.cursor/mcp.json, mcp/) are separate and unchanged.
Related MCP server: QuantRisk-MCP-Server
🚀 Quick Links
Python SDK — AOM quickstart (Google Colab): Open notebook · source:
sdk/notebooks/riskmodels_aom_colab.ipynbDeveloper Portal: riskmodels.app
Live API Docs: riskmodels.net/docs/api/erm3
ERM3 methodology: riskmodels.app/docs/methodology
Get API Key: riskmodels.app/get-key
API Terms: riskmodels.net/terms/api
PyPI (Python SDK): riskmodels-py
Canonical URLs (REST, OpenAPI, and docs)
Use these only for integrations and tooling:
What | URL |
REST base (OpenAPI |
|
Deployed OpenAPI JSON (same spec as |
|
Interactive API reference (this portal) |
Important: The hostname api.riskmodels.app is not used for the public API or machine-readable docs. Older links or docs that mention it should be treated as obsolete; use riskmodels.app (apex) as above.
📖 API Overview
The RiskModels API provides institutional-grade equity risk analysis:
Daily factor decompositions — market, sector, subsector explained-risk fractions for the headline ~3,000 largest US stocks by market cap (month-end universe)
Hedge ratios — dollar-denominated ETF hedge amounts (L1/L2/L3) designed to remain executable with liquid raw ETFs
Historical time series — split- and dividend-adjusted returns (2006-01-04–present) plus rolling hedge ratios (2010-12-08–present) and ER (2011-12-07–present; factor outputs need a full regression window)
AI-agent ready — OAuth2, per-request billing, machine-readable manifests
Data coverage: ~16,000 US stocks in the historical panel; ~3,000 largest by market cap at each month end for headline outputs. Updated daily. Hedge ratios: 2010-12-08 through present. Explained risk: 2011-12-07 through present. L* levels: 2013-01-01 through present. Adjusted return series: 2006-01-04 through present.
Why The Engine Matters
RiskModels is designed to be useful for real portfolio work, not just descriptive analytics:
Built to be time-safe — the engine is designed to avoid common sources of forward contamination such as recycled tickers, snapshot shares, and retroactive universe contraction
Grounded in a real Security Master — ticker-level outputs sit on top of a point-in-time identity layer built for identifier continuity, symbol changes, and historically defensible shares data
Hierarchical by design — the model separates market, sector, and subsector structure rather than collapsing everything into a flat beta view
Tradeable in practice — the published hedge ratios are designed to work with liquid ETFs at execution time, not only with synthetic or orthogonalized factors
Built on adjusted return series — split- and dividend-adjusted returns make the decomposition and hedge ratios more economically consistent over long horizons
For a deeper explanation of the engine design choices behind these claims, see the methodology docs and API reference.
🐍 Python SDK (riskmodels-py)
Prefer the Python SDK over raw REST for agent-native workflows — ticker resolution, semantic field normalization, validation with instructional errors, and LLM-ready context formatting are built in.
Install (PyPI):
pip install riskmodels-py
# Optional — xarray cube from batch Parquet/CSV:
# pip install riskmodels-py[xarray]
# Optional — snapshot PDF rendering:
# pip install riskmodels-py[pdf]Quickstart:
from riskmodels import RiskModelsClient, to_llm_context
client = RiskModelsClient.from_env()
pa = client.analyze({"NVDA": 0.4, "AAPL": 0.6})
print(to_llm_context(pa))Snapshot generation (institutional PDF reports):
from riskmodels.snapshots import get_data_for_r1, render_r1_to_pdf
client = RiskModelsClient.from_env()
data = get_data_for_r1("NVDA", client) # fetch → R1Data (caches to JSON)
render_r1_to_pdf(data, "NVDA_R1_Risk.pdf") # render → PDF (~0.3s, no API)Documentation:
Package README — install, methods, agent-native helpers
Quickstart — 60-second setup path
API Docs — agent-native helpers reference table
Risk intelligence
Charts below are generated from live API data (get_rankings + MAG7 L3 batch metrics) via scripts/generate_readme_assets.py. Set RISKMODELS_API_KEY (free tier is sufficient), run the script from the repo root, then commit ./assets/ and ./public/docs/readme/.
MAG7 — L3 σ-scaled decomposition
Cross-sectional rankings
🤖 MCP Server (v3.0.0-agent)
RiskModels includes a first-class MCP (Model Context Protocol) server, enabling AI agents to directly query risk data and perform factor analysis.
MCP Connection (hosted API):
Endpoint (Streamable HTTP, POST):
https://riskmodels.app/api/mcpNamed endpoints:
/api/mcp/openaiand/api/mcp/sseremain supportedAuthentication: Bearer token (API key or OAuth2 JWT)
Discovery:
https://riskmodels.app/.well-known/mcp.json(see OPENAPI_SPEC.yaml)
Local MCP server (mcp/ in this repo, @riskmodels/mcp 2.0.0) — stdio transport for Cursor / Claude Desktop / Zed. Tool set 2.0 is one registry shared with the hosted endpoints: 25 tools locally, 26 hosted (adds riskmodels_render_artifact):
riskmodels_get_stock_snapshot, riskmodels_decompose, riskmodels_compare, riskmodels_get_returns, riskmodels_get_return_attribution, riskmodels_get_residual_returns, riskmodels_get_residual_signal, riskmodels_get_macro_correlation, riskmodels_get_fundamentals, riskmodels_analyze_portfolio, riskmodels_get_portfolio_risk_snapshot, riskmodels_portfolio_exposure, riskmodels_decompose_selection_vs_drift, riskmodels_get_my_positions, riskmodels_get_rankings, riskmodels_screen_rankings, riskmodels_get_cohorts, riskmodels_get_peers, riskmodels_search, riskmodels_resolve_security_identity, riskmodels_get_filer, riskmodels_get_fund, riskmodels_get_etf, riskmodels_get_benchmark_fit, riskmodels_get_factor_returns.
The REST catalog, response schemas and OpenAPI spec are MCP resources (riskmodels:///capabilities, riskmodels:///schemas/{path}, riskmodels:///openapi). Tool list, prices and the 1.x → 2.0 migration table: mcp/README.md. Outside MCP, call the REST API or the Python SDK (riskmodels-py).
See mcp/README.md for install and config.
Anthropic Claude (Managed Agents vs Messages API): internal engineering design for optional cloud-hosted agents, billing, and compliance — see docs/ANTHROPIC_CLOUD_AGENTS.md.
⌨️ Command-line CLI (riskmodels)
The npm package in cli/ installs the riskmodels binary: config, SQL query (billed API or direct Supabase), schema introspection, balance, and static agent manifests.
Install from npm:
npm install -g riskmodels
riskmodels --helpDevelop from this repo:
cd cli
npm ci
npm run build
npm run install:global # optional: npm link for local testingPublish to npm (maintainers): procedure is documented in the private BWMACRO monorepo (docs/RISKMODELS_CLI_NPM_PUBLISHING.md), not here. Only publish from the cli/ directory — the repo root Next.js app is not published to npm.
💻 Developer Portal (This Repo)
This repo now includes a Next.js developer portal with:
✨ Hero landing page with feature highlights
📚 MDX-powered documentation (README_API.md, AUTHENTICATION_GUIDE.md)
🔍 Interactive API reference (Redoc OpenAPI viewer)
💡 Code examples with syntax highlighting and copy buttons
🎯 Step-by-step quickstart guide
Local Development
# Install dependencies
npm install
# Option A: Copy env template and fill in Supabase/Stripe keys manually
cp .env.example .env.local
# Option B: Use Doppler (recommended for team consistency)
# Ensure `doppler login` is done, then:
doppler secrets download --no-file --format env > .env.local
# Generate OpenAPI JSON for Redoc
npm run build:openapi
# Run dev server
npm run devScreenshot Capture Hygiene:
When capturing site screenshots for audit or documentation:
Ensure the build passes first:
npm run buildmust complete without errorsVerify the dev server serves HTTP 200: Visit
http://localhost:3000and confirm pages render (not "Internal Server Error")Run the capture script:
python3 capture_site.py(requires Playwright)
The script will skip pages returning HTTP 500 or containing "Internal Server Error" content. Screenshots with server errors should never be committed to the repository.
Environment Management with Doppler:
This repo uses Doppler for secrets management. The doppler.yaml is pre-configured for the erm3 project:
# Verify setup (should show project: erm3, config: dev)
doppler setup
# List all secrets
doppler secrets
# Get a specific secret
doppler secrets get STRIPE_SECRET_KEY
# Export dev secrets to .env.local for curl testing and local dev
npm run doppler:env
# Push production secrets to Vercel (requires vercel login + project link)
npm run vercel:sync-env:dopplerFor curl/API testing with Doppler secrets:
# 1. Export secrets to .env.local
npm run doppler:env
# 2. Source them for your shell session
source .env.local
# 3. Use in curl commands
curl -H "Authorization: Bearer $RISKMODELS_API_SERVICE_KEY" \
https://riskmodels.app/api/healthSee DEPLOYMENT.md for detailed Vercel/Doppler integration.
Visit http://localhost:3000
Build & Deploy
# Build for production
npm run build
# Start production server
npm startDeployment: See DEPLOYMENT.md for Vercel setup, env vars, and Supabase/Stripe config.
📂 Repository Structure
RiskModels_API/
├── app/ # Next.js app
│ ├── api/ # API routes (REST)
│ ├── page.tsx # Hero landing page
│ ├── layout.tsx # Root layout with Navbar/Footer
│ ├── docs/[[...slug]]/ # MDX docs renderer
│ ├── api-reference/ # Redoc OpenAPI viewer
│ ├── examples/ # Code examples showcase
│ └── quickstart/ # Quickstart guide
├── components/ # React components (new)
│ ├── Navbar.tsx
│ ├── Footer.tsx
│ ├── Hero.tsx
│ ├── CodeBlock.tsx
│ └── Logo.tsx
├── content/docs/ # MDX content (new)
│ ├── api.mdx
│ └── authentication.mdx
├── cli/ # Command-line CLI (`riskmodels`)
├── sdk/ # Python SDK (`riskmodels-py`) source
│ └── riskmodels/snapshots/ # Snapshot PDF pipeline (R1 shipped, R2–P4 planned)
├── examples/ # Runnable examples
│ ├── python/
│ └── typescript/
├── mcp/ # MCP (Model Context Protocol) server
├── public/ # Static assets (new)
│ ├── transparent_logo.svg
│ └── openapi.json # Generated from OPENAPI_SPEC.yaml
├── styles/ # Global styles (new)
├── lib/ # Utilities (new)
├── OPENAPI_SPEC.yaml # Canonical OpenAPI spec
├── README_API.md # API reference (source for content/docs/api.mdx)
├── AUTHENTICATION_GUIDE.md # Auth guide (source for content/docs/authentication.mdx)
├── SEMANTIC_ALIASES.md # Field definitions
└── package.json # Next.js deps (new)🛠️ Tech Stack (Developer Portal)
Framework: Next.js 15 (App Router)
Styling: Tailwind CSS 3.4, dark mode default
MDX: @next/mdx for documentation
API Reference: Redoc (OpenAPI 3.0 viewer)
Code Highlighting: Custom CodeBlock with copy button
Fonts: Inter (system-ui fallback)
Colors: Blue primary (
hsl(217, 91%, 60%)), zinc/slate dark palette
📄 Documentation Files
Document | Description |
Complete API overview, endpoints, key concepts | |
API Terms of Service (riskmodels.net/terms/api) | |
Plaid connection flow and holdings API user experience | |
Bearer token, OAuth2, Supabase JWT, rate limits | |
Process for adding new documentation | |
Field definitions, units, formulas | |
| |
Error codes and recovery patterns | |
OpenAPI 3.0.3 specification (v3.0.0-agent) | |
Snapshot suite roadmap, ADRs, and implementation phases | |
8-page content spec with wireframes and JSON schemas | |
Pure-Matplotlib rendering pipeline architecture |
🔗 Related
ERM3 — Python risk model computation engine (open source)
🤝 Contributing
We welcome pull requests, especially to improve the OpenAPI spec — clearer descriptions, better schemas, and more examples help everyone.
OpenAPI spec: CONTRIBUTING.md — PRs to
OPENAPI_SPEC.yamlare encouragedIssues: Open an issue for bugs or feature requests
Examples: Submit new examples via PR to
examples/Docs: Improve documentation by editing MDX files in
content/docs/
📧 Support
API Support: service@riskmodels.app
Status: riskmodels.net/status · API metrics riskmodels.app/api/status
📜 License
See LICENSE for details.
© 2026 Blue Water Macro Corp. All rights reserved.
Deploy trigger: Tue Jun 9 16:13:22 PDT 2026
Available Tools
24 toolsriskmodels_analyze_portfolioRiskModels Portfolio Hedge Levels and ETF HedgeARead-onlyInspect
Use when you have a long-only book of up to 100 names and want its holdings-weighted L1, L2 and L3 hedge ratios, or the ETF hedge notionals for dollar positions. Not for books with shorts or more than 100 names (use riskmodels_portfolio_exposure) or a variance decomposition with return attribution (use riskmodels_get_portfolio_risk_snapshot). Returns, from POST /batch/analyze, portfolio hedge levels at L1, L2 and L3 with per-ticker detail. Only when every position is given in dollars does it also return the ETF hedge notionals at hedge_level (set by level, default L3), by ticker and summed by ETF; with weights, level is ignored. End-of-day data, refreshed after each US market close. Price: $0.015 per position, minimum $0.03 per call.
Inputs: positions (required), level, years.
riskmodels_compareRiskModels Multi-Ticker ComparisonARead-onlyInspect
Use when you want 2-100 stocks side by side on market, sector, subsector and residual risk. Not for one stock (use riskmodels_decompose) or a weighted portfolio (use riskmodels_analyze_portfolio). Returns, from POST /batch/analyze, each ticker's explained-risk shares and hedge ratios by layer, with chart-ready data. End-of-day data, refreshed after each US market close. Price: $0.015 per ticker, minimum $0.03 per call.
Inputs: tickers (required).
riskmodels_decomposeRiskModels Single-Stock DecompositionARead-onlyInspect
Use when you want one stock's risk split into market, sector, subsector and residual layers, or the ETF hedge legs for a dollar position in it. Not for several stocks (use riskmodels_compare) or a portfolio (use riskmodels_analyze_portfolio). Returns, from POST /decompose, each layer's explained-risk share, hedge ratio and hedge ETF, chart-ready data and a one-line summary; with dollars it returns the ETF hedge notionals for that position at each level (hedge ratio times dollars). End-of-day data, refreshed after each US market close. Price: $0.005 per call.
Inputs: ticker (required), dollars.
riskmodels_decompose_selection_vs_driftRiskModels Selection vs DriftARead-onlyInspect
Use when you want a book's realized residual return over a date window attributed to stock selection versus drift. Not for current risk or hedges (use riskmodels_portfolio_exposure). Returns, from POST /cohorts/pnl-decomposition, selection (from holding names that beat their cohort's average residual) and drift (from net exposure to the cohort average), which sum exactly to the total; weights are held constant over the window and not normalized, a short is a negative weight, and positions that cannot be mapped to a cohort are listed in coverage.dropped. Historical attribution on end-of-day data. Price: $0.25 per call.
Inputs: positions (required), level, end_date, min_names, +2 more.
riskmodels_get_benchmark_fitRiskModels Benchmark Fit (active weights)ARead-onlyInspect
Use when you want to compare a fund, 13F filer or ETF portfolio with a benchmark: active share and the largest active weights. Not for the subject's own holdings (use riskmodels_get_fund, riskmodels_get_filer or riskmodels_get_etf). Returns, from GET /data/benchmark-fit, active share, active-weight RMS (a coarse tracking-error proxy), overlap, and the largest over- and underweights at a common date. Benchmarks: ff_own (free-float-cap weights of the subject's own holdings), the large and small style cells (cell_large-value, cell_large-blend, cell_large-growth, cell_small-value, cell_small-blend, cell_small-growth), or all (every available benchmark for the subject). Holdings dates follow the latest filings; weights use end-of-day prices. Price: $0.02 per call.
Inputs: subject (required), benchmark (required), top, as_of.
riskmodels_get_cohortsRiskModels Cohort StatisticsARead-onlyInspect
Use when you want cross-sectional residual statistics for SPY and the 11 GICS sector SPDR cohorts, on one date or as a time series. Not for one stock's peers (use riskmodels_get_peers) or one stock's rank (use riskmodels_get_rankings). Returns, from GET /cohorts (one date) or GET /cohorts/series (series=true), residual_mean, residual_sd, mean_pairwise_corr, n_names and n_effective by default, more on request. ERM3 residuals are fitted without an intercept, so residual_mean is not zero; link_fit_resid_sd is the residual standard deviation of the 252-day link regression, a fit-quality measure rather than a standard error. Subsector cohorts are not available. End-of-day data, refreshed after each US market close. Price: $0.04 for one date, $0.15 for a series.
Inputs: teo, series, cohorts, end_date, +3 more.
riskmodels_get_etfRiskModels ETFARead-onlyInspect
Use when you want one ETF's registry metadata and portfolio surface, and optionally its largest holdings. Not for finding an ETF ticker (use riskmodels_search) or the ETF's daily returns (use riskmodels_get_returns). Returns { snapshot, holdings }: snapshot from GET /data/etf/{ticker}; holdings, only when holdings_top is set, from GET /data/etf/{ticker}/holdings. Holdings follow the latest published holdings file; registry refreshed end-of-day. Free (no per-call charge).
Inputs: ticker (required), holdings_top.
riskmodels_get_factor_returnsRiskModels Macro and Sector ETF Factor ReturnsARead-onlyInspect
Use when you need macro factor return series (inflation, term spread, short rates, credit, oil, gold, the dollar, volatility, bitcoin, VIX) or the trailing returns of SPY and the 11 GICS sector SPDR ETFs. Not for a stock's correlation with those factors (use riskmodels_get_macro_correlation) or one ETF's daily return series (use riskmodels_get_returns). kind macro returns daily total returns over a date range (GET /macro-factors); kind sector_etf returns closing price and trailing 1, 21, 63 and 252-day total returns on one date (GET /etf/factor-returns). End-of-day data, refreshed after each US market close. Price: $0.005 per call (macro) or $0.02 per call (sector_etf).
Inputs: kind (required), end, teo, start, +3 more.
riskmodels_get_filerRiskModels 13F FilerARead-onlyInspect
Use when you want a 13F filer's profile, latest metrics and concentration, and optionally its largest holdings. Not for finding the bw_filer_id (use riskmodels_search) or comparing the book with a benchmark (use riskmodels_get_benchmark_fit). Returns { snapshot, holdings }: snapshot from GET /13f/filers/{bw_filer_id}/snapshot (registry details, latest metrics, concentration); holdings, only when holdings_top is set, from GET /13f/filers/{bw_filer_id}/holdings with the source filing's accession_number, filing_type (13F-HR, 13F-HR/A, 13F-NT) and amendment_type (ORIGINAL, RESTATEMENT, NEW_HOLDINGS or UNKNOWN; null on panels published before filing vintages were stored). Holdings follow the latest 13F filing; metrics use end-of-day prices. Price: $0.05, plus $0.02 when holdings are requested.
Inputs: bw_filer_id (required), holdings_top.
riskmodels_get_fundRiskModels Mutual FundARead-onlyInspect
Use when you want a US mutual fund's profile, return decomposition, hedge ratios and style-box ranks, and optionally its full holdings. Not for finding the bw_fund_id (use riskmodels_search) or comparing the fund with a benchmark (use riskmodels_get_benchmark_fit). Returns { snapshot, holdings }: snapshot from GET /funds/snapshot/{bw_fund_id} (registry details, latest return decomposition and diagnostics, top 25 holdings, L1/L2/L3 ETF hedge ratios, a 12-month portfolio time series and the fund's rank within its style box on each ranked metric); holdings, only when holdings_limit is set, from GET /funds/{bw_fund_id}/holdings (latest filed SEC N-PORT report, ranked by absolute market value, signed weights, long/short/net/gross totals and ticker coverage). Holdings follow the latest N-PORT filing; metrics use end-of-day prices. Price: $0.05, plus $0.02 when holdings are requested.
Inputs: bw_fund_id (required), holdings_limit.
riskmodels_get_fundamentalsRiskModels PIT Quarterly FundamentalsARead-onlyInspect
Use when you need point-in-time quarterly fundamentals or CAPM cost of capital for one stock. Not for risk or hedge numbers (use riskmodels_get_stock_snapshot). Returns, from GET /fundamentals/{ticker}: TTM profitability and capital-return ratios, leverage, ERM3 valuation betas, cost_of_debt and wacc from reported data, separately labelled cost_of_debt_imputed and wacc_imputed from a market proxy (10-year Treasury plus a high-quality corporate spread, not issuer-specific), economic profit, an equity-bridge decomposition and SEC line items (sec_facts). A quarter is included only if it was filed on or before as_of. grid=true adds an ERP x Treasury-tenor table of cost of equity, wacc, wacc_imputed and economic profit for the latest period. Realized history only, no forecasts; filings are picked up end-of-day. Price: $0.02 per call.
Inputs: ticker (required), erp, grid, as_of, +5 more.
riskmodels_get_macro_correlationRiskModels Macro Factor CorrelationARead-onlyInspect
Use when you want to know how one stock's returns co-move with macro factors such as rates, credit, oil, the dollar or volatility. Not for the macro factor return series themselves (use riskmodels_get_factor_returns). Returns, from POST /correlation, Pearson or Spearman correlations over a trailing window, using the L3 residual return by default. End-of-day data, refreshed after each US market close. Price: $0.01 per call.
Inputs: ticker (required), method, factors, return_type, +1 more.
riskmodels_get_my_positionsRiskModels linked brokerage positionsARead-onlyInspect
Use when the request concerns the caller's own linked brokerage book. Not for a book typed into the conversation (use riskmodels_analyze_portfolio or riskmodels_portfolio_exposure). Returns the caller's positions from their default riskmodels.net portfolio (Alpaca Connect, Connect Trade or Plaid): ticker, quantity, market value and weight of each position, has_shorts, and the same book in three shapes: for_analysis (positive weights), for_hedge (positive dollar values) and for_exposure (signed dollars, short < 0). Returns an empty book when no brokerage is linked. Read-only; it does not place orders. Positions are as of the portal's last brokerage sync. Free (no REST charge). No inputs.
Inputs: no named parameters.
riskmodels_get_peersRiskModels Peer GroupARead-onlyInspect
Use when you want the stocks that share a stock's subsector ETF or sector ETF. Not for cohort-level residual statistics (use riskmodels_get_cohorts). Returns, from GET /peers, the peer list ordered by market cap with each peer's market cap. End-of-day data, refreshed after each US market close. Price: $0.005 per call.
Inputs: ticker (required), limit, group_by.
riskmodels_get_portfolio_risk_snapshotRiskModels Portfolio Risk SnapshotARead-onlyInspect
Use when you want a long-only portfolio's risk decomposed into market, sector, subsector and residual variance, with diversification analytics and return attribution. Not for long/short books (use riskmodels_portfolio_exposure) or ETF hedge notionals (use riskmodels_analyze_portfolio). Returns, from POST /snapshot (the canonical portfolio snapshot), the L3 variance decomposition, per-position L3 hedge ratios, diversification analytics with sector and subsector ETF correlations, frozen-weight daily return attribution, cumulative return and drawdown over lookback_days, and a risk summary with dominant drivers and concentration flags. End-of-day data, refreshed after each US market close. Price: $1.25 per call.
Inputs: positions (required), benchmark, lookback_days.
riskmodels_get_rankingsRiskModels Cross-Sectional RankingsARead-onlyInspect
Use when you want one stock's percentile rank within the universe, its sector or its subsector on a risk or return metric. Not for screening the whole universe (use riskmodels_screen_rankings). Returns, from GET /rankings/{ticker}, the stock's rank and percentile for the metric and window. Metrics: subsector_residual, sector_residual, gross_return, mkt_cap, er_l1, er_l2 or er_l3. Windows: 1d, 21d, 63d, 252d. End-of-day data, refreshed after each US market close. Price: $0.005 per call.
Inputs: ticker (required), cohort, metric, window.
riskmodels_get_residual_returnsRiskModels Residual Returns and Recommended Hedge DepthARead-onlyInspect
Use when you need daily residual (stock-specific) returns and the recommended hedge depth (L1 market, L2 sector or L3 subsector) for 1-100 stocks. Not for the full factor split of each day's return (use riskmodels_get_return_attribution) or a mean-reversion signal on a basket (use riskmodels_get_residual_signal). Returns, per ticker, the recommended depth by date, the hedge ratios at that depth and the daily residual return series. One ticker is served by GET /lstar; 2-100 tickers by POST /batch/lstar. Without threshold the depth is the one ERM3 publishes; with threshold it is the simplest depth whose marginal explained risk exceeds the threshold. End-of-day data, refreshed after each US market close. Price: one ticker $0.02 plus $0.01 per year beyond the first; 2-100 tickers $0.015 per ticker plus $0.0075 per ticker per year beyond the first, minimum $0.03 per call.
Inputs: tickers (required), years, threshold, market_factor_etf.
riskmodels_get_residual_signalRiskModels Residual Mean-Reversion SignalARead-onlyInspect
Use when you want the L3 residual mean-reversion signal aggregated over a basket of 1-100 stocks. Not for the residual return series themselves (use riskmodels_get_residual_returns). Returns, from POST /signals/residual-reversion/basket, the basket-aggregated signal, with optional weights and a minimum signal-quality quintile; it describes recent residual moves and is not a forecast. End-of-day data, refreshed after each US market close. Price: $0.02 per call.
Inputs: tickers (required), weights, signal_quality_min_quintile.
riskmodels_get_return_attributionRiskModels Return Attribution (factor vs residual)ARead-onlyInspect
Use when you need each day's return of one stock split into market, sector and subsector factor returns and the residual (stock-specific) return. Not for raw total returns (use riskmodels_get_returns) or residual returns for many stocks (use riskmodels_get_residual_returns). Returns, from GET /returns-decomposition, the daily gross return and its additive components (decimal returns); include_lstar adds the residual series at each day's recommended hedge depth. End-of-day data, refreshed after each US market close. Price: $0.04 per call plus $0.01 per year of history beyond the first.
Inputs: ticker (required), years, threshold, include_lstar, +1 more.
riskmodels_get_returnsRiskModels Stock Total ReturnsARead-onlyInspect
Use when you need the daily dividend-adjusted total returns of one US stock or ETF over 1-15 years. Not for returns split into factor and residual parts (use riskmodels_get_return_attribution) or residual returns at the recommended hedge depth (use riskmodels_get_residual_returns). Returns, from GET /ticker-returns, the daily return series (decimal, 0.01 = 1%) with each day's L3 market, sector and subsector hedge ratios and explained-risk shares; history is point-in-time. End-of-day data, refreshed after each US market close. Price: $0.02 per call plus $0.01 per year of history beyond the first.
Inputs: ticker (required), years.
riskmodels_get_stock_snapshotRiskModels Stock Risk SnapshotARead-onlyInspect
Use when you need one US stock's latest risk numbers: hedge ratios to SPY and to its sector and subsector ETFs, explained-risk shares by layer, volatility, closing price and market cap. Not for a layer-by-layer decomposition or the ETF hedge of a dollar position (use riskmodels_decompose), several stocks at once (use riskmodels_compare) or daily history (use riskmodels_get_returns). Returns the latest row of GET /metrics/{ticker}, including the hedge_levels block with hedge ratios, explained risk and hedge ETFs at L1, L2 and L3. End-of-day data, refreshed after each US market close. Price: $0.005 per call.
Inputs: ticker (required).
riskmodels_portfolio_exposureRiskModels Long/Short Portfolio ExposureARead-onlyInspect
Use when a book has short positions or more than 100 names, or when you want its beta-dollars and the ETF trades that neutralise it. Not for long-only books of up to 100 names given as weights (use riskmodels_analyze_portfolio). Returns, from POST /portfolio/exposure, beta-dollars by sector, the ETF trades that neutralise the book at L1, L2 and L3, systematic and residual dollar risk at hedge_level (default lstar: each name at its own recommended depth), coverage (positions not modelled, with reasons) and warnings. Positions are netted by security and not rescaled. End-of-day data, refreshed after each US market close. Price: $0.25 per call up to 25 modelled names, $1.00 above.
Inputs: positions (required), as_of, hedge_level, lookback_days.
riskmodels_screen_rankingsRiskModels Rankings ScreenARead-onlyInspect
Use when you want the names in the universe that rank highest or lowest on one metric, with optional percentile, decile and sector filters. Not for one stock's rank (use riskmodels_get_rankings). Returns, from POST /rankings/screen, the ranked rows that pass the filters; metrics, cohorts and windows are the same as for one stock's rank. End-of-day data, refreshed after each US market close. Price: $0.25 per call.
Inputs: cohort (required), metric (required), window (required), as_of, +4 more.
riskmodels_searchRiskModels SearchARead-onlyInspect
Use when you need to resolve a name or fragment to an identifier: a stock ticker, an ETF ticker, a mutual fund's bw_fund_id or a 13F filer's bw_filer_id. Not for data about the match (use riskmodels_get_stock_snapshot, riskmodels_get_etf, riskmodels_get_fund or riskmodels_get_filer). Returns matches from GET /tickers (type stock), GET /data/etf/search (etf), GET /funds/search (fund: bw_fund_id, ticker, name, style box, asset class, total assets) or GET /13f/filers/search (filer: bw_filer_id). Registry refreshed end-of-day. Free.
Inputs: q, mag7, type, limit, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Each tool targets a distinct resource+action and nearly every description includes explicit 'not for X (use Y)' routing, e.g. the closely related get_returns vs get_return_attribution vs get_residual_returns vs get_residual_signal are clearly separated. The four portfolio tools (analyze_portfolio, get_portfolio_risk_snapshot, portfolio_exposure, decompose_selection_vs_drift) overlap most, but size/short/long-only/purpose boundaries are spelled out, so selection is tractable.
All tools share the riskmodels_ prefix and most follow a get_<noun> or verb_noun pattern (get_stock_snapshot, get_rankings, screen_rankings, analyze_portfolio). A few drop the verb or use noun phrases (decompose, compare, portfolio_exposure, decompose_selection_vs_drift), which is a minor deviation but still readable.
24 tools is on the heavy side but the server spans a genuinely broad domain: single-stock risk, returns/attribution, macro, screening, portfolios, funds, 13F filers and ETFs. Each tool maps to a distinct endpoint and earns its place, so the count is justified rather than bloated.
Coverage is comprehensive across the equity-risk lifecycle: fundamentals, metrics snapshots, per-stock and universe rankings/screens, returns and factor/residual attribution, macro factors and correlations, peers/cohorts, entity search, and full portfolio construction/hedging/attribution. The fund, filer, ETF and benchmark-fit tools round out the security-master side, leaving no obvious dead ends.
Maintenance
Related MCP Connectors
Portfolio risk analytics — VaR, Monte Carlo, optimization, options Greeks, stress testing.
Stock & options risk analytics for AI agents: pre-trade risk scan, IV, gamma walls, Monte Carlo.
Explainable model signals, drivers, news sentiment, SEC filings and macro data for US stocks.
Factor exposures and risk contribution for a portfolio, computed on the prices you send.
Related MCP Servers
- AlicenseAqualityBmaintenanceWhat it does: * Portfolio risk profiling (per-asset and portfolio-level) * Target allocation based on risk profile (conservative/moderate/aggressive) * Diversification scoring via HHI index * Sharpe proxy calculation * Concentration risk detection * Rule-based rebalance recommendations101MIT
- AlicenseAqualityDmaintenancePortfolio 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.1094 npm2MIT
- AlicenseNot gradedqualityDmaintenanceThe verifiable risk engine for autonomous agents: deterministic, self-verifying financial calculations that an agent can delegate and prove. It covers liquidation and funding, position sizing and risk of ruin, options Greeks and margin, LP divergence, treasury concentration and depeg, execution quality checks, plus intelligence on options, DeFi, prediction markets, and transaction safety analysis.18 npm2MIT
- AlicenseAqualityBmaintenanceMCP server for decomposing US equity portfolio risk into factor exposures, with tools for portfolio risk, factor exposures, stress tests, and coverage checks using Barra-style fundamental factor models.711MIT