Composite Risk Signal Dashboard
39-signal composite risk model with a Bull/Default/Bear leverage state machine
What it is
A Next.js dashboard that implements a client's proprietary composite global-financial-risk rulebook. 39 cross-asset components are normalized with expanding Z-scores, weighted into a composite and spread against the VIX to drive a leverage state machine. It includes a backtest against buy-and-hold, an 18-year state timeline, a component heat grid and live parameter controls that re-run the whole pipeline in the browser. The engine and its 42 tests are production code; the market data is synthetic until a licensed feed is wired in.
The problem
A trading rulebook that lived in a Word document needed to become a testable, reproducible signal engine.
How it works
- lib/risk-model holds stats, components, engine and trading modules, each mapped to a section of the rulebook.
- A single data seam (loadRawMarketFile) swaps the synthetic generator for real feeds, and the README maps each component group to its likely vendor.
- A Vitest suite of 42 engine tests and an Edge-middleware password gate protect the model and the app.
Stack
Disciplines
For your business
Turning a firm's written trading or risk rulebook into a tested engine and a live dashboard.