GARCH Models in Python
Chelsea Yang
Data Science Instructor
An exciting part of financial modeling: predict the unknown
Rolling window forecast: repeatedly perform model fitting and forecast as time rolls forward
Continuously add new data points to the sample
Expanding window forecast:
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
New data points are added while old ones are dropped from the sample
Fixed rolling window forecast:
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
Usually determined on a case-by-case basis
Too wide window size: include obsolete data that may lead to higher variance
Too narrow window size: exclude relevant data that may lead to higher bias
The optimal window size: trade-off to balance bias and variance
GARCH Models in Python