Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GARCH(1,1) - Matlab

4 views
Skip to first unread message

Francois DUTEIL

unread,
Oct 30, 2010, 12:47:03 PM10/30/10
to
Hi guys

I am currently working on the Markov Switching Multifractal model developped by Calvet and Fisher.

As the latters did, I would like to compare the forecasting performances of this model with the ones provided by a GARCH(1,1). To do so, I wrote the following algorithm in Maltab for the GARCH(1,1).

However, before going further in my projet, I really would like to be sure that the latter is right, could you please have a look on it and tell me if something seems wrong? That would be very nice

Code:
function [sigmaGARCH]=GARCH_forecast(NavData,InSample,horizon)

%INPUTS
%NavData - Prices
%Insample- nb of Day in the In-sample period
%horizon - forecasting horizon (days)

Data=price2ret(NavData);

% In-sample Parameters estimation
[Coeff,Errors,LLF,Innovations,Sigmas,Summary] = garchfit(Data(1:InSample,:));

% Out-of sample volatility forecasting
for i=1:length(Data)-InSample-horizon-1
tempsigmaGARCH = garchpred(Coeff,Data(i:InSample+i-1,:),horizon);
sigmaGARCH(i+horizon-1,1)=tempsigmaGARCH(horizon,1);
end

end

Thansk a lot

Francois DUTEIL

unread,
Oct 30, 2010, 12:49:04 PM10/30/10
to
0 new messages