Portfolio risk, decomposed. Rebuilt weekly. Graded in public.

riskprism is an open-source, Barra-style fundamental factor risk model for US equities: a market factor, nine styles and thirty industries, estimated from daily cross-sections of roughly three thousand names. Built entirely on a redistributable data chain — SEC EDGAR fundamentals and market prices — and published as versioned artifacts under MIT.

Open the explorer Read the model factsheet Get the artifacts ↓
riskprism — model summary … … Rebuilt weekly
No.PropertyValueRemark

Values print from the current weekly build; superseded builds remain published and reproducible.

02 · Three ways in

Quantitative research

The full model as versioned parquet artifacts — exposures, factor covariance, specific risk, daily factor-return history. No key, no signup; reproduce or extend any build from source.

Quickstart →

AI agents

A hosted JSON API and an MCP server exposing portfolio risk, factor exposures, stress tests and coverage checks — with every build mirrored as plain markdown at /model.md.

Configure in one minute →

Portfolio analysis

Paste a book into the explorer: total volatility, factor decomposition and first-order stress tests, computed in the browser from the published artifacts.

Open the explorer →

03 · The scorecard

Every forecast is scored against what happened

Each week the model writes down volatility forecasts for a panel of test portfolios — factor portfolios, traded ETFs, and portfolios optimized against the model itself — then is graded on realized outcomes. Every build re-scores the entire history under the current methodology; nothing is cherry-picked.

See the full report card →

04 · Against the commercial models
DimensionriskprismCommercial typicalPosition
Estimation universe~2,800 liquid names~2,900 (Axioma AXUS4)At parity
Estimation frequencyDaily cross-sectionsDailyAt parity
ValidationPublic, reproducible, re-scored weeklyWhitepaper snapshotsAdvantage
Factor breadth40 factors70–80 factorsNear parity
Live track record~3y replayed, weeks live25–30 yearsTime

Gaps that cannot be closed with public, redistributable data are listed as explicit non-goals. Roadmap and non-goals →

Model factsheet

…

A fundamental multi-factor model of US equity returns at medium horizon: exposures formed weekly, factor returns estimated daily, outputs annualized. This page is the factsheet for the current build; the complete methodology, every parameter, and the decision history behind each choice are published alongside it.

01 · Factor structure
FactorClassDefinitionAnn. vol

Raw descriptors are winsorized at ±3σ and standardized to cap-weighted mean 0, standard deviation 1, each week. A stock's exposure answers: how many standard deviations from the market is it on this dimension? Annualized volatilities print live from the current build's factor covariance.

02 · Risk assembly
Σ = X F Xᵀ + diag(s²)
factor covariance spread through exposures, plus each stock's specific variance

Factor covariance F

EWMA on daily factor returns — 84-day volatility and 252-day correlation half-lives (~730 effective observations) — with Newey-West variance adjustment, correlation regularization, PSD repair, and a volatility regime adjustment multiplier.

Specific risk s²

Per-stock EWMA residual volatility, Newey-West adjusted, blended with a structural characteristics prior by history length, then Bayesian-shrunk toward size-decile means — with its own regime multiplier.

Estimation universe

Price ≥ $2, median dollar volume ≥ $1M, 26+ weeks of history. Coverage extends to every name alive at the build date; names outside estimation take specific risk from the structural prior, and the stock page discloses how much.

03 · The pipeline, run weekly
SEC EDGAR point-in-time fundamentals Daily prices pluggable providers Descriptors winsorize · standardize Exposures X formed each Friday Daily WLS regression √cap weights · industry constraint Factor returns f → EWMA covariance F Residuals ε → specific risk s Artifacts weekly release
04 · Factor history, this build
Cumulative factor returns from the daily cross-sectional regressions, compounded and sampled weekly. Toggle factors below.
Factor correlation, market + styles — steel positive, rust negative. Hover a cell for the value.
05 · Read before trusting
  • Survivorship bias, decaying and measured — pre-launch history excludes already-delisted names. Audited against SEC bulk archives: the omitted names skew small, bounding the cap-weighted bias at ~1.4–2.5 bp/week; weekly builds append imputed delisting returns, so the cold start washes out within one to two years.
  • Prior-driven names — stocks outside the estimation universe take specific risk from a structural model of their characteristics, not their own history; the stock page discloses the proportion.
  • Crude universe heuristics — ticker-pattern filters; some ADRs leak through; one share class per company.
  • First-order stress tests — exposure × shock; no convexity, no specific returns.
06 · Roadmap — the honest gap
NextScope
v0.7 — beta splitShipped 2026-08-22 — beta significant in 84% of daily cross-sections, R² 0.159 → 0.178, every scoreboard aggregate improved
v0.8 — stylesShipped 2026-08-22 — growth added (42% significant), leverage rebuilt as a composite (bias 1.50 → 1.11); dividend yield measured and rejected
v0.9 — FF30 + coverageShipped 2026-08-22 — 30 Fama-French industries (K = 40, R² ~0.21) and coverage 2,987 → 6,307 names, estimation pinned at the liquid ~2,800
v1.0 — stabilityFrozen schema, PyPI, versioned registry, one year of live weekly record

Non-goals

Analyst-estimate descriptors, GICS industries and ESG factors are excluded deliberately: no public, redistributable, point-in-time source clears the bar. A redistributable data chain is the point.

Validation

The report card

Each week the model writes down a volatility forecast for every portfolio on the test panel, using only information available at the time, and is graded against what happened. Every build re-scores the entire history under the current methodology. This page is the complete record — including the cases built to make the model fail.

How forecasts are graded
z = realized return ÷ forecast vol
an honest forecast makes z standard normal
std(z) = 1.00
the bias statistic
|z| > 1.96 in ~5%
of portfolio-weeks
1 : 1
realized variance tracks forecast
Test 01 · Calibration

Are the error bars the right size?

Bias statistic by portfolio; the tinted band is ±2 standard errors around 1.00. Inside the band: calibrated. The opt rows are the deliberate hard case — Test 03.
Test 02 · Responsiveness

Does it move when risk moves?

Forecast (solid) against realized weekly volatility (dashed) — every test portfolio selectable, including the traded ETFs, scored via point-in-time returns-based exposures.
Test 03 · Adversarial

Portfolios built to beat it

Optimizers hunt a covariance matrix's underestimated directions — the literature's hardest failure mode. Weekly min-variance portfolios optimized against our own matrix, graded like everything else: daily estimation (v0.5) collapsed the bias onto Shepard's theoretical floor, and the API ships the correction as optimized=true. Evidence: DECISIONS.md §9–10.
Test 04 · Baselines

Could anything simpler do better?

Each baseline needs the portfolio's own return history; the factor model prices any weight vector cold. Matching the univariate baselines on their home turf is the bar.

The commercial models, on their own protocols

The vendors' forecasts are proprietary and their licenses forbid published benchmarks, so they cannot sit in the table above. What we can do is conform to them: each row runs this model under that vendor's published test protocol, next to what the vendor reports about itself. Periods and universes still differ — that caveat is stated, not engineered away.

Sources: Menchero, Orr & Wang, The Barra US Equity Model (USE4), Methodology & Empirical Notes, MSCI Model Insight, 2011 · Axioma US Equity Factor Risk Models factsheet, 2016 · Bloomberg MAC3. Two of USE4's documented remedies — the volatility regime adjustment and Bayesian specific-risk shrinkage — already run inside this model. The full decision history: DECISIONS.md.

Appendix · Every number behind the charts
Every portfolio-week z-score, pooled, against the bell curve a calibrated model would produce.

Full per-portfolio results — bias statistics, exceedance rates, forecast and realized volatility, vol ratios. Recomputed weekly; the underlying panel ships with the artifacts as validation.parquet.

Explorer

Portfolio risk

Positions

One per line: TICKER WEIGHT — % or decimals, negative for shorts. Updates as you type.

All computation runs in the browser on the published artifacts. Nothing leaves the page.

Enter positions or pick a preset to see the portfolio's risk decomposition.

Docs & agents

Access & integration

Every weekly build is published in full: versioned parquet artifacts, a Python library, a hosted JSON API, an MCP server for agents, and a plain-markdown mirror of the model card. No key, no signup.

01 · Get the artifacts

Install & download

pip install riskprism
mkdir -p artifacts && curl -L https://github.com/wanxinwanxin/risk-prism/releases/latest/download/riskprism-artifacts.tar.gz | tar xz -C artifacts

Exposures, factor covariance, specific risk, daily factor-return history, residuals, estimation metadata, and the point-in-time EDGAR fundamentals store. The install includes the MCP server (riskprism-mcp) out of the box.

Latest release ↓
02 · Python

Local, from the artifacts

from riskprism import RiskModel

model = RiskModel.load("artifacts")
model.portfolio_risk({"AAPL": 0.4, "MSFT": 0.3, "XOM": 0.3})
model.stress_test({"AAPL": 1.0}, {"market": -0.10})

Weights are portfolio weights, shorts negative; volatilities are annualized decimals. Pass optimized=True to apply the Shepard correction for portfolios optimized against the model.

03 · Hosted API

No install, newest build

curl -s -X POST https://risk-prism-production.up.railway.app/api/v1/portfolio-risk \
  -H 'content-type: application/json' \
  -d '{"weights": {"AAPL": 0.4, "MSFT": 0.4, "XOM": 0.2}}'

Interactive docs at /api/docs, OpenAPI spec at /api/openapi.json. Every risk endpoint accepts ?horizon=medium|short — the short variant halves the risk half-lives on the same regressions.

04 · MCP for agents

Hosted — no install

{ "mcpServers": { "riskprism": {
    "type": "http",
    "url": "https://risk-prism-production.up.railway.app/mcp"
} } }

Streamable HTTP, stateless, serving the newest weekly build — same six tools as the local server. For a local surface: riskprism-mcp with RISKPRISM_ARTIFACTS pointing at a downloaded artifacts directory (01).

05 · Tool surface — REST & MCP
REST endpointMCP toolReturns
GET /api/v1/metaget_model_infoModel version, as-of date, factor list, coverage count
POST /api/v1/portfolio-riskget_portfolio_riskTotal / factor / specific vol, exposures, contributions
GET /api/v1/assets/{ticker}get_factor_exposuresPer-asset exposures and vol decomposition
POST /api/v1/stress-teststress_testFirst-order P&L under factor shocks
GET /api/v1/coveragecheck_coverageWhich tickers the current build covers
GET /api/v1/factors—Factor vols and the full K×K covariance matrix
GET /api/v1/registrylist_model_versionsCatalog of published model builds, artifact URLs
06 · Reading this as an agent?

The plain-markdown mirror of this build lives at /model.md, indexed by /llms.txt — model card, factor definitions, correlations, and the full coverage list. No DOM parsing required. Point-in-time weekly snapshots are served as static JSON under /history/index.json.

Or rebuild the model yourself — the weekly GitHub Action runs exactly this:

riskprism-build --max-names 8000 --out artifacts
07 · Documents
METHODOLOGY.mdFull methodology and every parameter of the current build
DECISIONS.mdThe decision history — every remedy adopted or rejected, with measured evidence
ROADMAP.mdThe gap to the commercial models, and which parts of it are closable
API.mdThe hosted JSON API — endpoints, payloads, examples
model.mdThe machine-readable model card for this build