"There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!" – Richard P. Feynman

Some old code in Python/Jupyter notebooks, etc.

Feel free to use or adapt it and let me know if you find any bugs! (My own research code is under "Research" and on GitHub.)

Interactive brokers API

Fama/French 5 factors

Note: This is largely the code in WRDS. Delisting returns below must be adjusted to be 100% correct.

Running Stata within Jupyter

Running Matlab with Python, too:

Adding CAPM betas to CRSP data (from WRDS)

Uses Stata's user-written function asreg

Typical stock return forecasters