Independent project · 2026
FX Regime Radar
A weather station for currency markets.
0:25- 0.548PR-AUC on the frozen test, against a 0.162 base rate
- 91.6%empirical coverage of the 90% conformal band
- SHA-256every forecast hash-chained before its outcome exists
- 391 + 87Python and Rust tests, run on every push
A daily pipeline that names the market regime for EUR/USD, USD/CHF and GBP/USD, forecasts the risk that it changes and flags unusual days. It never predicts price direction, by design.
The idea
Most FX models try to guess the price. This one names the weather instead: is the market calm, trending, choppy or in crisis, and how likely is that to change this week?
Three models, three questions
Every weekday a pipeline downloads daily prices, computes strictly backward-looking features and runs three small models.
- Nowcast. A four-state hidden Markov model reports the current regime, using filtered probabilities only, never smoothed ones.
- Forecast. A calibrated XGBoost classifier estimates the five-day risk that the regime changes, with SHAP explanations and a conformal error band on every number.
- Detect. A small autoencoder raises a siren on days that look unlike any calm day it has seen.
A Bayesian changepoint detector and a simple volatility rule vote alongside the HMM, and each forecast shows how many of the three agree. A short language-model call then narrates the computed numbers in plain English. It is tested to refuse questions about price direction.
Built so it can be checked
The interesting part is not the models but the evidence.
- A frozen test, scored once. On data from 2019 onward the forecaster reaches a PR-AUC of 0.548 against a base rate of 0.162.
- A live forward record. Each forecast is appended to a hash-chained ledger before the outcome exists and resolved five trading days later. Nothing is ever edited.
- No look-ahead. Every feature passes a truncation-invariance test.
- Two implementations. A Rust engine replays golden vectors and matches the Python pipeline to 1e-6.
It is an educational tool, not investment advice.