This repository contains Python files that I have created for a Master's course in Asset Pricing / Financial Economics.
The goal is to introduce students to the Python programming language, with a focus on basic data analysis and financial economics applications.
It is recommended to work through the files in the following order:
-
introduction.py (Introduction to Python, Pandas, and NumPy)
-
yfinance.py (Yahoo finance package for financial data, Intorduction to dictionaries)
-
regressions.py (Financial data cleaning, Realized Variance and GARCH, CAPM, Fama-French factor model)
-
portfolioopt.py
-
time_series_analysis.py (Testing for stationarity, Forecasting with ARIMA model) - 'portfolio.csv' dataset is used here
-
regularization.py (Regularization techniques: Ridge, Lasso)
Companion slides for the regularization script can be found here
Make sure you have these libraries installed:
- pandas
- numpy
- matplotlib
- yfinance
- arch
- pandas_datareader
- statsmodels
- sklearn