Back to Portfolio
Live Demo

RecessionRadar

A yield-curve recession model that estimates the probability of a U.S. recession within 12 months — fit on 40+ years of Federal Reserve data and backtested against every downturn since 1982.

Next.js
TypeScript
Recharts
FRED API
Logistic Regression
Tailwind CSS

0.80

Backtest AUC

1982–present

12 mo

Forecast horizon

look-ahead

522

Months of data

training sample

7%

Base rate

unconditional

What it does

The inverted yield curve is the most reliable recession signal in modern macroeconomics. This tool operationalizes the classic Estrella–Mishkin approach: it fits a logistic regression from the 10-year-minus-3-month Treasury spread to the probability of an NBER recession twelve months out, then exposes the model live — a headline probability, an interactive fit curve, a 40-year backtest, and seven corroborating indicators shown as honest context.

How it was built

One fitted model, everywhere

A logistic regression maps the 10Y–3M Treasury term spread to a 12-month recession probability. The same fitted curve produces the headline number and the 40-year backtest, so they can never disagree.

Backtested against every recession

The probability line is plotted from 1982 to today against NBER recession bands — you can see it rise ahead of 1990, 2001, and 2008 rather than take the claim on faith.

Correct, live FRED data

Seven indicators pulled live from the St. Louis Fed, each scaled to its true units — including a properly implemented Sahm Rule and a high-yield spread read in percent, not mislabeled basis points.

Reproducible training pipeline

A committed Node script re-fetches FRED data, fits the coefficients via Newton–Raphson, and bakes the backtest. Anyone can reproduce the model and its metrics from source.

Honest about its limits

The model card reports AUC, McFadden R², and Brier score, and states plainly that the fit is in-sample and blind to exogenous shocks like 2020.

A note on rigor

This is a rebuild that prioritizes correctness over impressive-sounding claims. The previous version advertised machine learning and a weighted eight-indicator composite that included a discontinued series and a mis-scaled credit spread. This version fits a real, reproducible model, reports its metrics and limitations, and shows its work.

The model

P = σ(-1.79 0.80·spread)

MethodLogistic regression
Predictor10Y–3M spread
FitNewton–Raphson
McFadden R²0.12
Brier score0.062

Skills demonstrated

Statistical Modeling
Time-Series
Data Engineering
Data Viz
API Integration
Reproducibility

See it live

Real-time FRED data, the interactive fit curve, and the full backtest.

Launch dashboard