A rigorous mathematical framework for real-time macroeconomic risk monitoring
Atlas Dashboard is a real-time macroeconomic risk monitoring platform that aggregates 22 economic indicators into a single composite score, evaluates nine macro scenarios using a Bayesian inference framework, and applies both to user-defined portfolio assessments. This document provides the complete mathematical specification of all three components: the indicator scoring system, the scenario probability engine, and the portfolio assessment pipeline. Every calculation described here is implemented deterministically in the production codebase. The framework is calibrated against nine verified historical stress periods spanning 1974 to 2020.
1. The Composite Risk Score
1.1 Indicator Panel
1.2 Scoring Function Architecture
1.3 Era-Portable Relative Measures
1.4 Composite Aggregation
1.5 Risk Tier Classification
1.6 Historical Calibration
2. The Scenario Probability Engine
2.1 Scenario Definitions
2.2 Signal Strength Calculation
2.3 Weighted Average Strength
2.4 Bayesian Update
2.5 Correlation Adjustments
2.6 Normalisation
2.7 Probability Labels
3. Portfolio Assessment
3.1 Inputs
3.2 Assessment Pipeline
3.3 Scope and Limitations
4. Data Sources and Update Schedule
5. Limitations and Future Work
The Atlas Composite Score is a scalar measure of broad macroeconomic stress, computed as the sum of individual risk scores across a panel of 22 economic indicators. The composite ranges from 0 to a theoretical maximum of 25, and maps continuously to one of six named risk tiers. The score is updated twice daily on weekdays — before market open (AM edition) and 90 minutes before the close (PM edition).
Indicators are divided into a macro panel capturing systemic and global signals, and a micro panel capturing market-level sentiment and leverage signals.
| Indicator | ID | Source | Max Score |
|---|---|---|---|
| Macro Panel | |||
| VIX Volatility Index | VIX | yfinance ^VIX | 6.5 (capped) |
| EUR/USD Exchange Rate | EURUSD | yfinance EURUSD=X | ~4.0 |
| AUD/USD Exchange Rate | AUDUSD | yfinance AUDUSD=X | 1.0 |
| Gold Price YoY % | GOLD_PRICE | yfinance XAUUSD=X / GC=F | 1.0 |
| WTI Crude Oil YoY % | WTI_CRUDE | yfinance CL=F | 2.0 |
| Treasury Net Liquidity | TREASURY_LIQUIDITY | FRED WALCL − TGA − RRP | 2.0 |
| US 3Y Treasury Yield | 3Y_YIELD | FRED DGS3 | 1.0 |
| US 10Y Treasury Yield | 10Y_YIELD | FRED DGS10 | 1.5 |
| US 30Y Treasury Yield | 30Y_YIELD | FRED DGS30 | 1.0 |
| High-Yield OAS (bps) | HY_OAS | FRED BAMLH0A0HYM2 | 1.5 |
| Fiscal Integrity Score | FISCAL_RISK | Composite (see §1.4) | 2.0 |
| Bank CDS Proxy (AAA yield) | BANK_CDS | FRED AAA | 1.5 |
| SNAP Benefits Momentum | SNAP_BENEFITS | FRED TRP6001A027NBEA | Hidden component |
| Geopolitical Risk Score | GEOPOLITICAL | GPR Index + VIX + Gold + Oil | 2.0 |
| Micro Panel | |||
| S&P 500 Drawdown | SPX_INDEX | yfinance ^GSPC | 2.5 |
| ASX 200 Drawdown | ASX_200 | yfinance ^AXJO | 1.0 |
| Margin Debt YoY % | MARGIN_DEBT_YOY | FRED BOGZ1FL663067003Q | 1.5 |
| Small/Large Cap Ratio | SMALL_LARGE_RATIO | yfinance ^RUT / ^GSPC | 1.5 |
| Put/Call Ratio (SPY) | PUT_CALL_RATIO | yfinance SPY options chain | 1.0 |
| SOFR/OIS Spread (bps) | SOFR_OIS | FRED SOFR − TB3MS | 1.5 |
| Credit Card Delinquency Rate | CREDIT_CARD_DELINQUENCIES | FRED DRCCLACBS (×100 bps) | 1.5 |
Each indicator is scored by a deterministic piecewise function that maps its current reading to a scalar risk contribution. All functions share a common regime structure: a Green regime (benign, low contribution), an Amber regime (elevated, watch signal), and a Red regime (stress confirmed). Functions are monotone within each regime and continuous at boundaries. The general form is:
A representative set of scoring functions is provided below. All functions are implemented in update_atlas.py and can be inspected in full.
VIX Index
High-Yield OAS
10Y Treasury Yield
EUR/USD
Three indicators use relative rather than absolute measures, ensuring scoring thresholds do not become stale as nominal price levels shift across market eras and Fed balance sheet regimes:
Rationale: the old absolute WTI thresholds ($55/$65/$75) scored 2017's low-price supply-glut environment as a crisis (Red, 2.85) while correctly scoring 2022's high-price demand regime as benign (Green, 0.0). The YoY measure correctly identifies the demand destruction signal in both eras.
Two indicators — FISCAL_RISK and GEOPOLITICAL — are composite sub-scores calculated from other indicators rather than fetched directly. They are computed after the primary scoring loop and added to the composite.
Fiscal Integrity Score: computed from 30Y yield stress, Treasury liquidity drain, yield curve inversion (10Y−3Y), and SNAP benefits momentum. Each component deducts up to 25 points from a perfect integrity score of 100. The atlas contribution weight scales inversely with integrity:
Geopolitical Risk Score: weighted composite of the Caldara-Iacoviello GPR Index, VIX level, Gold YoY momentum, and WTI oil price. A divergence multiplier (1.0×–1.5×) is applied when GPR is elevated but VIX is suppressed — a tail risk underpricing signal.
The composite is then:
| Tier | Score Range | Description |
|---|---|---|
| ⛵ CALM (LOW RISK) | 0 – 5 | Benign macro environment. Base case stability. |
| 🌤 BUILDING (MODERATE RISK) | 5 – 8 | Risk signals emerging. Monitor closely. |
| ⚠ CHOPPY (ELEVATED RISK) | 8 – 12 | Elevated stress. Caution warranted. Mixed signals. |
| 🌊 STORM WARNING (HIGH RISK) | 12 – 16 | High risk environment. Defensive positioning recommended. |
| ⛈ FULL-STORM (SEVERE RISK) | 16 – 20 | Severe systemic stress. Full risk-off mode. |
| 🌀 HURRICANE (EXTREME RISK) | 20 – 25 | Extreme systemic crisis. Maximum defensive posture. |
Tier boundaries were calibrated by running actual FRED and yfinance data for nine historical stress periods through the live scoring functions at each event's peak stress date. Scores reflect what the framework would have produced in real time — not retroactive narrative assignment.
| Event | Peak Date | Score | Tier |
|---|---|---|---|
| 2017 Low-Volatility Baseline | 14 Jul 2017 | 2.6 | CALM |
| 2019 Mid-Cycle Recovery | 22 Feb 2019 | 4.8 | CALM |
| 2018 Q4 Rate Hike Selloff | 24 Dec 2018 | 11.8 | CHOPPY |
| 2022 Inflation Shock Peak | 13 Oct 2022 | 11.9 | CHOPPY |
| 2011 European Debt Crisis | 8 Aug 2011 | 11.7 | CHOPPY |
| 2002 Dot-com / 9-11 Trough | 9 Oct 2002 | 11.8 | CHOPPY |
| COVID-19 Collapse | 16 Mar 2020 | 16.9 | FULL-STORM |
| Global Financial Crisis | 10 Oct 2008 | 16.3 | FULL-STORM |
| OPEC Oil Embargo / Stagflation | 3 Oct 1974 | 6.8* | BUILDING* |
* 1974 calibration is partial. VIX, HY OAS, EUR/USD, SOFR, and delinquency data are unavailable pre-1991. Score reflects only indicators with historical data coverage. True composite would be materially higher.
The GFC (16.3, FULL-STORM) scores lower than many expect because Atlas measures broad macro stress — not narrative severity. On 10 October 2008, EUR/USD was 1.34 (USD demand spike, not weakness), WTI was $78/bbl YoY flat, and gold was +13.9% YoY — none crossing their stress thresholds. The crisis was acute in credit and funding markets, accurately reflected in VIX (6.49), HY OAS (1.5), SOFR/TED (1.5), and delinquencies (1.5). COVID (16.9) scores higher because the macro dislocation was genuinely broader: WTI collapsed −51% YoY, AUD/USD hit 0.618, and SPX drawdown was 30%.
The scenario engine evaluates nine macro scenarios simultaneously and computes a probability distribution across them. Rather than classifying the market into a single scenario, it quantifies the relative evidence for each — producing a ranked distribution that sums to 100%.
Each scenario is defined by a name, description, type (defensive or constructive), a set of 6–8 indicator signals, and associated asset class guidance. The nine scenarios are:
| Scenario | Type | Signals | Key indicators |
|---|---|---|---|
| USD Repricing / Debasement | Defensive | 8 | Treasury Liquidity, DXY, 30Y, Gold |
| Stagflation | Defensive | 8 | Gold, WTI, 10Y, Delinquencies, HY OAS |
| Hard Landing / Credit Crisis | Defensive | 8 | HY OAS, Bank CDS, VIX, Delinquencies |
| Classic Recession | Defensive | 8 | Delinquencies, Small/Large, VIX, HY OAS |
| Liquidity Crisis | Defensive | 7 | SOFR/OIS, Treasury Liquidity, VIX, HY OAS |
| Geopolitical Shock | Defensive | 8 | Geopolitical, WTI, Gold, VIX, AUD/USD |
| Deflation Scare | Defensive | 8 | 10Y, 30Y, WTI, Gold (low), HY OAS |
| Soft Landing | Constructive | 8 | VIX (low), HY OAS (tight), SPX above 200MA |
| Bull Run / Melt-Up | Constructive | 8 | VIX (low), Put/Call, Margin Debt, SPX YTD |
For each signal in a scenario, a continuous strength score s ∈ [−1, +1] is calculated. The strength reflects not just whether a threshold is crossed, but how extreme the reading is relative to its historical distribution. This is the key difference from a binary signal model.
The graduated status labels displayed on the Actions page correspond to strength ranges:
Each signal carries a weight reflecting its diagnostic importance for that scenario. The weighted average is computed across all signals in the scenario:
The average signal strength modulates a base rate prior via an exponential multiplier. The multiplier uses base 4, calibrated so that a perfectly confirming scenario (+1.0) quadruples the prior, while a perfectly contradicted scenario (−1.0) reduces it to one quarter.
The base rate is currently 10% (flat across all scenarios). This reflects the prior probability of any given scenario being dominant in the absence of evidence. As the historical observation dataset accumulates to 90+ entries, empirically-derived per-scenario base rates will be substituted.
Correlated scenarios share indicators. Without adjustment, shared indicators would contribute to multiple scenario scores simultaneously — inflating correlated pairs at the expense of independent scenarios. A two-pass adjustment is applied before normalisation:
After correlation adjustment, all nine scenario scores are normalised so they sum to exactly 100%, preserving relative ordering.
Probabilities are mapped to five qualitative labels. The 10% MODERATE threshold is the actionability boundary — the point at which a scenario warrants consideration in portfolio positioning. The probability bars on the Actions page use a logarithmic scale that visually emphasises this threshold.
| Label | Range | Interpretation |
|---|---|---|
| UNLIKELY | < 5% | Data actively contradicts scenario. Can be deprioritised. |
| LOW | 5 – 10% | Weak signal. Monitor but no action implied. |
| MODERATE | 10 – 20% | Actionability threshold. Scenario has material evidence. |
| ELEVATED | 20 – 35% | Strong signal. Portfolio implications should be considered. |
| HIGH | ≥ 35% | Dominant scenario. Evidence is overwhelming. |
The Portfolio Assessment tool applies the quantitative outputs of Sections 1 and 2 to a user-defined portfolio, generating a structured macro thesis. The assessment is grounded in live indicator data and current scenario probabilities — not in generic financial commentary.
The portfolio and Atlas context are passed to a structured inference chain (Google Gemini 2.5 Flash) with a schema-enforced output format. The AI is not used to retrieve data or predict markets. It is used as a structured reasoning engine — mapping quantitative regime signals to portfolio-level implications.
The chain produces three outputs:
1. Macro Thesis — A narrative characterisation of the portfolio's positioning relative to the current Atlas regime and the dominant scenario evidence. This is derived from the composite score, tier, and scenario probability distribution.
2. Scenario Stress-Map — For each holding, a structured analysis of its expected behaviour under the top-probability scenarios. This draws on the asset class guidance embedded in each scenario definition (e.g. "Gold: Primary currency hedge → Preserves purchasing power as USD devalues").
3. Verdict — An overall portfolio rating against the macro environment. How well does the current allocation align with the scenarios that current data most strongly supports?
The Portfolio Assessment is an analytical framing tool, not a financial recommendation system. It does not incorporate individual tax circumstances, liquidity constraints, liability matching, or specific investment objectives. It applies macro-level scenario logic — derived from public data — to portfolio-level composition. All outputs should be interpreted as context for informed decision-making, not as advice to buy, hold, or sell any security.
| Source | Data | Frequency |
|---|---|---|
| FRED (Federal Reserve) | Yields, OAS, delinquencies, liquidity, SNAP | Daily / Weekly / Quarterly |
| yfinance | VIX, FX, equity indices, gold, WTI, options | Daily |
| GPR Index (Caldara & Iacoviello) | Geopolitical risk index | Weekly (manual upload) |
| Google Custom Search API | 50 financial news domains for AI context | Per pipeline run |
| Google Gemini 2.5 Flash | AI commentary, scenario analysis, portfolio assessment | Per pipeline run |
The pipeline runs twice daily on US weekdays: at 6:00 AM ET (AM edition, pre-market) and 3:00 PM ET (PM edition, 90 minutes before close). Each run publishes a new composite score, scenario probability distribution, and AI commentary. Runs are orchestrated via GitHub Actions with OIDC authentication to AWS.
Base rate priors. Scenario probabilities currently use a flat 10% prior for all scenarios. The historical observation system is accumulating daily snapshots; once 90+ observations are recorded, empirically-derived per-scenario base rates will replace the flat prior, making the engine genuinely Bayesian.
Indicator availability constraints. Several indicators have limited historical coverage (HY OAS from 1996, SOFR from 2018, VIX from 1990, RUT from 1979). Pre-1990 calibration is therefore partial. The TEDRATE (TED spread) proxy is used for pre-2018 funding stress assessment.
Correlation matrix. The current scenario correlation structure is expert-specified rather than empirically derived. Once the historical observation dataset is sufficiently large, correlation coefficients will be estimated from observed scenario co-occurrence frequencies.
Earnings revision indicator. The EARNINGS_REVISION indicator is currently unimplemented (marked N/A). A systematic earnings revision momentum signal based on consensus estimate revisions is planned for a future release.
Outcome labelling. Historical observations are captured at T+0 but outcome labels (what actually happened at T+4, T+8, T+12 weeks) are not yet populated. Retroactive labelling is scheduled for Q3 2026, enabling formal backtesting of the scenario probability model.