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

13 ビュー (過去 30 日間)
Julia
Julia 2023 年 4 月 24 日
回答済み: Prathamesh 2023 年 8 月 18 日
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 Center および File ExchangeConditional Variance Models についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by