Matlab small white, today after reading the introduction to the club's official website, the attached program is my based on garch (1, 1) - t model for later in the price of gold, it was quite right, but the result of running out particularly unusual, bosses know what reason be?
For I=1 to 0000
P (1)=1573.20; Initial price
% goldH (1)=0;
Eps (1)=0;
For t=1:18 1
H (t + 1)=0.000000571 + 0.036844 * eps (t) * eps (t) + 0.958188 * h (t);
Eps (t + 1)=TRND (5.122371);
R (t + 1)=0.000176 + SQRT (h (t + 1)) * eps (t + 1);
P (t + 1)=exp (R (t + 1)) * P (t);
End
Pm=mean (P); The average price of gold %
End
P (t)
The Plot (t, P (t));
Xlabel (' t '); Ylabel (' P (t));