IDEAS home Printed from
   My bibliography  Save this paper

Machine Learning, the Treasury Yield Curve and Recession Forecasting


  • Michael Puglia
  • Adam Tucker


We use machine learning methods to examine the power of Treasury term spreads and other financial market and macroeconomic variables to forecast US recessions, vis-à-vis probit regression. In particular we propose a novel strategy for conducting cross-validation on classifiers trained with macro/financial panel data of low frequency and compare the results to those obtained from standard k-folds cross-validation. Consistent with the existing literature we find that, in the time series setting, forecast accuracy estimates derived from k-folds are biased optimistically, and cross-validation strategies which eliminate data "peeking" produce lower, and perhaps more realistic, estimates of forecast accuracy. More strikingly, we also document rank reversal of probit, Random Forest, XGBoost, LightGBM, neural network and support-vector machine classifier forecast performance over the two cross-validation methodologies. That is, while a k-folds cross-validation indicates tha t the forecast accuracy of tree methods dominates that of neural networks, which in turn dominates that of probit regression, the more conservative cross-validation strategy we propose indicates the exact opposite, and that probit regression should be preferred over machine learning methods, at least in the context of the present problem. This latter result stands in contrast to a growing body of literature demonstrating that machine learning methods outperform many alternative classification algorithms and we discuss some possible reasons for our result. We also discuss techniques for conducting statistical inference on machine learning classifiers using Cochrane's Q and McNemar's tests; and use the SHapley Additive exPlanations (SHAP) framework to decompose US recession forecasts and analyze feature importance across business cycles.

Suggested Citation

  • Michael Puglia & Adam Tucker, 2020. "Machine Learning, the Treasury Yield Curve and Recession Forecasting," Finance and Economics Discussion Series 2020-038, Board of Governors of the Federal Reserve System (U.S.).
  • Handle: RePEc:fip:fedgfe:2020-38
    DOI: 10.17016/FEDS.2020.038

    Download full text from publisher

    File URL:
    Download Restriction: no

    File URL:
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item

    References listed on IDEAS

    1. Fornari, Fabio & Lemke, Wolfgang, 2010. "Predicting recession probabilities with financial variables over multiple horizons," Working Paper Series 1255, European Central Bank.
    2. Andreas Joseph, 2019. "Parametric inference with universal function approximators," Papers 1903.04209,, revised Oct 2020.
    3. Quinn McNemar, 1947. "Note on the sampling error of the difference between correlated proportions or percentages," Psychometrika, Springer;The Psychometric Society, vol. 12(2), pages 153-157, June.
    4. Fornaro, Paolo, 2015. "Forecasting U.S. Recessions with a Large Set of Predictors," MPRA Paper 62973, University Library of Munich, Germany.
    5. Serena Ng, 2014. "Viewpoint: Boosting Recessions," Canadian Journal of Economics, Canadian Economics Association, vol. 47(1), pages 1-34, February.
    6. Aruoba, S. BoraÄŸan & Diebold, Francis X. & Scotti, Chiara, 2009. "Real-Time Measurement of Business Conditions," Journal of Business & Economic Statistics, American Statistical Association, vol. 27(4), pages 417-427.
    7. Liu, Weiling & Moench, Emanuel, 2016. "What predicts US recessions?," International Journal of Forecasting, Elsevier, vol. 32(4), pages 1138-1150.
    8. Wei-Yin Loh, 2014. "Fifty Years of Classification and Regression Trees," International Statistical Review, International Statistical Institute, vol. 82(3), pages 329-348, December.
    9. Benjamin H Cohen & Peter Hördahl & Dora Xia, 2018. "Term premia: models and some stylised facts," BIS Quarterly Review, Bank for International Settlements, March.
    10. Peter Johansson & Andrew C. Meldrum, 2018. "Predicting Recession Probabilities Using the Slope of the Yield Curve," FEDS Notes 2018-03-01-3, Board of Governors of the Federal Reserve System (U.S.).
    11. Marcelle Chauvet & Simon Potter, 2005. "Forecasting recessions using the yield curve," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 24(2), pages 77-103.
    12. Tashman, Leonard J., 2000. "Out-of-sample tests of forecasting accuracy: an analysis and review," International Journal of Forecasting, Elsevier, vol. 16(4), pages 437-450.
    13. Markus Holopainen & Peter Sarlin, 2017. "Toward robust early-warning models: a horse race, ensembles and model uncertainty," Quantitative Finance, Taylor & Francis Journals, vol. 17(12), pages 1933-1963, December.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Vrontos, Spyridon D. & Galakis, John & Vrontos, Ioannis D., 2021. "Modeling and predicting U.S. recessions using machine learning techniques," International Journal of Forecasting, Elsevier, vol. 37(2), pages 647-671.
    2. Christiansen, Charlotte & Eriksen, Jonas N. & Møller, Stig V., 2019. "Negative house price co-movements and US recessions," Regional Science and Urban Economics, Elsevier, vol. 77(C), pages 382-394.
    3. Davig, Troy & Hall, Aaron Smalter, 2019. "Recession forecasting using Bayesian classification," International Journal of Forecasting, Elsevier, vol. 35(3), pages 848-867.
    4. Philippe Goulet Coulombe & Maxime Leroux & Dalibor Stevanovic & Stéphane Surprenant, 2022. "How is machine learning useful for macroeconomic forecasting?," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 37(5), pages 920-964, August.
    5. Chauvet, Marcelle & Potter, Simon, 2013. "Forecasting Output," Handbook of Economic Forecasting, in: G. Elliott & C. Granger & A. Timmermann (ed.), Handbook of Economic Forecasting, edition 1, volume 2, chapter 0, pages 141-194, Elsevier.
    6. Pierdzioch Christian & Gupta Rangan, 2020. "Uncertainty and Forecasts of U.S. Recessions," Studies in Nonlinear Dynamics & Econometrics, De Gruyter, vol. 24(4), pages 1-20, September.
    7. Knut Lehre Seip & Dan Zhang, 2021. "The Yield Curve as a Leading Indicator: Accuracy and Timing of a Parsimonious Forecasting Model," Forecasting, MDPI, vol. 3(2), pages 1-16, May.
    8. Marius M. Mihai, 2020. "Do credit booms predict US recessions?," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 39(6), pages 887-910, September.
    9. Harri Pönkä & Markku Stenborg, 2020. "Forecasting the state of the Finnish business cycle," Finnish Economic Papers, Finnish Economic Association, vol. 29(1), pages 81-99, Spring.
    10. Moench, Emanuel & Stein, Tobias, 2021. "Equity premium predictability over the business cycle," CEPR Discussion Papers 16357, C.E.P.R. Discussion Papers.
    11. Döpke, Jörg & Fritsche, Ulrich & Pierdzioch, Christian, 2017. "Predicting recessions with boosted regression trees," International Journal of Forecasting, Elsevier, vol. 33(4), pages 745-759.
    12. Le Mezo, Helena & Ferrari Minesso, Massimo, 2021. "Text-based recession probabilities," Working Paper Series 2516, European Central Bank.
    13. Nissilä, Wilma, 2020. "Probit based time series models in recession forecasting – A survey with an empirical illustration for Finland," BoF Economics Review 7/2020, Bank of Finland.
    14. Ana B. Galvão & Michael T. Owyang, 2020. "Forecasting Low Frequency Macroeconomic Events with High Frequency Data," Working Papers 2020-028, Federal Reserve Bank of St. Louis, revised Apr 2022.
    15. Liu, Weiling & Moench, Emanuel, 2016. "What predicts US recessions?," International Journal of Forecasting, Elsevier, vol. 32(4), pages 1138-1150.
    16. B. De Backer & M. Deroose & Ch. Van Nieuwenhuyze, 2019. "Is a recession imminent? The signal of the yield curve," Economic Review, National Bank of Belgium, issue i, pages 69-93, June.
    17. Lauri Nevasalmi, 2022. "Recession forecasting with high‐dimensional data," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 41(4), pages 752-764, July.
    18. Huiwen Lai & Eric C. Y. Ng, 2020. "On business cycle forecasting," Frontiers of Business Research in China, Springer, vol. 14(1), pages 1-26, December.
    19. Shuping Shi & Peter C. B. Phillips & Stan Hurn, 2018. "Change Detection and the Causal Impact of the Yield Curve," Journal of Time Series Analysis, Wiley Blackwell, vol. 39(6), pages 966-987, November.
    20. Dongfeng Chang & Ryan S. Mattson & Biyan Tang, 2019. "The Predictive Power of the User Cost Spread for Economic Recession in China and the US," IJFS, MDPI, vol. 7(2), pages 1-12, June.

    More about this item


    Shapley; Probit; XGBoost; Treasury yield curve; neural networks; LightGBM; Recession; Tree ensemble; Support-vector machine; Random forest;
    All these keywords.

    JEL classification:

    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • C53 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Forecasting and Prediction Models; Simulation Methods
    • E37 - Macroeconomics and Monetary Economics - - Prices, Business Fluctuations, and Cycles - - - Forecasting and Simulation: Models and Applications

    NEP fields

    This paper has been announced in the following NEP Reports:


    Access and download statistics


    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:fip:fedgfe:2020-38. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: . General contact details of provider: .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Ryan Wolfslayer ; Keisha Fournillier (email available below). General contact details of provider: .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.