Rolling 1 day Garch-Forecast (garchpred?) for a time series

1 view (last 30 days)
Hi there,
I'm currently stuck on one particular issue. Let's say I'm dealing with a set of financial data split up into the following two time series:
PredData = A 250-day time series of values that I'm going to use to fit the GARCH model parameters
RealData = This will be another 500-day time series directly following the PredData period. In the end, I'm trying to do rolling 1 day mean / variance forecasts for the RealData series. Forecasts for period t should include all the realised values / information of the time series up to t-1.
So first of all I'm fitting the parameters to PredData, that's easy:
spec = garchset('P',1,'Q',1)
[Coeff,Errors] = garchfit[spec, PredData]
Here's the tricky part, though. From here on, I want to do 1 day rolling forecasts for RealData based on the garch spec we've just modelled in the first step.
Let's say you're in the first day of RealData. There's no previous data available, so the forecast for this day is just going to be based on the garch coefficients.
Let's move on to day two of RealData. There's actually been a realisation of the time series that you should include in your calculations: The realisation of RealData in day 1. I'm no expert on GARCH models really but I think the previous value should effect the error term for day 2. So long story short, the forecast for day 2 should be based on the realisation of day 1.
Same thing goes for day 3. Forecast for day 3 should include the information realised in day 1 and 2.
etc.. and this should go on till day 500 of RealData.
I don't really have a clue how to do this yet. My only idea was to have somthing like
for t=1:length(RealData)
[SigmaForecast, MeanForeCast] = garchPred(Coeff,RealData(1:t),1)
end
But first of all, I'm not even quite sure that's a correct use of garchPred for what I'd like to achieve and second of all, it seems terribly inefficient anyway.
Would be really glad to get a few suggestions!
Thanks a lot, Ben

Answers (0)

Categories

Find more on Conditional Variance Models in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!