IDEAS home Printed from https://ideas.repec.org/p/ecb/ecbwps/20263236.html

Sequential solution for DSGE models with deep neural networks

Author

Listed:
  • Ferrari Minesso, Massimo
  • Frenzel, Carla

Abstract

This paper develops a sequential deep learning algorithm for solving dynamic stochastic general equilibrium (DSGE) models. The algorithm trains a deep neural network to approximate the model’s policy functions across four progressive phases: steady-state anchoring, exploration around the steady state, simulation on the ergodic set, and Monte Carlo integration of stochastic expectations. Training requires no pre-computed starting approximation: the network initialises from the analytically known steady state and constructs its training data endogenously, resolving the circularity between the training distribution and the solution. A systematic comparison across network architectures shows that shallow, moderately wide networks with an intermediate steady-state penalty consistently deliver the best accuracy at the lowest computational cost. We apply the method to a two-country open-economy model and show that large tariff shocks generate non-linearities that local methods cannot reproduce even at higher orders. JEL Classification: C45, C63, C68, E13, F13

Suggested Citation

  • Ferrari Minesso, Massimo & Frenzel, Carla, 2026. "Sequential solution for DSGE models with deep neural networks," Working Paper Series 3236, European Central Bank.
  • Handle: RePEc:ecb:ecbwps:20263236
    as

    Download full text from publisher

    File URL: https://www.ecb.europa.eu//pub/pdf/scpwps/ecb.wp3236~1dc726a7fe.en.pdf
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Kenneth L. Judd, 1998. "Numerical Methods in Economics," MIT Press Books, The MIT Press, edition 1, volume 1, number 0262100711, December.
    2. Pierre Beck & Pablo Garcia Sanchez & Alban Moura & Julien Pascal & Olivier Pierrard, 2024. "Deep learning solutions of DSGE models: A technical report," BCL working papers 184, Central Bank of Luxembourg.
    3. Kenneth L. Judd & Lilia Maliar & Serguei Maliar, 2011. "Numerically stable and accurate stochastic simulation approaches for solving dynamic economic models," Quantitative Economics, Econometric Society, vol. 2(2), pages 173-210, July.
    4. den Haan, Wouter J & Marcet, Albert, 1990. "Solving the Stochastic Growth Model by Parameterizing Expectations," Journal of Business & Economic Statistics, American Statistical Association, vol. 8(1), pages 31-34, January.
    5. Christopher Erceg & Andrea Prestipino & Andrea Raffo, 2023. "Trade Policies and Fiscal Devaluations," American Economic Journal: Macroeconomics, American Economic Association, vol. 15(4), pages 104-140, October.
    6. Thomas Winberry, 2018. "A method for solving and estimating heterogeneous agent macro models," Quantitative Economics, Econometric Society, vol. 9(3), pages 1123-1151, November.
    7. Jesús Fernández‐Villaverde & Samuel Hurtado & Galo Nuño, 2025. "Corrigendum: Financial Frictions and the Wealth Distribution," Econometrica, Econometric Society, vol. 93(4), pages 1491-1496, July.
    8. Fernández-Villaverde, Jesús & Nuño, Galo & Perla, Jesse, 2024. "Taming the Curse of Dimensionality: Quantitative Economics with Deep Learning," CEPR Discussion Papers 19636, Centre for Economic Policy Research.
    9. Volodymyr Mnih & Koray Kavukcuoglu & David Silver & Andrei A. Rusu & Joel Veness & Marc G. Bellemare & Alex Graves & Martin Riedmiller & Andreas K. Fidjeland & Georg Ostrovski & Stig Petersen & Charle, 2015. "Human-level control through deep reinforcement learning," Nature, Nature, vol. 518(7540), pages 529-533, February.
    10. Christopher D. Carroll, 1997. "Buffer-Stock Saving and the Life Cycle/Permanent Income Hypothesis," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 112(1), pages 1-55.
    11. Adjemian, Stéphane & Juillard, Michel & Karamé, Fréderic & Mutschler, Willi & Pfeifer, Johannes & Ratto, Marco & Rion, Normann & Villemot, Sébastien, 2026. "Dynare: Reference Manual, Version 7," Dynare Working Papers 87, CEPREMAP, revised 28 May 2026.
    12. Emmet Hall-Hoffarth, 2023. "Non-linear approximations of DSGE models with neural-networks and hard-constraints," Papers 2310.13436, arXiv.org.
    13. Fernández-Villaverde, J. & Rubio-Ramírez, J.F. & Schorfheide, F., 2016. "Solution and Estimation Methods for DSGE Models," Handbook of Macroeconomics, in: J. B. Taylor & Harald Uhlig (ed.), Handbook of Macroeconomics, edition 1, volume 2, chapter 0, pages 527-724, Elsevier.
    14. Iván Werning & Guido Lorenzoni & Veronica Guerrieri, 2025. "Tariffs as Cost-Push Shocks: Implications for Optimal Monetary Policy," NBER Working Papers 33772, National Bureau of Economic Research, Inc.
    15. Victor Duarte & Diogo Duarte & Dejanir H Silva, 2024. "Machine Learning for Continuous-Time Finance," The Review of Financial Studies, Society for Financial Studies, vol. 37(11), pages 3217-3271.
    16. Lawrence J. Christiano & Martin Eichenbaum & Charles L. Evans, 2005. "Nominal Rigidities and the Dynamic Effects of a Shock to Monetary Policy," Journal of Political Economy, University of Chicago Press, vol. 113(1), pages 1-45, February.
    17. Victor Duarte & Diogo Duarte & Dejanir H. Silva, 2024. "Machine Learning for Continuous-Time Finance," CESifo Working Paper Series 10909, CESifo.
    18. Schmitt-Grohe, Stephanie & Uribe, Martin, 2004. "Solving dynamic general equilibrium models using a second-order approximation to the policy function," Journal of Economic Dynamics and Control, Elsevier, vol. 28(4), pages 755-775, January.
    19. Krugman, Paul, 1982. "The macroeconomics of protection with a floating exchange rate," Carnegie-Rochester Conference Series on Public Policy, Elsevier, vol. 16(1), pages 141-182, January.
    20. Christian Bayer & Ralph Luetticke, 2020. "Solving discrete time heterogeneous agent models with aggregate risk and many idiosyncratic states by perturbation," Quantitative Economics, Econometric Society, vol. 11(4), pages 1253-1288, November.
    21. Per Krusell & Anthony A. Smith & Jr., 1998. "Income and Wealth Heterogeneity in the Macroeconomy," Journal of Political Economy, University of Chicago Press, vol. 106(5), pages 867-896, October.
    22. Adrien Auclert & Bence Bardóczy & Matthew Rognlie & Ludwig Straub, 2021. "Using the Sequence‐Space Jacobian to Solve and Estimate Heterogeneous‐Agent Models," Econometrica, Econometric Society, vol. 89(5), pages 2375-2408, September.
    23. Reiter, Michael, 2010. "Approximate and Almost-Exact Aggregation in Dynamic Stochastic Heterogeneous-Agent Models," Economics Series 258, Institute for Advanced Studies.
    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. Maliar, Lilia & Maliar, Serguei & Winant, Pablo, 2021. "Deep learning for solving dynamic economic models," Journal of Monetary Economics, Elsevier, vol. 122(C), pages 76-101.
    2. Eftekhari, Aryan & Juillard, Michel & Rion, Normann & Scheidegger, Simon, 2026. "Scalable global solution techniques for high-dimensional models in Dynare," Journal of Economic Dynamics and Control, Elsevier, vol. 182(C).
    3. Zhouzhou Gu & Mathieu Lauri`ere & Sebastian Merkel & Jonathan Payne, 2024. "Global Solutions to Master Equations for Continuous Time Heterogeneous Agent Macroeconomic Models," Papers 2406.13726, arXiv.org.
    4. Papp, Tamás K. & Reiter, Michael, 2020. "Estimating linearized heterogeneous agent models using panel data," Journal of Economic Dynamics and Control, Elsevier, vol. 115(C).
    5. Marlon Azinovic & Luca Gaegauf & Simon Scheidegger, 2022. "Deep Equilibrium Nets," International Economic Review, Department of Economics, University of Pennsylvania and Osaka University Institute of Social and Economic Research Association, vol. 63(4), pages 1471-1525, November.
    6. Hanno Kase & Matthias Rottner & Fabio Stohler, 2025. "Generative economic modeling," BIS Working Papers 1312, Bank for International Settlements.
    7. Jesús Fernández-Villaverde & Galo Nuño & Jesse Perla, 2024. "Taming the Curse of Dimensionality: Quantitative Economics with Deep Learning," NBER Working Papers 33117, National Bureau of Economic Research, Inc.
    8. Fernández-Villaverde, J. & Rubio-Ramírez, J.F. & Schorfheide, F., 2016. "Solution and Estimation Methods for DSGE Models," Handbook of Macroeconomics, in: J. B. Taylor & Harald Uhlig (ed.), Handbook of Macroeconomics, edition 1, volume 2, chapter 0, pages 527-724, Elsevier.
    9. Kase, Hanno & Melosi, Leonardo & Rottner, Matthias, 2022. "Estimating Nonlinear Heterogeneous Agents Models with Neural Networks," CEPR Discussion Papers 17391, Centre for Economic Policy Research.
    10. Schesch, Constantin, 2024. "Pseudospectral methods for continuous-time heterogeneous-agent models," Journal of Economic Dynamics and Control, Elsevier, vol. 163(C).
    11. Marlon Azinovic-Yang & Jan v{Z}emliv{c}ka, 2025. "Deep Learning in the Sequence Space," Papers 2509.13623, arXiv.org, revised Mar 2026.
    12. Marlon Azinovic-Yang & Jan Zemlicka, 2025. "Deep Learning in the Sequence Space," CERGE-EI Working Papers wp802, The Center for Economic Research and Graduate Education - Economics Institute, Prague.
    13. Michał Brzoza-Brzezina & Jacek Suda, 2021. "Are DSGE models irreparably flawed?," Bank i Kredyt, Narodowy Bank Polski, vol. 52(3), pages 227-252.
    14. Adrien Auclert & Bence Bardóczy & Matthew Rognlie & Ludwig Straub, 2021. "Using the Sequence‐Space Jacobian to Solve and Estimate Heterogeneous‐Agent Models," Econometrica, Econometric Society, vol. 89(5), pages 2375-2408, September.
    15. Lepetyuk, Vadym & Maliar, Lilia & Maliar, Serguei, 2020. "When the U.S. catches a cold, Canada sneezes: A lower-bound tale told by deep learning," Journal of Economic Dynamics and Control, Elsevier, vol. 117(C).
    16. Lilia Maliar & Serguei Maliar & John B. Taylor & Inna Tsener, 2020. "A tractable framework for analyzing a class of nonstationary Markov models," Quantitative Economics, Econometric Society, vol. 11(4), pages 1289-1323, November.
    17. Yucheng Yang & Chiyuan Wang & Andreas Schaab & Benjamin Moll, 2025. "Structural Reinforcement Learning for Heterogeneous Agent Macroeconomics," Papers 2512.18892, arXiv.org.
    18. Nils M. Gornemann & Keith Kuester & Makoto Nakajima, 2021. "Doves for the Rich, Hawks for the Poor? Distributional Consequences of Systematic Monetary Policy," Opportunity and Inclusive Growth Institute Working Papers 50, Federal Reserve Bank of Minneapolis.
    19. Fernández-Villaverde, Jesús & Marbet, Joël & Nuño, Galo & Rachedi, Omar, 2025. "Inequality and the zero lower bound," Journal of Econometrics, Elsevier, vol. 249(PC).
    20. Kenneth L. Judd & Lilia Maliar & Serguei Maliar, 2014. "Lower Bounds on Approximation Errors: Testing the Hypothesis That a Numerical Solution Is Accurate?," BYU Macroeconomics and Computational Laboratory Working Paper Series 2014-06, Brigham Young University, Department of Economics, BYU Macroeconomics and Computational Laboratory.

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;

    JEL classification:

    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • C63 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Computational Techniques
    • C68 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Computable General Equilibrium Models
    • E13 - Macroeconomics and Monetary Economics - - General Aggregative Models - - - Neoclassical
    • F13 - International Economics - - Trade - - - Trade Policy; International Trade Organizations

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    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:ecb:ecbwps:20263236. See general information about how to correct material in RePEc.

    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: Official Publications (email available below). General contact details of provider: https://edirc.repec.org/data/emieude.html .

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

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.