From: Kaiser Soze on
1 - I'm trying to model thick tailed data using garchfit(). In garchset() I tell it to use the t distribution. However when I run the qqplot on the Innovations (residuals) after I do so, the qqplot again indicates that my data is thick tailed!? Shouldn't that have been picked off in the model? Compare the qqplots for the model that is gaussian, and the model that is t distributed. They come out pretty much the same.

2 - Also, can I tell garchset() to use a specified degrees of freedom for the t distribution? How does it by default choose the DoF?

3 - I'm new to Matlab, so please let me know if there are better ways of doing things.

clear all
clc
sp = hist_stock_data('01012007','31032010','^GSPC');
spp = sp.AdjClose(length(sp.AdjClose):-1:1);
z = diff(spp);

specAR0 = garchset('R', 0, 'M', 0);
[coeffAR0,errAR0,LLFAR0,InnovationsAR0] = garchfit(specAR0,z);
aic(1) = aicbic(LLFAR0,2);

specAR1 = garchset('R', 1, 'M', 0);
[coeffAR1,errAR1,LLFAR1,InnovationsAR1] = garchfit(specAR1,z);
aic(2) = aicbic(LLFAR1,3);

specARMA11 = garchset('R', 1, 'M', 1);
[coeffARMA11,errARMA11,LLFARMA11,InnovationsARMA11] = garchfit(specARMA11,z);
aic(3) = aicbic(LLFARMA11,4);

figure
subplot(3,1,1), plot(InnovationsAR0)
subplot(3,1,2), plot(InnovationsAR1)
subplot(3,1,3), plot(InnovationsARMA11)

figure
subplot(3,1,1), autocorr(InnovationsAR0)
subplot(3,1,2), autocorr(InnovationsAR1)
subplot(3,1,3), autocorr(InnovationsARMA11)

figure
subplot(3,1,1), qqplot(InnovationsAR0)
subplot(3,1,2), qqplot(InnovationsAR1)
subplot(3,1,3), qqplot(InnovationsARMA11)

% However by fitting the t and normal distributions on Innovations
% using Matlab's dfittool we can see that the t distribution fits the
% residuals much better. Therefore, I use the t distribution
% to model the ARMA process.

specAR0t = garchset('Distribution', 'T', 'R', 0, 'M', 0);
[coeffAR0t,errAR0t,LLFAR0t,InnovationsAR0t] = garchfit(specAR0t,z);
aic(4) = aicbic(LLFAR0t,3);

specAR1t = garchset('Distribution', 'T', 'R', 1, 'M', 0);
[coeffAR1t,errAR1t,LLFAR1t,InnovationsAR1t] = garchfit(specAR1t,z);
aic(5) = aicbic(LLFAR1t,4);

specARMA11t = garchset('Distribution', 'T', 'R', 1, 'M', 1);
[coeffARMA11t,errARMA11t,LLFARMA11t,InnovationsARMA11t] = garchfit(specARMA11t,z);
aic(6) = aicbic(LLFARMA11t,5);

figure
subplot(3,1,1), plot(InnovationsAR0t)
subplot(3,1,2), plot(InnovationsAR1t)
subplot(3,1,3), plot(InnovationsARMA11t)

figure
subplot(3,1,1), autocorr(InnovationsAR0t)
subplot(3,1,2), autocorr(InnovationsAR1t)
subplot(3,1,3), autocorr(InnovationsARMA11t)

figure
subplot(3,1,1), qqplot(InnovationsAR0t)
subplot(3,1,2), qqplot(InnovationsAR1t)
subplot(3,1,3), qqplot(InnovationsARMA11t)

aic

Any suggestions would be appreciated.

Thank you for your time.
 | 
Pages: 1
Prev: Shadow fading
Next: Hola mundo