I am looking for some clarification on how the Predict function works in your program. With the following code am I correct in assuming that I am getting the prediction for the next period from the previous data? So, if i = 30 is df_pred.loc[i,'UD'] returning the prediction for dfg.loc[i,'UD'] or dfg.loc[i+1,'UD']? Thank you.
for i in dfg.index:
if i >= 30:
data = dfg[i-30:i]
model = pf.GARCH(data,p=3,q=3)
x = model.fit(method='MLE')
df_pred = model.predict(h=1)
dfg.loc[i,'G_Pred_UD']= df_pred.loc[i,'UD']
I am looking for some clarification on how the Predict function works in your program. With the following code am I correct in assuming that I am getting the prediction for the next period from the previous data? So, if i = 30 is df_pred.loc[i,'UD'] returning the prediction for dfg.loc[i,'UD'] or dfg.loc[i+1,'UD']? Thank you.
for i in dfg.index: if i >= 30: data = dfg[i-30:i] model = pf.GARCH(data,p=3,q=3) x = model.fit(method='MLE') df_pred = model.predict(h=1) dfg.loc[i,'G_Pred_UD']= df_pred.loc[i,'UD']