- 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 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Prathamesh
2023-8-18
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Conditional Variance Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!