Error "Number of rows in presample array 'Z0' must be at least 1."
4 ビュー (過去 30 日間)
古いコメントを表示
%% Forecast E-GARCH
eModel = egarch(1,1); % Create a garch (1,2) model (proposed by BIC)
j=500; % Number of observations within each window
h=276;
T = length(yield_monthly_05');
VolForecast = zeros(693,1);
%rolling window moves along one each time
for g=h+1:T
% Estimating a model with 30 observations each (g-k)
eEstModel = estimate(eModel, yield_monthly_05(g-h:g)','Display', 'off');
% Simulating 10000 paths to get the innovations
rng default;
[v,z]=simulate(eEstModel,10000);
% Forecasting the variance for each horizon
temp=forecast(eEstModel,1, yield_monthly_05(g-h:g)');
VolForecast(g+1) = temp(end);
end
Hello. I am trying to forecast an egarch model. This loop works perfectly fine when forecasting a standard garch model.
In what seems to be the line "[v,z]=simulate(eEstModel,10000);", I get the error: "Number of rows in presample array 'Z0' must be at least 1." Can anyone help me out? Thank you so much
0 件のコメント
回答 (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!