Code
Computational methods and replication code
Notebooks and model implementations from my work in quantitative macroeconomics and finance. Explore a topic below.
High-Dimensional Dynamic Programming
Annotated notebooks on occasionally binding constraints and sovereign default, using three approaches to dynamic programming.
JAX Accelerated array computation
Implementations using accelerated array computation and automatic differentiation in Python.
-
JAX · Python
Occasionally Binding Constraints Model
Time iteration with JIT-compiled policy updates. The multiplier identifies where the collateral constraint binds.

Policy function and Kuhn–Tucker multiplier -
JAX · Python
Sovereign Default Model with Long-Term Debt
Smoothed value-function iteration with endogenous long-term bond prices. The summary pairs expected debt choices with the default-risk surface.

Expected debt policy and default-risk surface
ASG Adaptive sparse grids
Julia and Python implementations using sparse-grid approximation to manage higher-dimensional state spaces.
-
ASG · Julia
Occasionally Binding Constraints Model
Adaptive policy iteration in Julia. Grid nodes concentrate where the collateral constraint creates a kink in the policy function.

Policy function and adaptive grid points -
ASG · Python
Occasionally Binding Constraints Model
DDSG/Tasmanian approximation with a coarse warm start and adaptive refinement. Node colors report the collateral multiplier.

Policy function and multiplier-colored grid points -
ASG · Julia
Sovereign Default Model with Long-Term Debt
Adaptive approximations for repayment and default values, combined with endogenous long-term debt prices.

Debt policy and repayment-value grid points
ANN Artificial neural networks
Neural-network function approximation using Flux.jl and PyTorch.
-
ANN · Flux.jl
Occasionally Binding Constraints Model
A bounded Flux.jl policy network trained on a Fischer–Burmeister equilibrium residual.

Training history and learned policy -
ANN · PyTorch
Occasionally Binding Constraints Model
A bounded PyTorch policy network with stochastic collocation and complementary-slackness training.

Training history and learned policy
Heterogeneous Agents
From individual income risk to aggregate uncertainty. Each discrete-time example pairs a readable implementation with an efficient solver and one figure. These are teaching examples, with documented simplifications relative to the papers.
-
1993 · Huggett
-
1994 · Aiyagari
-
1998 · Krusell & Smith
Other Replications
-
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


