I am using GARCH model to simulate price of an index for 7 years. For input I am using difference of Log of prices (log of return). enter image description here

GARCH(1,1) has the lowest AIC, and I found parameters for the GARCH model and I simulated price of the index for 100 times using the following code using PYTHON.

mu = [0.000103]
omega =  [0.000003]
alpha1 = [0.121624]
beta1 = [0.859032]

maturity = 21*12*7 +6*21
scenarios = 100
init_log_return =list(np.log(IDV).diff().iloc[-1,:])
monthlyreturn_GARCH = np.zeros((scenarios, maturity, len(Index)))
volatility_GARCH = np.zeros((scenarios, maturity, len(Index)))
monthly_prices_GARCH = np.zeros((scenarios, maturity, len(Index)))

for scenario in range(0, scenarios):
    for index in range(len(Index)):
        monthly_prices_GARCH[scenario][0][index] = IDV.iloc[-1,:][index]
        monthlyreturn_GARCH[scenario][0][index] = init_log_return[index]
        Ut = monthlyreturn_GARCH[scenario][0][index] - mu[index]
        volatility_GARCH[scenario][0][index] = (Ut / np.random.normal(0, 1))**2

        for day in range (1,maturity):
            volatility_GARCH[scenario][day][index] = omega[index] + alpha1[index]* Ut**2 + beta1[index]*volatility_GARCH[scenario][day-1][index]
            Ut = np.sqrt(volatility_GARCH[scenario][day][index] )* np.random.normal(0, 1)
            monthlyreturn_GARCH[scenario][day][index] = mu[index] +Ut
            monthly_prices_GARCH[scenario][day][index] = np.exp(np.log(monthly_prices_GARCH[scenario][day-1][index]) + monthlyreturn_GARCH[scenario][day][index])

However, when I plot variance over time I am getting the following output.

enter image description here

The daily volatility is very high at the beginning and then it will become very small. The results does not look right. Is there any methods other than GARCH that can give me better results? or do you have any idea what went wrong here? or do you have any suggestion for improvements?

New contributor
Himeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • The long run variance should not go to zero. Check that your implementation is correct as given here stats.stackexchange.com/questions/314428/… – Alex C Nov 8 at 2:10
  • @AlexC I edited my post. The long run variance becomes very small, but since it is daily variance it makes sense. However, at beginning the daily variance is too high. It doesn't seem right to me. Do you know what went wrong? – Himeh Nov 8 at 5:48

Your Answer

Himeh is a new contributor. Be nice, and check out our Code of Conduct.
 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.