Computational Economics for PhDs
Collegio Carlo Alberto, 2025
- Teacher: Florian Oswald, florian.oswald@unito.it
- Class Times: Weekly Monday and Tuesday 11:00-13:00
- Class Location: Collegio Carlo Alberto
- Slack: There will be a slack channel for all communication
Course Overview
This is a course for PhD and Allievi students at Collegio Carlo Alberto in Computational Economics. You will learn about some commonly used methods in Computational Economics and Structural Econometrics. These methods are being used in all fields of Economics. The course has a clear focus on applying what you learn. We will cover the theoretical concepts that underlie each topic, but you should expect a fair amount of hands on action required on your behalf. In the words of the great Che-Lin Su:
Doing Computation is the only way to learn Computation. Doing Computation is the only way to learn Computation. Doing Computation is the only way to learn Computation.
True to that motto, there will be homeworks for you to try out what you learned in class. There will also be a term project.
Outline of Topics
Section | Topic |
---|---|
1 | Introduction, Why Julia |
2 | julia crash course 1 |
3 | julia crash course 2 |
4 | Optimization 1: Recap of theory, Automatic Differentiation, setting up an optimizer |
5 | Optimization 2: Algorithms |
6 | Optimization 3: Constraints |
7 | Parallel Computing |
8 | Data and Machine Learning |
9 | Dynamic Programming 1: Basics |
9 | Dynamic Programming 2: Aiyagari and Shimer+Smith Models |
10 | Discrete and Continous Choice Problems |
11 | Dynamic Discrete Choice Models |
Prerequisites
- You need a laptop.
- You should be familiar with the material from Introduction to Programming.
- You must sign up for a free account at github.com. Choose a reasonable user name and upload a profile picture.
- Before you come the first class, please do this:
- Download the latest stable
julia
release for your OS. - Download the
VSCode Editor
- Download the latest stable
Getting Programming Skills
- Check out what is being taught in the Introduction to Programming course. You should know this level.
- We will be using Julia for this course.
Term Project
There are two options:
- Replicate a published paper.
- Develop the computational aspects of your own work.
Replication
The requirements for choice of paper to replicate are:
- It’s an economics paper.
- Published version and replication kit is available online.
- The paper to replicate must not use julia.
- You must use julia for your replication.
- Ideally your choice will involve at least some level of computational interest (i.e. more than an IV regression)
- However, you can replicate a paper with an IV regression, but you have to go all the way to get the exact same results as in the paper. I.e. if the author typed the stata command
ivreg2 lw s expr tenure rns smsa _I* (iq=med kww age), cluster(year)
you will have to write (or find) julia code which will match all output from this, including standard errors.
- You need to set up a public github repository where you will build a documentation website of your implementation. You’ll learn how to do this in the course.
- I encourage you to let the world know about your replication effort via social media and/or email to the authors directly. This is independent of whether you were able or not to replicate the results. Replication is not about finding errors in other peoples’ work. If you are able to replicate some result in julia, this may be very interesting for others.
Replication Resources
- here is a great list by the AEA
- ECTA code and data
- RevEconDynamics codes
- Each issue of RevEconDynamics , e.g. https://www.economicdynamics.org/volume-39-2021/
- The AEA Data Editor’s website
- The Restud Data Editor and their zenodo repo of replication kits
- The Social Science Data Editor’s joint website
Develop Your Own Work
You can develop your own work as well. Requirements:
- setup a github repository which contains the code (your decision whether public or private, in any case you have to share it with me)
- produce a short document (max 10 pages, ideally much less) which describes
- the aim of the project
- the computational problem
- your computational strategy to solve that problem
- The main focus for me will lie on
- How easy is it to use your code?
- How easy is it to understand your code (code readability and provided documentation)?
- Did you provide unit tests? Can I be convinced that your code does what it is supposed to do?
Grade
Your grade will be 60% homeworks, 40% term project.
Textbooks
There are some excellent references for computational methods out there. This course will use material from
The Classics
- Fackler and Miranda (2002), Applied Computational Economics and Finance, MIT Press
- Kenneth Judd (1998), Numerical Methods in Economics, MIT Press
- Nocedal, Jorge, and Stephen J. Wright (2006): Numerical Optimization, Springer-Verlag
Newcomers
- Julia for Data Analysis (2023), Bogumił Kamiński, Manning Publications.
- Algorithms for Optimization (2019), Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press.
- A Gentle Introduction to Effective Computing in Quantitative Research - What Every Research Assistant Should Know, Harry J. Paarsch and Konstantin Golyaev
- Statistics with Julia (2021), Yoni Nazarathy and Hayden Klok, Springer.
- Quantitative Economics with Julia by Perla, Sargent and Stachurski is a wonderful resource and we use it a lot in this course.
Code of Conduct
If you decide to participate in this course, I expect you to abide by the following minimal code of conduct.
- Be polite to the other class participants.
- While in class, do not spend time on messaging apps, chat rooms, computer games, or similar content.
You can expect your instructor to abide by the same code of conduct, so this is a matter of mutual respect. If you are found in breach of the above you will be given a single warning, and I will ask you to no longer join the course after a second time. Your grade will be “fail”.
License
The copyright notice to be included in any copies and other derivative work of this material is:
Copyright 2025 Florian Oswald, florian.oswald@gmail.com
Thank you.
This is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
© Florian Oswald, 2025