How to solve dynamic stochastic models computing expectations just once - Kenneth L. Judd; Lilia Maliar; Serguei Maliar; Inna Tsener (Quantitative Economics, 2017)
We introduce a computational technique- precomputation of integrals - that makes it possible to construct conditional expectation functions in dynamic stochastic models in the initial stage of a solution procedure. This technique is very general: it works for a broad class of approximating functions, including piecewise polynomials; it can be applied to both Bellman and Euler equations; and it is compatible with both continuous-state and discrete-state shocks. In the case of normally distributed shocks, the integrals can be constructed in a closed form. After the integrals are precomputed, we can solve stochastic models as if they were deterministic. We illustrate this technique using one- and multi-agent growth models with continuous-state shocks (and up to 60 state variables), as well as Aiyagari's ( 1994) model with discrete-state shocks. Precomputation of integrals saves programming efforts, reduces computational burden, and increases the accuracy of solutions. It is of special value in computationally intense applications. MATLAB codes are provided.
Keywords: C61; C63; C68; 330; Dynamic model; precomputation; numerical integration; dynamic programming; value function iteration; Bellman equation; Euler equation; envelope condition method; endogenous grid method; Aiyagari model