Skip to content
← Projects

rates · regimes · python

TERMO

Treasury Environment & Regime MOnitor: a weekly reading of which phase the U.S. Treasury curve is in, how confident the reading is and which moves drive it. A thermometer for an investment committee: it describes the curve and does not forecast it.

https://github.com/alanvaa06/TERMO ↗

Overview

A weekly context tool for an investment committee. It tells which phase the U.S. Treasury curve is in, how confident the reading is, and which moves drive it, and it shows how past phases looked. It describes the recent past of the curve. It does not forecast yields and does not issue trade orders.

How it works

  • Data: daily Treasury yields for seven tenors from FRED, since 1977. Each run works on a hash-checked snapshot, so any reading can be rebuilt.
  • Variables: 139 per day, each one ranking a recent move, slope, curvature or volatility against the last 6 or 12 months. Every variable uses only days up to the one it describes.
  • Phases: a statistical jump model groups days into three phases (strong rally, moderate rally, sell-off) and penalises switching, so a phase lasts weeks or months.
  • Confidence and drivers: an XGBoost surrogate reproduces the phase; its probability is the confidence, and SHAP splits the reading into six blocks so the committee sees what pushes it.
  • Deliverable: a weekly sheet, five CSV files and a self-contained HTML report.

What the evidence says

Two registered experiments (62 trials) found that the phases do not anticipate the 10-year yield better than inertia. So TERMO is descriptive only, and every deliverable says so. The holdout was used once and is spent; only the shadow readings can validate the phase names now.

Stack

Python · statistical jump model · XGBoost · SHAP · Plotly · FRED.

Status

Running in shadow mode since 2026-10-02: one reading per week, logged with the model frozen. The first shadow evaluation is due after 26 weeks.

GitHub →