- Split your data into overlapping windows of a fixed length.
- Iterate over each window and estimate a GARCH model using the data within that window.
- Make forecasts using the estimated GARCH model and record the results.
- Slide the window forward by one observation and repeat steps 2 and 3 until the end of the data is reached.
rolling window garch(1,1) volatility forecast econometrics toolbox
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello dear matlab commonuty.
I am new here. I would like to build garch volatility forecasts with the econometrics toolbox, this should be 1 ahead forecasts with a rolling window. Should I build a loop myself ? or are there already predefined commands ? In R for example there is a command, ugarchroll, where I specify exactly what kind of window I want, moving or increasing. This must surely also work in matlab?
Many thanks in advance.
Julia
0 commentaires
Réponses (1)
Prathamesh
le 18 Août 2023
Hi,
I understand that you want to know command similar to “ugarchroll” in MATLAB.
I don’t see a direct command for doing this in MATLAB, however this can be achieved by implementing a rolling window analysis for GARCH models.
A loop can be implemented to create this “garch model”.
for i = 1:numWindows
% Extract the data within the current window
windowData = returns(i:i+windowSize-1);
% Estimate a GARCH model using the windowData
model = garch('GARCHLags', 1, 'ARCHLags', 1);
estModel = estimate(model, windowData);
After this the forecasts can be estimated. MATLAB's Financial Toolbox provides functions “garch”, “estimate”, and “forecast” for GARCH modelling and forecasting.
Refer to the documentations below to get more information.
0 commentaires
Voir également
Catégories
En savoir plus sur Conditional Variance Models dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!