maintainers-internal-pointer — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited maintainers-internal-pointer (Rules) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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 on daily history from 2007 through present; 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 — MAG7 macro correlations & cross-sectional rank snapshot
This repository is the authoritative public API reference for the RiskModels equity risk model API, featuring:
wiki_uri in response metadata)examples/sdk/notebooks/riskmodels_aom_colab.ipynbUse these only for integrations and tooling:
| What | URL |
|---|---|
REST base (OpenAPI servers) | https://riskmodels.app/api |
Deployed OpenAPI JSON (same spec as OPENAPI_SPEC.yaml) | https://riskmodels.app/openapi.json |
| Interactive API reference (this portal) | /api-reference |
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.
The RiskModels API provides institutional-grade equity risk analysis:
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. Factor outputs (HR/ER): 2007 through present. Adjusted return series: 2006-01-04 through present.
RiskModels is designed to be useful for real portfolio work, not just descriptive analytics:
For a deeper explanation of the engine design choices behind these claims, see the methodology docs and API reference.
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:
Charts below are generated from live API data (MAG7 batch correlation + 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/.
<p align="center"> <img src="./assets/mag7_l3_sigma_rr.png" width="680" alt="MAG7 L3 sigma-scaled risk ratios and residual HR share" /> <br> <sub>Same “tech” label, different subsector DNA — bar length ∝ annualized σ; segments = σ × L3 market/sector/subsector risk ratios + residual (HR share). <code>POST /batch/analyze</code> via SDK <code>save_mag7_l3_sigma_rr_png</code></sub> </p>
<p align="center"> <img src="./assets/macro_heatmap.png" width="680" alt="MAG7 macro correlation matrix" /> <br> <sub>Pearson correlations of L3 residual returns vs macro factors — <code>POST /correlation</code></sub> </p>
<p align="center"> <img src="./assets/ranking_snapshot.png" width="680" alt="Ticker ranking needle" /> <br> <sub>Universe rank percentile from <code>get_rankings</code></sub> </p>
<p align="center"> <img src="./assets/ranking_cohorts.png" width="680" alt="Ranking by cohort" /> <br> <sub>Universe / sector / subsector rank percentile breakdown</sub> </p>
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):
https://riskmodels.app/api/mcp/ssehttps://riskmodels.app/.well-known/mcp.json (see OPENAPI_SPEC.yaml)Local MCP server (`mcp/` in this repo) — stdio transport for Cursor / Claude Desktop / Zed: discovers capabilities, schemas, OpenAPI, and SDK-backed live-paper risk tools. Tools shipped here include:
riskmodels_list_endpoints — List API capabilities (id, method, endpoint, short description)riskmodels_get_capability — Full capability record by id (parameters, pricing, examples)riskmodels_get_schema — JSON Schema for a response type (e.g. ticker-returns-v2.json)riskmodels_decompose, riskmodels_compare, riskmodels_hedge_position, riskmodels_portfolio_decompose, riskmodels_whitepaper_example — Agent-ready SDK outputs with chart_data, suggested_chart, and plain-English summariesFor live risk data and portfolio math, call the REST API (e.g. GET /api/metrics/{ticker}, POST /api/batch/analyze, GET /api/l3-decomposition), the Python SDK (riskmodels-py), or the listed MCP tools.
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.
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.
This repo now includes a Next.js developer portal with:
# 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:
npm run build must complete without errorshttp://localhost:3000 and confirm pages render (not "Internal Server Error")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 for production
npm run build
# Start production server
npm startDeployment: See DEPLOYMENT.md for Vercel setup, env vars, and Supabase/Stripe config.
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)hsl(217, 91%, 60%)), zinc/slate dark palette| Document | Description |
|---|---|
| README_API.md | Complete API overview, endpoints, key concepts |
| API_TERMS.md | API Terms of Service (riskmodels.net/terms/api) |
| PLAID_HOLDINGS_UX.md | Plaid connection flow and holdings API user experience |
| AUTHENTICATION_GUIDE.md | Bearer token, OAuth2, Supabase JWT, rate limits |
| DOCS_PROCESS.md | Process for adding new documentation |
| SEMANTIC_ALIASES.md | Field definitions, units, formulas |
| RESPONSE_METADATA.md | _agent block, response headers, pricing |
| ERROR_SCHEMA.md | Error codes and recovery patterns |
| OPENAPI_SPEC.yaml | OpenAPI 3.0.3 specification (v3.0.0-agent) |
| docs/SNAPSHOT_ROADMAP.md | Snapshot suite roadmap, ADRs, and implementation phases |
| docs/SNAPSHOT_CONTENT_MAP.md | 8-page content spec with wireframes and JSON schemas |
| docs/SNAPSHOT_FRONTEND_ARCH.md | Pure-Matplotlib rendering pipeline architecture |
We welcome pull requests, especially to improve the OpenAPI spec — clearer descriptions, better schemas, and more examples help everyone.
OPENAPI_SPEC.yaml are encouragedexamples/content/docs/See LICENSE for details.
© 2026 Blue Water Macro Corp. All rights reserved.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.