These are my course materials for a graduate course on Computational Macroeconomics taught at the University of Tübingen. The compiled PDF materials are available under Releases (make sure to click Show all assets).
Please feel free to use this for teaching or learning purposes; however, taking into account the GPL 3.0 license.
Week 1: Introductions
- understand the scope and topics of Computational Macroeconomics
- decide whether you want to take the course
- prepare your computer for the course with MATLAB/Octave and Dynare
- do your first steps in MATLAB/Octave and Dynare
- (optionally) install GitKraken and do your first steps with git
- find course information and the schedule on https://macroeconomics.chat, but you need to sign up first by following the link provided in Ilias (for University of Tübingen students only)
- read the general course information, the schedule and tips on using Mattermost in the Town Square channel of https://macroeconomics.chat
- join the literature channel, which will contain the readings (papers and books) as pdfs
- join the recordings channel, which will contain the recordings of all our classes
- briefly introduce yourself (what are you studying, which semester, where did you do your undergraduate studies) in the town square channel and whether you have previous experience with programming and are already somewhat familiar with the RBC or New Keynesian models (this is not mandatory for the course, but it is useful to know)
- watch the introductory videos (on YouTube)
- prepare your computer: MATLAB/Octave and Dynare
- install MATLAB R2024b following this guide if you are a student of the University of Tübingen. Please also install the following toolboxes: Econometrics Toolbox, Global Optimization Toolbox, Optimization Toolbox, Parallel Computing Toolbox, Statistics and Machine Learning Toolbox, Symbolic Math Toolbox. As an alternative to MATLAB you can also install Octave following this guide.
- install Dynare 6.3 following this guide
- (optionally) create an account on GitHub.com
- (optionally) sign up for the GitHub Students Developer Pack to get a free Pro license for GitKraken (among other things)
- (optionally) install the GitKraken Client
- do exercise sheet 1
- write down all your questions
- check out how to schedule an online meeting with me
- put "I am interested in this course" under "What is the meeting about?"
- check your emails and cancel the meeting again using the link in the email
- now you know how easy it is to schedule a meeting with me :-)
Week 2: RBC Model, Calibration and Steady-State
- understand and get comfortable with the algebra of RBC models
- understand the concept of a steady-state
- understand the concept of calibration
- practice Dynare
- start programming with MATLAB
- watch the following videos (on YouTube)
- do exercise 1 of exercise sheet 2, we will do exercise 2 and 3 (the case study) together
- bring all your questions and concerns to the Q&A sessions
Week 3: Practicing DYNARE, Symbolic Preprocessing in MATLAB
- practice DYNARE: permanent changes in fiscal policy
- practice MATLAB: symbolic toolbox, matrix algebra, loops, Kronecker products, functions
- do exercise 2 and 3 of exercise sheet 3
- we will do exercise 1 of exercise sheet 3 together in class, but you should already have a look at the exercise sheet
- bring all your questions and concerns to the Q&A sessions
Week 4-5: Catch-up with exercises, Preprocessing and Steady-State in MATLAB
- catch-up with exercises
- understand preprocessing and steady-state computations in MATLAB
- finish and re-visit last week's exercises
- understand how to add deterministic growth to the RBC model
- we will do exercise 4 of exercise sheet 4 together in class, but you should already have a look at the exercise sheet
- bring all your questions and concerns to the Q&A sessions
Week 5: New Keynesian Model
- understand and get comfortable with the algebra of New Keynesian models
- practice Dynare with the New Keynesian model
- watch Algebra of New Keynesian Models with Calvo price rigidities on YouTube
- work carefully and thoroughly through the very long exercise 1 of exercise sheet 4
- we will practice Dynare with the New Keynesian model by doing exercise 2 of exercise sheet 4 together in class
- schedule a meeting for all your questions and concerns (or write me an email)
Week 6: Numerical optimization, deterministic simulations and perfect-foresight algorithm
- understand and start using numerical optimizers
- understand numerical steady-state computations
- understand Dynare's commands to do deterministic simulations
- understand the Newton algorithm used by Dynare to solve perfect foresight problems
- re-implement deterministic simulations in MATLAB
- watch the (very short) videos:
- Introduction to Optimization: What is Optimization
- Introduction To Optimization: Objective Functions and Decision Variables
- Introduction To Optimization: Gradients, Constraints, Continuous and Discrete Variables
- Introduction To Optimization: Gradient Based Algorithms
- Introduction To Optimization: Gradient Free Algorithms (1/2) - Genetic - Particle Swarm
- Introduction To Optimization: Gradient Free Algorithms (2/2) Simulated Annealing, Nelder-Mead
- Introduction to Optimization: Calculating Derivatives
- do exercises 1-2 of exercise sheet 5
- watch the videos
- bring all your questions and concerns to the Q&A sessions
Week 7: Midterm Exam: Rotemberg Adjustment Costs, Monopolistic Competition, Irreversible Investment, War Shock
- understand quadratic price adjustment costs
- understand monopolistic competition and the Dixit Stiglitz elasticity parameter
- understand irreversible investments as an occasionally binding constraint
- understand the modeling of a war in a New Keynesian model
- get a good grade
- read the instructions and do all exercises from the summer 2025 midterm exam
- read the papers carefully
- hand in your solutions via email
- for immediate help: contact me via email or schedule a meeting
Week 8: Practicing deterministic simulations using a New-Keynesian SIR model: Deal with numerical issues and use homotopy
- understand the SIR (Susceptible, Infected, Recovered) epidemiology model
- understand and get used to Dynare's macro preprocessing directives
- understand timing conventions of predetermined variables
- understand the difference between sticky-price and flex-price New Keynesian economies
- deal with common numerical issues in the perfect foresight solution algorithm
- understand homotopy in the context of perfect foresight simulations
- simulate a New-Keynesian SIR model
- read the case-study paper carefully
- prepare exercise sheet 6: exercise 1 and 2 for the first meeting and exercises 3 and 4 for the second meeting
- download all files
- read all the exercises
- we will go through this together in class
- bring all your questions and concerns to the Q&A sessions
Week 9 and 10: First-order perturbation, Shock transmission channels, Log-Linearization
- understand the concept of a policy function
- understand the general idea of first-order perturbation approximation
- understand certainty equivalence
- understand the algorithm to compute the perturbation matrices using the Linear Rational Expectation model framework
- [optional] understand Dynare's first-order perturbation solver
- watch
- do exercise sheet 7 on your own
- read Rupert and Šustek (2019)
Week 11: Trend Inflation and Environmental Policy in the New Keynesian model.
- understand and get used to Dynare's stoch_simul command
- understand Dynare's sensitivity toolbox
- study the macroeconomics of trend inflation in a New Keynesian model
- study the macroeconomics of different environmental policies in a New Keynesian model
- read the case-study paper on trend inflation carefully (Ascari and Sbordone, 2014)
- read the case-study paper on environmental policy carefully (Annicchiarico and Di Dio, 2015)
- download all files
- try to prepare the replications
We cover modern theoretical macroeconomics (the study of aggregated variables such as economic growth, unemployment and inflation by means of structural macroeconomic models) and combine it with numerical methods to study abstract macroeconomic concepts such as optimal monetary, fiscal and environmental policy, occasionally binding constraints (zero-lower-bound, irreversible investment), quantitative easing and rare disasters. To this end, we use the Dynamic Stochastic General Equilibrium (DSGE) model paradigm, particularly focusing on different variants of the New-Keynesian model, and develop the numerical procedures and algorithms required to solve and simulate such models. Using several case studies from the literature the theoretical and methodological foundations of computational macroeconomics are taught.
- Algebra of RBC and New-Keynesian models
- Steady-state
- Preprocessing of DSGE models
- Simulation and solution methods
- perfect foresight
- 1st-order perturbation (log-linearization)
- k-order perturbation
- projection
- Impulse response analysis
- Sensitivity analysis
- Large shocks
- Rare events
- Occasionally binding constraints
- Optimal policy
- Fiscal policy (Baxter and King, 1993, American Economic Review)
- Epidemics (Eichenbaum, Rebelo and Trabandt, 2022, Journal of Economic Dynamics and Control)
- Wars (Auray and Eyquem, 2019, Journal of Economic Dynamics and Control)
- Trend inflation (Ascari and Sbordone, 2014, Journal of Economic Literature)
- Technology shocks and business cycles (King, Plosser and Rebelo, 1988, Journal of Monetary Economics)
- International spillovers under different environmental policy regimes (Annicchiarico and Diluiso, 2019, Resource and Energy Economics)
- Nonlinearities and large shocks (Harding, Linde and Trabandt, 2022)
- Fiscal multipliers (Linde and Trabandt, 2017, Journal of Applied Econometrics)
- Optimal environmental policy (Heutel, 2012, Review of Economic Dynamics; Annicchiarico and Di Dio, 2015, Journal of Environmental Economics and Management)
- Equity premium puzzle (Jermann, 1998, Journal of Monetary Economics)
- Zero-lower bound on nominal interest rates, irreversible investment (Guerrieri and Iacoviello, 2015, Journal of Monetary Economics)
- Rare disasters (Fernandez-Villaverde and Levintal, 2018, Quantitative Economics; Isore and Szczerbowicz, 2017, Journal of Economic Dynamics and Control)
- Endogenous Banking Crises (Boissay, Collard, and Smets, 2016, Journal of Political Economy)
Students acquire knowledge of advanced numerical methods in the field of computational macroeconomics. This knowledge is relevant for the realization of a wide variety of macroeconomic research projects and is applied in central banks, ministries, research institutes (e.g. DIW, ifo, IfW, IWH, RWI) and research departments of international organizations (e.g. IMF, World Bank). Upon successful completion of this module, students are prepared to work in these areas. At the same time, the module prepares students for the requirements of a methodologically oriented macroeconomic dissertation.
Students get familiar with a variety of algorithms, examples and situations in which computational thinking is useful in approximating and evaluating abstract macroeconomic phenomena. They recognize and appreciate the connections between theory and computational methods and use their training to find possible avenues of research. While constructing abstract algorithms, they identify appropriate computational tools and evaluate their strengths and weaknesses in the context of problem solving. They utilize computers and software effectively as tools for solving and simulating macroeconomic models. In addition, because students work on the problem sets as a team, students' coordination, organization, and communication skills are enhanced.
Basic undergraduate knowledge of macroeconomics as well as econometrics are required, programming skills in a scripting language are advantageous, but not necessary.
If you spot mistakes, let me know by opening an issue or write me an email to [email protected]. Moreover, solutions to the exercises in other computer languages (e.g. Julia, Python or R) are highly appreciated. Please sent me those either via email or (better) open a pull request.