GARCH Models in Python 2
GARCH Models in Python 2
assumptions
GA RCH MODELS IN P YTH ON
Chelsea Yang
Data Science Instructor
Why make assumptions
Volatility is not directly observable
Chelsea Yang
Data Science Instructor
Constant mean by default
constant mean: generally works well with most nancial return data
arch_model(my_data, p = 1, q = 1,
mean = 'constant', vol = 'GARCH')
arch_model(my_data, p = 1, q = 1,
mean = 'zero', vol = 'GARCH')
arch_model(my_data, p = 1, q = 1,
mean = 'AR', lags = 1, vol = 'GARCH')
Chelsea Yang
Data Science Instructor
Asymmetric shocks in nancial data
News impact curve:
Riskier!
Exponential GARCH
Add a conditional component to model the asymmetry in shocks similar to the GJR-GARCH
Chelsea Yang
Data Science Instructor
Rolling window for out-of-sample forecast
An exciting part of nancial modeling: predict the unknown
Rolling window forecast: repeatedly perform model tting and forecast as time rolls forward
for i in range(120):
gm_result = basic_gm.fit(first_obs = start_loc,
last_obs = i + end_loc, disp = 'off')
temp_result = gm_result.forecast(horizon = 1).variance
for i in range(120):
# Specify rolling window range for model fitting
gm_result = basic_gm.fit(first_obs = i + start_loc,
last_obs = i + end_loc, disp = 'off')
temp_result = gm_result.forecast(horizon = 1).variance
Too wide window size: include obsolete data that may lead to high bias
Too narrow window size: exclude relevant data that may lead to higher variance