← Back to Work

Case Study — Deep Learning · Finance

Treasury Yield Regime Forecasting

Does knowing what the Fed is doing make yield forecasts better?

PyTorchLSTMTransformerCNNFRED

0.91

R², domain-informed hybrid model

0.88

R², enhanced LSTM

4

Architectures compared: FNN, CNN, LSTM, Transformer

10 yrs

Daily FRED macro & market data

// The Question

The 10-Year U.S. Treasury yield anchors mortgage rates, corporate borrowing costs, and equity valuations. Most ML forecasting treats it as just another time series. This project asks: do deep learning models forecast the 10Y yield better when they explicitly know what monetary-policy regime the Fed is in?

// The Data

A decade of daily series from FRED (Federal Reserve Economic Data). Engineered features include yield-curve spreads (10Y–2Y, 10Y–3M), moving averages, momentum, rolling 20-day volatility, and lags — plus regime labels classifying each day as easing, stable, or tightening based on effective-Fed-funds-rate changes (±5 bps over 60 days).

// The Approach

  • Four architectures in PyTorch: a feed-forward network, a temporal CNN with parallel 1D kernels (sizes 2/3/5), a bidirectional LSTM, and a Transformer encoder
  • Strictly chronological train/validation/test splits (70/15/15) with standardization fit on the training window only — no lookahead
  • A domain-informed hybrid model combining the neural forecasts with monetary-policy structure
  • Shock simulations: additive Fed-funds and CPI shocks propagated through the models to test economic sensitivity

// Results

The enhanced LSTM reaches R² ≈ 0.877 out-of-sample, and the domain-informed hybrid pushes that to R² ≈ 0.913, outperforming every pure deep learning baseline. Regime-awareness measurably improves robustness across easing, stable, and tightening environments. The shock simulations found the 10Y yield more sensitive to CPI surprises than to equal-sized Fed-funds shocks — consistent with the market pricing inflation expectations over policy mechanics.

// The Honest Caveat

High R² does not mean the models can trade. Directional accuracy peaked near ~35% — the models track the level of yields well while remaining poor at calling tomorrow's direction. That gap between level accuracy and directional signal is itself one of the project's core findings, and a Bayesian LSTM variant was added to provide well-calibrated uncertainty intervals rather than overconfident point forecasts.