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

回答(1 个)

Prathamesh
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.
  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.

类别

Help CenterFile Exchange 中查找有关 Conditional Variance Models 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by