フィルターのクリア

econometric tool box surprise

1 回表示 (過去 30 日間)
jenka
jenka 2016 年 12 月 29 日
コメント済み: jenka 2016 年 12 月 29 日
Hi everybody, so I have not touched this code in few years but I am currently looking at it and it appears that some functionality was removed. I have the following code. I garchfit is not longer in that tool. However, I am not sure how to "reproduce" this code with the current version of econometric toolbox. Probably should be super easy. Anybody? if true
Z = zeros(MaxAR + 1,MaxMA+1);
for MA = 0: MaxMA
for AR = 0: MaxAR
i = AR + 1;
j = MA + 1;
spec = garchset('R', AR, 'M', MA, 'P', 0, 'Q', 0);
[Coeff,~,LLF,~,~,~] = garchfit(spec,StationaryInput);
Parameters = garchcount(Coef);
[~,BIC] = aicbic(LLF,Parameters,row1);
Z(i,j) = BIC;
end
end
clear AR MA spec Coeff LLF AIC CSize i j row1
[row,column] = find(ismember(Z, min(min(Z),[],2)));
ARp = row - 1;
MAq = column - 1;
spec = garchset('R',ARp,'M',MAq,'P',0,'Q',0);
[FinalCoeff,FinalErrors,~,FinalInnovations,~,FinalSummary] = garchfit(spec,StationaryInput);
garchdisp(FinalCoeff, FinalErrors)
RSquared = 1 - corr(StationaryInput,FinalInnovations)

回答 (1 件)

John D'Errico
John D'Errico 2016 年 12 月 29 日
編集済み: John D'Errico 2016 年 12 月 29 日
As far as I can see, garchfit (and garchset, garchcount, garchdisp, etc.) are not in that toolbox. I would guess that it never was, but that you used codes from here instead:
The econometrics TB does have garch tools in it.
  1 件のコメント
jenka
jenka 2016 年 12 月 29 日
I am pretty sure it was:)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeConditional Variance Models についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by