About Python Lectures

History

This page collects three lecture series:

  1. Python Programming for Economics and Finance
  2. Quantitative Economics with Python and
  3. 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

  1. helping you understand the details of a particular implementation, and
  2. 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:

Anmol Bhandari

Chase Coleman

Daniel Csaba

David Evans

Sebastian Graves

Spencer Lyon

Matthew McKay

Daisuke Oyama

Zejin Shi

Balint Szoke

Natasha Watkins

Dongchen Zou

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.