Datasets
The recession panel
Will a recession begin in the United States within the next twelve months?
The file, and the notebooks that read it
data
folder beside the notebook. Every notebook reads data/recession_panel.csv
and is run from its own folder.What this data answers
It is used on Day 3 to show what an evaluation split decides. The same model looks skilful under one split and worse than a flat guess under another.
Dataset overview
| Question | Will a recession begin in the United States within the next twelve months? |
| Observation | One month, from January 1982 to May 2025. |
| Target | rec_in_12m. 1 if a recession begins within the next twelve months. |
| Inputs | T10Y3M, T10Y2Y, UNRATE |
| Size | 521 rows and 6 columns. |
| Held back | USREC, the contemporaneous indicator, which the target is derived from. |
How the rows are divided
The file carries no split column, because Day 3's point is that the split is the result. Two designs are built in the notebook: shuffled five-fold folds, and a calendar split that fits up to December 2008, leaves the whole of 2009 unused, and judges from January 2010. The twelve-month gap is not optional: a month's label is not observable until a year later.
Data dictionary
Every column in recession_panel.csv. The
fourth column is the one to read before modelling: a variable that is not
known when the prediction is needed cannot be used, however well it
predicts.
| Column | Type | What it means | When is this known? |
|---|---|---|---|
date | date (YYYY-MM-DD) | First day of the month. | The observation date. |
T10Y3M | number, points | Ten-year Treasury yield minus the three-month yield. | Known during the month itself. |
T10Y2Y | number, points | Ten-year Treasury yield minus the two-year yield. | Known during the month itself. |
UNRATE | number, per cent | Civilian unemployment rate. | Published a few weeks after the month ends. |
USREC | number | 1 if the NBER dates this month inside a recession. | Dated by the NBER long afterwards, sometimes by a year or more. |
rec_in_12m | 0 or 1 (target) | 1 if a recession begins within twelve months. | NOT OBSERVABLE UNTIL A YEAR LATER. This is why a calendar split needs a twelve-month gap. |
Source and preparation
The source is Federal Reserve Bank of St. Louis, FRED series T10Y3M, T10Y2Y, UNRATE and USREC, frozen monthly panel, released under Public United States government series. Recession months are dated by the National Bureau of Economic Research.
The four published series were aligned to month ends and one column was derived.
| Step | Rows left | Why |
|---|---|---|
| Monthly observations, January 1982 to May 2025 | 521 | |
| Months followed by a recession within a year | 36 | 6.9 per cent of the panel |
The judged window of a calendar split holds only two recession months out of 185, which is why Day 3 treats that result as illustrative rather than as a durable estimate.
What this data does not establish
- 36 positive months in 43 years is a small number of events. Any score computed on a subset of them is unstable.
- Shuffling the months surrounds a judged month with fitting months from both before and after it, which measures interpolation, not forecasting.
- Yields and unemployment moving together with recessions is not evidence that either causes one.
Where it is used
- Day 3. Day 3 uses it to compare a shuffled split with a calendar split on the same data.