How to avoid GARCH estimation model to show output in the command window?

조회 수: 8 (최근 30일)
Haoqing FAN
Haoqing FAN 2016년 6월 15일
답변: Hang Qian 2016년 8월 19일
I am trying to estimate the oil price volatility using GARCH model, and I try to use a 4 year-rolling window to estimate the GARCH parameters so that i could get many parameters for different periods. Thus I wrote a "for" loop, but in every loop matlab will show the whole output table for the estimated GARCH model, which makes it forever to finish the loop. I already put ";" at the end of each line but it didn't help. Below is part of the codes:
Mdl = arima('ARLags',7,'Variance',garch(1,1));
for i=1:4835;
EstMdlGARCH_i=estimate(Mdl,r(i:i+843));
A(i,:)=[EstMdlGARCH_i.Variance.GARCH,EstMdlGARCH_i.Variance.ARCH];
end;
Your helps are appreciated!

답변 (1개)

Hang Qian
Hang Qian 2016년 8월 19일
Hi Haoqing,
To suppress display, we can add a name-value pair 'Display', say
EstMdlGARCH_i=estimate(Mdl,r(i:i+843),'Display','off');
- Hang Qian

카테고리

Help CenterFile Exchange에서 Conditional Variance Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by