How to remove a error with GARCH model forecasting ?

조회 수: 1 (최근 30일)
Mark
Mark 2014년 9월 8일
편집: Mark 2014년 9월 8일
Hello,
When I run the example code mentioned here :
load Data_EquityIdx nasdaq = Dataset.NASDAQ; r = price2ret(nasdaq); N = length(r);
% Fit a GARCH(1,1) model to the data.
model = garch(1,1); fit = estimate(model,r);
% Forecast the conditional variance for 500 days using the fitted model. Use the observed returns as
% presample innovations for the forecast.
Vf = forecast(fit,500,'Y0',r);
...and after the last line I get this annoying error: " Error using subsindex Function 'subsindex' is not defined for values of class 'garch'. "
I believe this error stems from a function name conflict - several different functions have the same name "subsindex". After searching the Matlab folder I get these functions with the same name "subsindex":
Name Size Date modified Folder
subsindex.m 0 KB 01/ 29/ 2014 8:42 AM ops ?C:\Program Files\MATLAB\R2014a\mcr\toolbox\matlab?
subsindex.m 1 KB 01/ 29/ 2014 8:42 AM @categorical ?C:\Program Files\MATLAB\R2014a\mcr\toolbox\matlab\datatypes?
subsindex.m 1 KB 12/ 27/ 2013 1:16 PM @gpuArray ?C:\Program Files\MATLAB\R2014a\toolbox\distcomp\gpu?
subsindex.m 1 KB 12/ 27/ 2013 1:15 PM @codistributed ?C:\Program Files\MATLAB\R2014a\toolbox\distcomp\parallel?
subsindex.m 1 KB 10/ 09/ 2013 2:26 PM @testplansweepsetfilter ?C:\Program Files\MATLAB\R2014a\toolbox\mbc\mbctools?
subsindex.m 1 KB 10/ 09/ 2013 1:29 PM ops ?C:\Program Files\MATLAB\R2014a\toolbox\matlab?
subsindex.m 1 KB 04/ 12/ 2013 12:32 ... @categorical ?C:\Program Files\MATLAB\R2014a\toolbox\matlab\datatypes?
subsindex.m 1 KB 08/ 01/ 2012 12:13 ... @fi ?C:\Program Files\MATLAB\R2014a\toolbox\fixedpoint\fixedpoint\+embedded?
subsindex.m 1 KB 03/ 07/ 2005 7:32 AM ja ?C:\Program Files\MATLAB\R2014a\toolbox\matlab\ops?
Thanks in advance for any attention !
Mark

답변 (0개)

카테고리

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