GARCH(1,1) - Matlab

  • Thread starter Thread starter keos
  • Start date Start date
Joined
10/30/10
Messages
1
Points
11
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
 
Back
Top Bottom