Table of Contents
Fetching ...

Deep Learning in the Sequence Space

Marlon Azinovic-Yang, Jan Žemlička

Abstract

We develop a deep learning algorithm for constructing globally accurate approximations to functional rational expectations equilibria of dynamic stochastic economies in the sequence space. We use deep neural networks to parameterize key equilibrium objects, such as policies or prices, as functions of truncated histories of exogenous shocks. We train the neural networks to satisfy equilibrium conditions along simulated paths of the economy. We illustrate the performance of our method in three environments: (i) a high-dimensional overlapping generations economy with multiple sources of aggregate risk; (ii) an economy with heterogeneous households and firms facing uninsurable idiosyncratic risk and large shocks to idiosyncratic and aggregate volatility; and (iii) a stochastic life-cycle economy with a continuous asset choice and a discrete early-retirement choice that induces local convexities in the continuation values of working-age cohorts. We also propose practical neural policy architectures that guarantee monotonicity of predicted policies, enabling the endogenous grid method to simplify parts of the algorithm. We achieve high precision throughout, with the mean error in equilibrium conditions below $0.2\%$.

Deep Learning in the Sequence Space

Abstract

We develop a deep learning algorithm for constructing globally accurate approximations to functional rational expectations equilibria of dynamic stochastic economies in the sequence space. We use deep neural networks to parameterize key equilibrium objects, such as policies or prices, as functions of truncated histories of exogenous shocks. We train the neural networks to satisfy equilibrium conditions along simulated paths of the economy. We illustrate the performance of our method in three environments: (i) a high-dimensional overlapping generations economy with multiple sources of aggregate risk; (ii) an economy with heterogeneous households and firms facing uninsurable idiosyncratic risk and large shocks to idiosyncratic and aggregate volatility; and (iii) a stochastic life-cycle economy with a continuous asset choice and a discrete early-retirement choice that induces local convexities in the continuation values of working-age cohorts. We also propose practical neural policy architectures that guarantee monotonicity of predicted policies, enabling the endogenous grid method to simplify parts of the algorithm. We achieve high precision throughout, with the mean error in equilibrium conditions below .

Paper Structure

This paper contains 102 sections, 112 equations, 14 figures, 7 tables.

Figures (14)

  • Figure 1: Loss function when training the neural network for $\approx$40,000 episodes to solve the brock_1972 model. The loss function is the mean squared error in the equilibrium conditions of the model, each episode consists of 4096 simulated states.
  • Figure 2: The left panel shows the distribution of errors in the optimality condition (equation \ref{['eq:ree_bm']}) in % on 4096 simulated states after training the neural network. The solid vertical line shows the mean error, the dashed vertical line shows the 99th percentile of errors and the vertical dotted line shows the 99.9th percentile of errors. The middle panel compares the policy learned by the neural network (round dots) to the policy solved for with a conventional grid-based method. The right panel shows the distribution of errors when comparing the policy learned by the neural network to the policy solved with a conventional method.
  • Figure 3: The left panel shows the final level of errors in the equilibrium conditions achieved by our training procedure. The dotted line shows the 99.9th percentile, the dash-dotted line the 90th percentile, and the solid line shows the mean. The red lines show the errors in the optimality conditions for capital for each age group, and the blue lines show the errors in the optimality conditions for the bonds. The middle panel shows the distribution of assets over the simulated ergodic set of states. The right panel shows the resulting consumption by age group. The blue lines in the right panel show consumption conditional on the economy being in the normal state, and the red lines show consumption statistics conditional on the economy being in the disaster state.
  • Figure 4: Remaining errors in the equilibrium conditions for the firm problem. The left panel shows the errors in the firms' Euler equations and the right panel shows the errors in the remaining KKT conditions.
  • Figure 5: Remaining errors in the equilibrium conditions for the households' optimality conditions, expressed in units of relative consumption errors.
  • ...and 9 more figures