GARCH Models in Python 4
GARCH Models in Python 4
management
GA RCH MODELS IN P YTH ON
Chelsea Yang
Data Science Instructor
Risk management mindset
Rule No.1: Never lose money
-- Warren Buffett
Three ingredients:
1. portfolio
2. time horizon
3. probability
5% probability the portfolio will fall in value by 1 million dollars or more over a 1-day period
1% probability the portfolio will fall in value by 9 million dollars or more over a 10-day period
mean_forecast = gm_forecast.mean['2019-01-01':]
variance_forecast = gm_forecast.variance['2019-01-01':]
2. Empirical VaR
q_empirical = std_resid.quantile(0.05)
Chelsea Yang
Data Science Instructor
What is covariance
Describe the relationship between movement of two variables
Covariance = ρ ⋅ σ1 ⋅ σ2
resid_eur = gm_eur.resid/vol_eur
resid_cad = gm_cad.resid/vol_cad
The optimal portfolio can yield the maximum return with the minimum risk
Risk can be reduced in a portfolio by pairing assets that have a negative covariance
Chelsea Yang
Data Science Instructor
What is Beta
Stock Beta:
Systematic risk:
Beta > 1: the stock bears more risks than the general market
Beta < 1: the stock bears less risks than the general market
E(Rs ) = Rf + β (E(Rm ) − Rf )
Chelsea Yang
Data Science Instructor
You did it
Fit GARCH models
Portfolio optimization