MENU

Fun & Interesting

A Quant Finance Project in Python: Estimating a Risk Factor Model for a Stock with Live Data

TechFin 19,119 4 years ago
Video Not Working? Fix It Now

In this tutorial we will learn how to estimate the Fama French Carhart four-factor risk model exposures for an arbitrary stock using live data in Python. We will cover the process and common pitfalls of pulling in live data from the Fama-French risk factor database and from Yahoo Finance, and running a factor sensitivity estimation using linear regression. *** Risk model details: https://en.wikipedia.org/wiki/Carhart_four-factor_model *** Python packages used Pandas: https://pandas.pydata.org/ Pandas Datareader: https://pandas-datareader.readthedocs.io/en/latest/ YFinance: https://aroussi.com/post/python-yahoo-finance Matplotlib: https://matplotlib.org/ Statsmodels: https://www.statsmodels.org/stable/index.html

Comment