Hello,
I'm trying to simulate GARCH model, but my code doesn't work properly. It stops at some point and the values are the same.
clear;
clc;
parameters=zeros(1,3);
%Parametry
parameters(1,1)=0.2;
parameters(1,2)=0.7;
parameters(1,3)=0.3*(1-(parameters(1,1)+parameters(1,2)));
results=zeros(1000,2);
results(1,1)=1
results(1,2)=1
for i=2:1000
randn('seed',11);
results(i,2) = parameters(1,3)+parameters(1,1)*(results(i-1,1))^2+parameters(1,2)*results(i-1,2);
results(i,1)=randn*sqrt(results(i,2));
end

댓글 수: 1

Nagasai Bharat
Nagasai Bharat 2021년 1월 22일
Hi,
I am not able to reproduce the issue from my end. The code is working fine in my environment. Can you give more detail of the problem you are facing?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Conditional Variance Models에 대해 자세히 알아보기

태그

질문:

2021년 1월 16일

댓글:

2021년 1월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by