"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
"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.
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.)
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
Interactive brokers API
Fama/French 5 factors
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 Stata within Jupyter
Running Matlab with Python, too:
Running Matlab with Python, too:
Adding CAPM betas to CRSP data (from WRDS)
Adding CAPM betas to CRSP data (from WRDS)
Uses Stata's user-written function asreg
Uses Stata's user-written function asreg
Typical stock return forecasters
Typical stock return forecasters
Useful files
Useful files
CSV files with the critical values for the ENC-NEW tests for k2=1 and k2=2 non-nested parameters from the appendix of Todd E Clark, Michael W McCracken, Tests of equal forecast accuracy and encompassing for nested models, Journal of Econometrics, Volume 105, Issue 1, 2001.