Code
Replication code and computational notebooks
I share implementations that have been useful in my own study of quantitative macroeconomics and finance. The material is organized into paper replications and notebooks for high-dimensional dynamic programming.
Replication codes
Julia implementations of influential models in macroeconomics and finance. These are learning-oriented replications and may contain simplifications relative to the original papers.
-
1994 · Aiyagari
Uninsured Idiosyncratic Risk and Aggregate Saving
-
1993 · Froot et al.
Risk Management: Coordinating Corporate Investment and Financing Policies
-
1995 · Duan
The GARCH Option Pricing Model
-
2008 · Arellano
Default Risk and Income Fluctuations in Emerging Economies
-
2010 · Rampini & Viswanathan
Collateral, Risk Management, and the Distribution of Debt Capacity
-
2011 · Bianchi
Overborrowing and Systemic Externalities in the Business Cycle
-
2014 · Schmitt-Grohé & Uribe
Finite-State Approximation of VAR Processes: A Simulation Approach
-
2022 · Arce et al.
A Macroprudential Theory of Foreign Reserve Accumulation
High-Dimensional Dynamic Programming
Notebooks comparing methods for solving occasionally binding constraint and sovereign default models. Each notebook can be viewed in the browser, inspected on GitHub, or downloaded directly.
JAX-based methods
Implementations using accelerated array computation and automatic differentiation in Python.
-
JAX · Python
Occasionally Binding Constraints Model
-
JAX · Python
Sovereign Default Model with Long-Term Debt
Adaptive Sparse Grids
Julia and Python implementations using sparse-grid approximation to manage higher-dimensional state spaces.
-
ASG · Julia
Occasionally Binding Constraints Model
-
ASG · Python
Occasionally Binding Constraints Model
-
ASG · Julia
Sovereign Default Model with Long-Term Debt
Artificial Neural Networks
Neural-network function approximation using Flux.jl and PyTorch.
-
ANN · Flux.jl
Occasionally Binding Constraints Model
-
ANN · PyTorch
Occasionally Binding Constraints Model