About Python Lectures
History
This page collects three lecture series:
- Python Programming for Economics and Finance
- Quantitative Economics with Python and
- Advanced Quantitative Economics with Python
Previously all three were combined in a single site but as the number of lectures grew they became hard to navigate. The single site was split into three in March 2020.
The breakdown is as the names suggest. The first series focuses on programming and is a prerequisite for both the second and the third. The second series is aimed at (very) advanced undergraduate students and beginning graduate students. The third is for advanced graduate students and researchers.
While Thomas Sargent and John Stachurski are listed as coauthors, many people have contributed to the lectures. Credits are give below.
Objective
The lecture series treats
- algorithms and numerical methods for quantitative economic problems,
- related mathematical and statistical concepts, and
- basics of coding skills and software engineering.
As stated above, the coding language for this lecture series is Python.
Note that there’s also a related set of Julia lectures
In terms of the differences,
- Python is a general-purpose language featuring a huge user community in the sciences and an outstanding scientific ecosystem.
- Julia is a more recent language with many exciting features.
Both are modern, open-source, high productivity languages with all the key features needed for high-performance computing.
Julia has the advantage that third party libraries are often written entirely in Julia itself.
Python has the advantage of being supported by a vast collection of scientific libraries (and being a highly marketable skill).
Open Source
All the computing environments we work with are free and open-source.
This means that you, your coauthors and your students can install them and their libraries on all of your computers without cost or concern about licenses.
Another advantage of open source libraries is that you can read them and learn how they work.
For example, let’s say you want to know exactly how statsmodels computes Newey-West covariance matrices.
No problem: You can go ahead and read the code.
While dipping into external code libraries takes a bit of coding maturity, it’s very useful for
- helping you understand the details of a particular implementation, and
- building your programming skills by showing you code written by first-rate programmers.
Also, you can modify the library to suit your needs: if the functionality provided is not exactly what you want, you are free to change it.
Another, a more philosophical advantage of open-source software is that it conforms to the scientific ideal of reproducibility.
Credits
These lectures have benefited greatly from comments and suggestions from our colleagues, students and friends. Special thanks are due to our sponsoring organization the Alfred P. Sloan Foundation and our research assistants Chase Coleman, Spencer Lyon and Matthew McKay for innumerable contributions to the code library and functioning of the website.
We also recognize those who co-authored lectures and code:
- Co-authored Additive and Multiplicative Functionals
- Co-authored Globalization and Cycles
- Co-authored Permanent Income II: LQ Techniques
- Co-authored Reverse Engineering a la Muth
- Co-authored code for Asset Pricing with Incomplete Markets
- Co-authored code for Markov Perfect Equilibrium
- Co-authored code for Robust Markov Perfect Equilibrium
- Co-authored code for Robustness
- Co-authored Cattle Cycles
- Co-authored Competitive Equilibria of a Model of Chang
- Co-authored Credible Government Policies in a Model of Chang
- Co-authored Growth in Dynamic Linear Economies
- Co-authored How to Pay for a War: Part 1
- Co-authored How to Pay for a War: Part 2
- Co-authored How to Pay for a War: Part 3
- Co-authored IRFs in Hall Models
- Co-authored Lucas Asset Pricing Using DLE
- Co-authored Markov Jump Linear Quadratic Dynamic Programming
- Co-authored Permanent Income Model using the DLE Class
- Co-authored Ramsey Plans, Time Inconsistency, Sustainable Plans
- Co-authored Rosen Schooling Model
- Co-authored code for Robustness
- Co-authored Parallelization
- Authored code for Discrete State Dynamic Programming
- Co-authored Information and Consumption Smoothing
- Co-authored Markov Jump Linear Quadratic Dynamic Programming
- Co-authored Production Smoothing via Inventories
- Co-authored Additive and Multiplicative Functionals
- Co-authored Two Modifications of Mean-Variance Portfolio Theory
- Co-authored Von Neumann Growth Model (and a Generalization)
- Co-authored code for Classical Control with Linear Algebra
- Co-authored code for Classical Prediction and Filtering With Linear Algebra
- Co-authored Application: The Samuelson Multiplier-Accelerator
- Co-authored Linear Regression in Python
- Co-authored Maximum Likelihood Estimation
- Co-authored Pandas for Panel Data
Dongchen Zou
- Co-authored Robust Markov Perfect Equilibrium
We also thank Andrij Stachurski for his great web skills, and the many others who have contributed suggestions, bug fixes or improvements. They include but are not limited to Anmol Bhandari, Long Bui, Jeong-Hun Choi, David Evans, Shunsuke Hori, Chenghan Hou, Doc-Jin Jang, Qingyin Ma, Akira Matsushita, Tomohito Okabe, Daisuke Oyama, David Pugh, Alex Olssen, Nathan Palmer, Bill Tubbs, Natasha Watkins, Pablo Winant, Yixiao Zhou, Aakash G. Choudhury, Shu Hu, Harvey Thompson, Yuna Luzi and Saya Ikegawa.