Predicting future recessions

Interested in publishing a one-time post on R-bloggers.com? Press here to learn how.
Even if this sounds incredible, yes, we can predict future recessions using a couple of time series, some simple econometric models, and … R

The basic idea is that the slope of the yield curve is somewhat linked to the probability of future recessions. In other words, the difference between the short and the long term rate can be used as a tool for monitoring business cycles. Nothing new about that: Kessel (1965) documented the cyclical behavior of the yield spread, and he showed that the yield spread tended to decline immediately before a recession. This relationship is one of the most famous stylized facts among economists (see Figure 1).

Figure_1_FRED
Figure 1: The yield spread and recessions

– So, why people don’t use this model to predict recessions ?
– Well, it seems to be related to the fact that (i) they think it only used to work in the US (ii) they don’t feel to be qualified to run a sophisticated R code to estimate this relationship.

This post is about answering these two questions: (i) yes, the yield curve does signal recessions (ii) yes, it is easy to monitor economic cycles with R using the EWS package !

First, if you have some doubts about the predictive power of the yield spread, please have a look on Hasse and Lajaunie (2022)’s recent paper, published in the Quarterly Review of Economics and Finance. The authors – Quentin and I –  reexamine the predictive power of the yield spread across countries and over time. Using a dynamic panel/dichotomous model framework and a unique dataset covering 13 OECD countries over the period 1975–2019, we empirically show that the yield spread signals recessions. This result is robust to different econometric specifications, controlling for recession risk factors and time sampling. Main results are reported in Table 1.

Table_1
Table 1: Estimation of the predictive power of the yield spread (1975–2019)

– Wait, what does mean “dichotomous model” ?
– Don’t be afraid: the academic literature provides a specific econometric framework to predict future recessions.

Estrella and Hardouvelis (1991) and Kauppi and Saikkonen (2008) have enhanced the use of binary regression models (probit and logit models) to model the relationship between recession dummies (i.e., binary variables) and the yield spread (i.e., continuous variable). Indeed, classic linear regressions cannot do the job here. If you have specific issues about probit/logit models, you should have a look on Quentin’s PhD dissertation. He is a specialist in nonlinear econometrics.

Now, let’s talk about the EWS R package. In a few words, the package is available on the CRAN package repository and it includes data and code you need to replicate our empirical findings. So you only have to run a few lines of code to estimate the predictive power of the yield spread. Not so bad eh ?

Here is an example focusing on the US: first install and load the package, then we extract the data we need.
# Load the package
library(EWS)

# Load the dataset included in the package
data("data_USA") # Print the first six rows of the dataframe head(data_USA)
Well, now we just have to run these few lines:
# Data process
Var_Y <- as.vector(data_USA$NBER)
Var_X <- as.vector(data_USA$Spread)
# Estimate the logit regression
results <- Logistic_Estimation(Dicho_Y = Var_Y, Exp_X = Var_X, Intercept = TRUE, Nb_Id = 1, Lag = 1, type_model = 1)
# print results
print(results)
The results can be printed… and plotted ! Here is an illustration what you should have:

$Estimation
name Estimate Std.Error zvalue Pr
1 Intercept -1.2194364 0.3215586 -3.792268 0.0001492776
2 1 -0.5243175 0.2062655 -2.541955 0.0110234400
and then what you could plot:

Figure_2
Figure 2: The predictive power of the yield spread in the US (1999-2020)

Nice output, let’s interpret what we have. First the estimation results: the intercept is equal to -1.21 and high significant, and the lagged yield spread is equal to -0.52 and is also highly significant. This basic result illustrates the predictive power of the yield spread.

– But what does mean “1” instead of the name of the lagged variable ? And what if we choose to have another lag  ? And if we choose model 2 instead of model 1 ?
– “1” refers to the number associated to the lagged variable, and you can change the model or the number of lags via the function arguments:
$Estimation
name Estimate Std.Error zvalue Pr
1 Intercept 0.08342331 0.101228668 0.8241075 4.098785e-01
2 1 -0.32340655 0.046847136 -6.9034433 5.075718e-12
3 Index_Lag 0.85134073 0.003882198 219.2934980 0.000000e+00

Last but not least, you can choose the best model according to AIC, BIC or R2 criteria:

$AIC
[1] 164.0884
$BIC
[1] 177.8501
$R2
[1] 0.2182592

Everything you need to know about the predictive power of the yield spread is here. These in-sample estimations confirm empirical evidences from the literature for the US. And for those who are interested in out-of-sample forecasting… the EWS package provides what you need. I’ll write an another post soon !

References

Estrella, A., & Hardouvelis, G. A. (1991). The term structure as a predictor of real economic activity. The Journal of Finance46(2), 555-576.

Hasse, J. B., & Lajaunie, Q. (2022). Does the yield curve signal recessions? new evidence from an international panel data analysis. The Quarterly Review of Economics and Finance, 84, 9-22.

Hasse, J. B., & Lajaunie, Q. (2020). EWS: Early Warning System. 
R package version 0.1. 0.

Kauppi, H., & Saikkonen, P. (2008). Predicting US recessions with dynamic binary response models. The Review of Economics and Statistics90(4), 777-791.

Kessel, Reuben, A. “The Cyclical Behavior of the Term Structure of Interest Rates.” NBER Occasional Paper 91, National Bureau of Economic Research, 1965.

Published by

jb.hasse

I am an economist whose research covers macro and financial econometrics. I work as a researcher at the Aix-Marseille University and as a lecturer at the Université Catholique de Louvain where I teach Computational Finance and Financial Innovation respectively.

8 thoughts on “Predicting future recessions”

  1. Instead of looking at the individual 10y/2y or 10y/3m yield curves, I have found that looking at the number (or percent) of *all* inverted yield curve combinations gives a much clearer recession signal.

    There are currently 11 Treasury maturities [1, 3, and 6 months; 1, 2, 3, 5, 7, 10, 20, and 30 years], which yields 11*(11 – 1)/2 = 55 different yield curves. So measure all possible spreads, and graph the total number that are inverted on a given date. Since the number of Treasury maturities has changed over the years, graphing the percent of all inverted curves helps normalize it.

    Here is an chart I made that compares methods. Black is a threshold for “background noise”, red indicates the number of inverted yield curves signaling probable recession (only one false positive), and blue signals definite recession (at least within the datasets I have to base it on).

    https://i.imgur.com/o1GoTxl.png

    This method also lends itself to making a color palette, so that you can (for instance) graph the Fed rate, but color it according to the yield curve value to see how the yield curve inversion affects the Fed rate:

    https://i.imgur.com/qNLoAgM.png

    Here is a simple R version (black and white only) on my Github page:

    https://raw.githubusercontent.com/MetricT/R_Code/main/EconFinance/Num_Per_Inverted_Yield_Curves.R

    I am hoping to eventually integrate some older FRED data to allow earlier dates. It is possible to graph the 10y/3m yield curve back to 1870 using a combination of FRED data series [“TB3MS”, “M1329AUSM193NNBR”, “M13002US35620M156NNBR”] and the 10-year bond yield data on Robert Shiller’s website [http://www.econ.yale.edu/~shiller/data/ie_data.xls, the “long interest rate” column]. The result:

    https://i.imgur.com/w7le276.png

    I am hoping to extend the data between 1930 – 1980 using some older data series from FRED, but that’s still a work-in-progress.

    1. Thanks for your sharing your thoughts. The package used in this post is linked to one of my paper recently published (Hasse and Lajaunie, 2022). When choosing variables to include in our model, we followed the literature (e.g., Nyberg, 2010 ; Ng, 2012). Our modest contribution is to revisit the predictive power of the yield spread in a panel setting with a clustering approach to question the homogeneity of the predictive power of the yield spread across countries. Of course the package can be used to forecast only ! And other variables can be used.

      References:

      – Hasse, J. B., & Lajaunie, Q. (2022). Does the yield curve signal recessions? new evidence from an international panel data analysis. The Quarterly Review of Economics and Finance.

      – Ng, E. C. (2012). Forecasting US recessions with various risk factors and dynamicprobit models. Journal of Macroeconomics, 34(1), 112–125.

      – Nyberg, H. (2010). Dynamic probit models and financial variables in recessionforecasting. Journal of Forecasting, 29(1–2), 215–230.

  2. You mention that the EWS-package include resources for out-of-sample forecasting, are they included in the current version?

    I’m looking for the specific way to implement and carry out h-period ahead forecasts for the recession probability using an iterative approach and probit models in R. Ultimately, I would analyse out-of-sample performance of both static and dynamic probit models? Are you able to point me in direction of any usable R-packages or specific coding examples.
    Thank you in advance!

    1. Thanks for your message ! Currently, the EWS package does not include specific functions for out-of-sample forecasting. A few days ago, my co-author Quentin developed a couple of functions to deal with (pseudo) out-of-sample forecasting. But you can’t expect these functions being included in an updated version of the package before the beginnng of the summer. This said, if you restrict your econometric framework to Kauppi and Saikkonen (2008)‘s models 1 and 2 (those without the index), then you should maybe use the glm function.

  3. Dont know if my previous comment got published. I’m looking for a way to estimate out-of-sample multi-period forecast for the recession indicator in R with a probit model. You mention that the EWS package also has resources for this, though I cannot seem to locate it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.