Effacer les filtres
Effacer les filtres

rolling window garch(1,1) volatility forecast econometrics toolbox

9 vues (au cours des 30 derniers jours)
Julia
Julia le 24 Avr 2023
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

Réponses (1)

Prathamesh
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.
  1. Split your data into overlapping windows of a fixed length.
  2. Iterate over each window and estimate a GARCH model using the data within that window.
  3. Make forecasts using the estimated GARCH model and record the results.
  4. Slide the window forward by one observation and repeat steps 2 and 3 until the end of the data is reached.
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.

Catégories

En savoir plus sur Conditional Variance Models dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by