Computational Dynamics
A six-week course on quantitative methods in computational dynamics taught in the Master of Science in Quantitative Economics (MSQE) program at New York University.
GitHub site with Python and Matlab codes and additional material
Course Description
The solution of state-of-the-art quantitative models in economics and finance often requires numerical implementation on a computer. In this course, we will explore a range of computational methods used to solve such quantitative dynamic problems: Local approximations of equilibria in models for macro-policy analysis, global methods for approximating solutions to nonlinear decision problems, filtering techniques used in learning and estimation, discretization methods popular in financial economics, as well as neural network models used in data science.
We will use a hands-on approach. Each week, we will present a new method and apply it to the solution of a specific economic model. We will show in detail how to move from the mathematical specification of the model to the elaboration of a solution algorithm and finally to its Python implementation. This pedagogical approach will also give us the opportunity to illustrate basic techniques widely applicable in scientific computing, including functional approximation, optimization, numerical and symbolic differentiation, and quadrature.
Content
Week 1: Markov chains and asset pricing
Valuation of financial claims on a discrete state space. Modeling uncertainty. Probability matrices, expectations, and stochastic discounting. The Perron–Frobenius Theorem and asymptotic behavior.
Code on GitHub
GMM testing of asset pricing Euler equations: Jupyter notebook
Solving the Mehra and Prescott (1985) economy: Jupyter notebook Matlab code
Week 2: Value function iteration in search problems
Recursive formulation and the Bellman operator. Discretization of a continuous state space, vectorization. Quadrature methods and root solving. Infinite horizon problems as limit of finite horizon ones.
Code on GitHub
Numerical analysis of the McCall (1970) model: Jupyter notebook
Week 3: Perturbation methods and linear state space models
Linear state-space models. Impulse response functions. Steady state and linearization in the neighborhood of the steady state. Series expansion methods. Linear approximation of return decomposition. Real business cycle and new-Keynesian models.
Code on GitHub
Campbell and Shiller (1988) decomposition of variation in price dividend ratios: Jupyter notebook
Week 4: Filtering and learning
Inference problem. State-space representation of models with unobserved states. The Kalman filter.
Code on GitHub
Kalman filter implementation: Jupyter notebook
Week 5: Finite difference methods in derivative pricing
Brownian motion and Itô processes. Differential equation for the price of a derivative. Time and space discretization. Implicit and explicit schemes for solving discretized problems.
Code on GitHub
Black and Scholes (1973) model solved using the finite-difference method: Jupyter notebook
Week 6: Q-learning in decision problems
Worker search problem revisited. Consumption-saving problem. Bayesian learning and convergence. Reinforcement learning.
Code on GitHub
McCall(1970) worker search model solved using the Q-learning method: Jupyter notebook