Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Preface

University of Lausanne

Quantitative economics and finance increasingly rely on models that are richer, more realistic, and more computationally demanding than anything attempted a generation ago. In macroeconomics, heterogeneous-agent economies, overlapping-generations models with aggregate risk, continuous-time models with occasionally binding constraints, and integrated assessment models coupling climate and economic dynamics all share the challenge of high-dimensional state spaces where traditional grid-based numerical methods are computationally infeasible. Macro-finance and asset pricing raise the same challenge from a different direction: production economies with many risky assets and leverage or collateral constraints, sovereign-default and international macro-finance models with occasionally binding frictions, dynamic portfolio choice with transaction costs and multiple illiquid assets, and the large cross-section of test assets that modern empirical asset pricing must confront all push state and parameter spaces well past the reach of tensor-product grids. Deep learning provides a promising new set of tools for addressing these challenges.

This script grew out of courses taught at multiple universities and central bank seminars over the past several years. It offers an implementation-oriented introduction to deep learning methods for solving and estimating dynamic stochastic economic models, drawing heavily on the author’s own research but also on the rapidly growing body of work by many colleagues in this field. Although the companion course is delivered as 18 lectures, the manuscript is written to be self-contained and suitable for independent study. Throughout the text, the exposition follows chapters and sections rather than the calendar of the live course. The list of references is necessarily incomplete; the literature is expanding faster than any single manuscript can track, and the selection of topics reflects one researcher’s judgment about which methods give economists and finance researchers some of the most useful entry points today. For comprehensive surveys of deep learning for dynamic economic models, the reader is referred to Fernández-Villaverde et al. (2024); for machine learning in empirical asset pricing and finance, to Gu et al. (2020), Nagel (2021), and Kelly & Xiu (2023); and to the references therein. The present script aims to complement such surveys by providing concrete algorithms, working code, and step-by-step examples that readers can adapt to their own research problems.

What these notes cover.

The exposition is organized around four complementary methodologies:

  1. Deep Equilibrium Nets (DEQNs), which embed the equilibrium conditions of a dynamic stochastic model directly into the loss function of a neural network, replacing the traditional numerical solution step with gradient-based optimization Azinovic et al., 2022. We apply this framework to representative-agent models, international business cycles, overlapping generations, and heterogeneous-agent economies, including the histogram-based treatment of distributions building on Young (2010) and the later sequence-space extension of Azinovic-Yang & Žemlička (2025).

  2. Physics-Informed Neural Networks (PINNs), which approximate Hamilton--Jacobi--Bellman equations and Kolmogorov forward equations in continuous time without computing conditional expectations Sirignano & Spiliopoulos, 2018Raissi et al., 2019. We develop this machinery for consumption-savings problems and option pricing, and compare it with finite-difference HJB--KFE methods for continuous-time heterogeneous-agent models in the tradition of Achdou et al. (2022) and with the Economic Model Informed Neural Networks (EMINNs) of Gu et al. (2024).

  3. Deep surrogate models and Gaussian processes, which construct fast, differentiable approximations of expensive structural models, enabling rapid estimation, uncertainty quantification, and global sensitivity analysis Scheidegger & Bilionis, 2019Chen et al., 2026. Once trained, the same surrogates can also be used to design constrained optimal policies, including in dynamic stochastic heterogeneous-agent models: a long search over policy parameters that would require thousands of full re-solves of the structural model collapses into a small optimization on the surrogate. The climate-economics chapter uses this construction to derive Pareto-improving carbon-tax rules in an OLG--IAM with deep uncertainty Kübler et al., 2026.

  4. GP-based dynamic programming, which embeds Gaussian process regression into a value function iteration algorithm Engel et al., 2005Deisenroth et al., 2009Renner & Scheidegger, 2018 and, when combined with active subspaces Constantine, 2015, scales to economies with up to 500 continuous state variables Scheidegger & Bilionis, 2019.

The unifying thesis is that economic structure drives the learning problem rather than being separated from it. In DEQNs, PINNs, and EMINNs the structure is embedded directly into a neural-network loss as residual terms (equilibrium conditions, PDEs, Bellman equations), making the training objective itself unsupervised; in the surrogate and GP-based estimation chapters the structure instead appears upstream, in the model that generates the (input, output) training pairs the surrogate then learns in a standard supervised regression. Either way, the four methodologies above are different surfaces for the same idea.

How these notes are organized.

At a high level, Chapters 1--6 build the discrete-time toolkit (foundations, DEQNs, IRBC, architecture search and loss normalization, OLG, heterogeneous agents). Chapters 7--8 turn to continuous-time methods (PINNs, HJB--KFE for heterogeneous agents). Chapter 9 develops the Gaussian-process toolkit, including kernel design, Bayesian active learning, active subspaces, and a GP-based value-function-iteration scheme that solves high-dimensional dynamic programs by surrogating the Bellman operator itself. Chapter 10 develops the deep-surrogate pseudo-state pattern that treats structural parameters as additional state variables and puts it to work for structural estimation via SMM, with a second GP layer on top of the moment map for high-throughput bootstrap and Bayesian post-processing. Chapter 11 applies the toolbox to climate economics under deep uncertainty, and Chapter 12 closes by comparing methods and highlighting open problems. The next chapter, How to Read This Script, expands this overview into a full reading guide: cover-to-cover and selective paths, notation and cross-references, the role of the companion notebooks, and the visual conventions used throughout.

Audience and prerequisites.

These notes are aimed at PhD students in economics, finance, and computational social science, as well as researchers at central banks and policy institutions who wish to apply these methods to their own models. We assume familiarity with basic econometrics, Python programming, and undergraduate-level calculus and probability. For readers who need a refresher on these foundations, we recommend Goodfellow et al. (2016) for deep learning, Judd (1998) for numerical methods in economics, the open-source QuantEcon lectures (https://quantecon.org) for Python programming and quantitative economics, and the Econ-ARK toolkit (https://econ-ark.org) for heterogeneous-agent modeling.

Relation to the literature.

These notes complement several existing references. The comprehensive survey by Fernández-Villaverde et al. (2024) provides a broad overview of deep learning for economics, while Gu et al. (2020), Nagel (2021), and Kelly & Xiu (2023) survey the rapidly growing machine-learning literature in empirical asset pricing and finance; Judd (1998) remains the standard reference for classical numerical methods; the textbooks by Stokey et al. (1989) and Ljungqvist & Sargent (2018) cover the economic theory that underpins the models we solve; the open first-year Ph.D. textbook by Azzimonti et al. (2026) provides a general introduction to state-of-the-art macroeconomics; and the open dynamic-programming volumes by Sargent & Stachurski (2026) provide a modern computational treatment of recursive methods and operator-based analysis. The present script is distinguished by its focus on implementation: every method is accompanied by working code, and the exposition is driven by concrete economic applications rather than abstract theory.

Software and reproducibility.

All code examples are available as executable Jupyter notebooks in TensorFlow and PyTorch, hosted on the companion GitHub repository.[1] The notebooks are designed to run on standard hardware; GPU acceleration is beneficial but not required for the classroom-scale examples. Each chapter indicates which notebooks accompany it.

A snapshot of a fast-moving field.

Deep learning for quantitative economics and finance is evolving at an extraordinary pace, with new architectures, training algorithms, and applications appearing month after month. Both this script and the accompanying lecture suite are therefore best read as a snapshot of a highly dynamically evolving field rather than as a definitive treatment, and they are necessarily incomplete: the algorithms, models, and references collected here are those that, at the time of writing, strike the author as the most useful entry points for an economist or finance researcher beginning to work with deep learning, but the frontier is moving quickly enough that some choices will inevitably look dated within a year or two, and many worthy contributions have had to be left out. The companion GitHub repository will track revisions as the field matures, and readers are encouraged to consult it for the most recent versions of the code and references.

Feedback and errata.

This script is a living document. Corrections, suggestions, and pull requests are welcome on the companion GitHub repository’s issue tracker.[2] Direct correspondence may be addressed to <simon.scheideggerunil.ch>.

Acknowledgments.

I am grateful to the many seminar and course participants whose questions and comments have shaped this material. I also thank Marlon Azinovic, Johannes Brumm, Christopher Carroll, Hui Chen, Antoine Didisheim, Richard Evans, Jesús Fernández-Villaverde, Aleksandra Friedl, Luca Gaegauf, Kenneth Gillingham, Pavel Ievlev, Mitsuru Igami, Felix Kübler, Gianni Lombardo, Maria Pia Lombardo, Marko Mlikota, Galo Nuño, Jonathan Payne, Philipp Renner, Andreas Schaab, Frank Schorfheide, Anna Smirnova, Oliver Surbek, Fabio Trojani, Yucheng Yang, and Jan Žemlička for the research and discussions that underpin this work. Part of this manuscript was written while visiting the Bank for International Settlements (BIS); I thank the BIS for its hospitality. This script also benefitted substantially from Anthropic’s Claude as a writing and coding assistant, in particular for polishing earlier drafts of the manuscript and for modernising the companion code examples that had aged across several previous iterations of the course. Most importantly, I want to thank my wife, Michaela, and my daughter, Kira, for making this work possible through their unwavering support. The responsibility for any remaining errors of course rests with the author.

Simon Scheidegger
* HEC, University of Lausanne, 2026

Footnotes
References
  1. Fernández-Villaverde, J., Nuño, G., & Perla, J. (2024). Taming the Curse of Dimensionality: Quantitative Economics with Deep Learning (Working Paper No. 33117). National Bureau of Economic Research.
  2. Gu, S., Kelly, B., & Xiu, D. (2020). Empirical Asset Pricing via Machine Learning. Review of Financial Studies, 33(5), 2223–2273.
  3. Nagel, S. (2021). Machine Learning in Asset Pricing. Princeton University Press.
  4. Kelly, B., & Xiu, D. (2023). Financial Machine Learning. Foundations and Trends in Finance, 13(3–4), 205–363.
  5. Azinovic, M., Gaegauf, L., & Scheidegger, S. (2022). DEEP EQUILIBRIUM NETS. International Economic Review, 63(4), 1471–1525. 10.1111/iere.12575
  6. Young, E. R. (2010). Solving the incomplete markets model with aggregate uncertainty using the Krusell–Smith algorithm and non-stochastic simulations. Journal of Economic Dynamics and Control, 34(1), 36–41.
  7. Azinovic-Yang, M., & Žemlička, J. (2025). Deep Learning in the Sequence Space. 10.48550/arXiv.2509.13623
  8. Sirignano, J., & Spiliopoulos, K. (2018). DGM: A Deep Learning Algorithm for Solving Partial Differential Equations. Journal of Computational Physics, 375, 1339–1364.
  9. Raissi, M., Perdikaris, P., & Karniadakis, G. E. (2019). Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378, 686–707.
  10. Achdou, Y., Han, J., Lasry, J.-M., Lions, P.-L., & Moll, B. (2022). Income and wealth distribution in macroeconomics: A continuous-time approach. The Review of Economic Studies, 89(1), 45–86.
  11. Gu, Z., Lauriere, M., Merkel, S., & Payne, J. (2024). Global Solutions to Master Equations for Continuous Time Heterogeneous Agent Macroeconomic Models. https://arxiv.org/abs/2406.13726
  12. Scheidegger, S., & Bilionis, I. (2019). Machine learning for high-dimensional dynamic stochastic economies. Journal of Computational Science, 33, 68–82. https://doi.org/10.1016/j.jocs.2019.03.004
  13. Chen, H., Didisheim, A., & Scheidegger, S. (2026). Deep surrogates for finance: With an application to option pricing. Journal of Financial Economics, 177, 104222. https://doi.org/10.1016/j.jfineco.2025.104222
  14. Kübler, F., Scheidegger, S., & Surbek, O. (2026). Using Machine Learning to Compute Constrained Optimal Carbon Tax Rules. Journal of Political Economy: Macroeconomics.
  15. Engel, Y., Mannor, S., & Meir, R. (2005). Reinforcement Learning with Gaussian Processes. Proceedings of the 22nd International Conference on Machine Learning.