Quantitative Models
Three quantitative systems extract structure from raw data: a Dynamic Factor Model reduces 107 series to latent factors, a Hamilton regime filter detects normal vs. stress environments, and a bilateral stress tensor quantifies real-time geopolitical risk.
Dynamic Factor Model
Monitoring 107 individual series is intractable for real-time decision making. The Dynamic Factor Model compresses these into K latent factors that capture the dominant co-movement patterns in the macro economy. This is the same class of model used by central banks (the Federal Reserve Bank of New York’s Nowcast model is a prominent example) for real-time economic monitoring.
Observation: y_t = Λ · f_t + e_t
107 observed series = loadings × K factors + idiosyncratic noise
State: f_t = Φ · f_(t-1) + u_t
Factors evolve as AR(1) with transition matrix Φ and process noise Q
Noise: e_t ~ N(0, R_diagonal), u_t ~ N(0, Q)
Measurement noise is diagonal (series-specific); process noise captures factor co-movement
PCA Initialisation
Standardise the 107 macro series panel (handling missing values). Eigendecompose the correlation matrix. Select factor count K via Kaiser criterion (eigenvalue > 1) or manual override. Apply varimax rotation for interpretability. Verify orthogonality of rotated factors.
Multi-Start EM Estimation
Run 5 independent EM trajectories from perturbed PCA loadings to avoid local optima. Each trajectory: E-step via UD Kalman filter (forward pass) and RTS smoother (backward pass), then M-step with closed-form updates for loadings (Λ), transition (Φ), process noise (Q), and measurement noise (R). Convergence tolerance: 1e-6 on relative log-likelihood change. Select trajectory with highest log-likelihood.
Monthly Re-Estimation
Full re-estimation triggers when no estimate exists or the latest is >28 days old. Uses 60+ days of lookback data. The new FactorModelEstimate is stored in the database, preserving the previous estimate for comparison.
Daily Kalman Filter
Each day after macro data ingestion: take the previous factor state, time-update through the transition matrix Φ with process noise Q, then measurement-update with today's 107 data points using the loadings matrix H. Includes robust outlier detection — innovations exceeding 3.5σ trigger inflated measurement noise to downweight the anomalous observation.
- —Daily Factor Scores: K-dimensional state vector capturing macro dynamics
- —Factor Loadings: which series load on which factors (economic interpretation)
- —Smoothed Covariances: uncertainty around factor estimates
- —Innovation Diagnostics: which series surprised vs. the model's expectation
UD Kalman Filter
Standard Kalman filter implementations can suffer from numerical instability — round-off errors accumulate and the covariance matrix can lose positive semi-definiteness, producing nonsensical results. Convex uses the Bierman-Thornton UD factorisation: the covariance matrix P is always stored as P = UDU’ where U is unit upper-triangular and D is diagonal. This guarantees positive semi-definiteness by construction.
The UD filter also includes robust outlier detection: when the standardised innovation (prediction error / expected variance) for an observation exceeds 3.5σ, the measurement noise for that observation is inflated quadratically. This downweights the anomalous data point without discarding it entirely — a single bad print from FRED will not corrupt the factor estimates.
The backward pass uses the Rauch-Tung-Striebel (RTS) smoother, which produces optimal state estimates conditional on all available data (not just data up to time t). This is used during EM re-estimation, not for real-time daily updates.
Hamilton Regime Detection
A 2-state Markov-switching modelon factor scores identifies whether the macro economy is in a “normal” or “stress” regime. Each regime has its own conditional mean and covariance — stress regimes typically show lower factor means (contraction) and higher factor variance (uncertainty).
The regime probability is not a binary switch. The Hamilton filter outputs a continuous probability P(Stress | all data) that can range from 0% to 100%. This probability feeds into the scenario evidence model, where it modulates metric sensitivity — during high stress probability, escalatory scenarios receive amplified evidence weights.
| Parameter | Specification |
|---|---|
| State Space | 2 states: Normal (S=0) and Stress (S=1) |
| Observation Model | Factor scores | State ~ N(μ_state, Σ_state) — each regime has its own mean vector and covariance |
| Transition | 2×2 Markov transition matrix with 1% floor to prevent absorbing states |
| Estimation | EM algorithm: Hamilton forward filter (prediction + likelihood update) → Kim backward smoother for smoothed probabilities |
| Convergence | 1e-6 relative log-likelihood change, max 100 iterations |
| Initialisation | Regime 0 = below-median factor observations, Regime 1 = above-median |
- —Smoothed regime probabilities: P(Normal | all data), P(Stress | all data)
- —Transition probabilities: P(Normal → Stress), P(Stress → Normal)
- —Regime-conditional means and variances for each factor
- —Regime classification fed to scenario evidence weighting
Bilateral Stress Tensor
Traditional geopolitical risk indices (GPR, WUI) provide a single global number. Convex’s bilateral stress tensor measures pairwise country-to-country stress from GDELT event data, decomposed into military, economic, and diplomatic channels. This granularity matters: a US-China trade escalation and a Russia-Ukraine military escalation have completely different market transmission mechanisms.
Country pairs are organised into priority tiers. Tier 1 pairs (US-China, US-Russia, Russia-Ukraine, etc.) are computed daily; lower tiers on extended schedules.
Military
CAMEO 138–175, 180–211
Weapons deployment, violence, cyber attacks, military exercises, troop movements. Highest weight due to direct market impact.
Economic
Sanctions, trade restrictions, financial coercion events
Economic warfare: sanctions packages, trade restrictions, asset freezes, financial system exclusion. Direct transmission to currency and commodity markets.
Diplomatic
CAMEO 046, 112, statements, agreements, negotiations
Statements, diplomatic engagement, treaty negotiations, institutional actions. Lower weight as diplomatic activity is higher-volume and lower-impact per event.
Beyond the composite stress score, Convex tracks the velocity (daily change) and acceleration(change in velocity, second derivative) of bilateral stress. Alerts trigger on 3σ velocity extremes — a sudden acceleration in bilateral stress that is statistically unusual given the pair’s own history.
Model Health & Monitoring
Quantitative models degrade over time as the data-generating process changes. Convex runs five continuous monitoring systems to detect model degradation before it affects published analysis.
Eigenvalue Crisis Monitor
Tracks principal component variance shares over time. During crises, correlations converge and the first eigenvalue captures an outsized share of variance — a diagnostic for "correlations going to 1" events that challenge normal-regime assumptions.
Transfer Entropy
Measures directed information flow between macro series. Identifies which variables are leading vs. lagging, and whether causal structure is shifting. A sudden change in transfer entropy topology signals a regime transition that may not yet appear in level data.
Forecast Benchmarking
DFM forecasts are benchmarked against a simple AR(1) baseline using the Diebold-Mariano test for forecast superiority. If the DFM underperforms the naive baseline, it signals model degradation.
Proper Scoring Rules
Regime probability forecasts are evaluated with Brier scores, log scores, and Brier Skill Score (BSS). These ensure the model is well-calibrated — assigning 70% regime probability should correspond to that regime occurring roughly 70% of the time.
Factor Alignment Scoring
After each re-estimation, new factors are compared against previous factors for alignment. Large rotation between estimations may indicate structural break rather than normal parameter drift.
Integration with article generation: Model health metrics (DFM log-likelihood, regime classification confidence, Brier skill score) are attached to every generated scenario article. If model health falls below thresholds, articles are flagged for editorial review before publication.
These quantitative models form one half of a dual-brain architecture. An LLM handles creative pattern recognition — spotting novel configurations the Bayesian engine would miss. The Bayesian engine provides calibrated probability discipline — preventing the LLM from inventing wild numbers. Where the two disagree by more than 10 percentage points, that divergence is surfaced as an analytical signal.
How the Scenario Engine integrates both →