Recurrent Neural Networks for Recession Forecast

 4 years ago
source link: https://www.tuicool.com/articles/MVJnmqb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Recurrent Neural Networks for Recession Forecast


It is widely discussed that the US economy will face another recession in coming years. The question is when and how it will occur. We have seen a decade of economic expansion but it will not last forever. In this article I will try a basic Recurrent Neural Network (RNN) model to foresee how the US economy will grow, or possibly shrink in the near future.


You may know that we have had not many recession periods in the past few decades, the most recent one being after the Global Financial Crisis of 2008. It can be a hurdle for any machine/deep learning classifier models. One of the definitions of recession is “two consecutive quarters with negative economic growth” thus a regression model to estimate GDP growth should suffice the purpose. Furthermore, with the potential GDP being rather stable, cyclical factor in GDP growth, i.e. the output gap, would be a good target for a regressor model.

This is a time-series analysis and for its autoregressive nature, RNN is one of the most appropriate tools. I used major macroeconomic and financial variables from Federal Reserve Economic Data ( FRED ), provided by the Research division of the Federal Reserve Bank of St. Louis, since the late 1970’s and resampled them into weekly frequency. The input into the RNN model comprises 30 top principal components with 52 time steps of a week i.e. one year. The target here is the output gap of 6-month advance.

Models -LSTM Layers

I started with a simple model with two Long Short-Term Memory (LSTM) layers.

regressor = Sequential()


Following figure depicts the model predictions for ten times of trials. It is obvious that the predictions fluctuate too much to say the model is reliable.

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK