Filter löschen
Filter löschen

How can i manage the garchfit problem?

1 Ansicht (letzte 30 Tage)
Gorji
Gorji am 23 Jul. 2013
Hi all, I'm running iterations in which I generate returns with garchsim and then i estimate parameters with garchfit.This process works for about 80,000 iterations but suddenly i receive following massage:
??? Error using ==> svd Input to SVD must not contain NaN or Inf.
Error in ==> pinv at 29 [U,S,V] = svd(A,0);
Error in ==> qpsub at 461 projSD = pinv(projH)*(-Zgf);
Error in ==> nlconst at 694 [SD,lambda,exitflagqp,outputqp,howqp,ACTIND] ...
Error in ==> fmincon at 758 [X,FVAL,LAMBDA,EXITFLAG,OUTPUT,GRAD,HESSIAN]=...
Error in ==> garchfit at 904 [coefficients,logL,exitFlag,output,lambda] = ...
I wonder that garchfit has this problem in some cases and i didn't receive this error massage in past when i worked with different data. So, my question is how i can solve this problem?
Any suggestion on how to correct this problem would be greatly appreciated. Thanks a lot to all in advance.
M.Gorji
  2 Kommentare
Shashank Prasanna
Shashank Prasanna am 23 Jul. 2013
Can you share what reproduction code you have? In particular the model you are generating your data with.
Gorji
Gorji am 23 Jul. 2013
Dear Shashank Here's part of my code:
ret=xlsread('S&P.csv','I2:I3501');
q=1;
nboot=1000;
Is=10000;
Spec=garchset('r',1,'p',1,'q',1,'VarianceModel','EGARCH','Display','off');
for i=1:2000
Ret=ret(i:Is+(i-1));
[Coeff,~,~,Innovations,Sigmas]= garchfit(Spec,Ret);
Sr= Innovations./ Sigmas;
while q<=nboot
Sr_b=Sr(unidrnd(Is,2*Is,1)); %Sr:Standardized Residuals & Sd:Standard deviation
[~,~,Ret_b] = garchsim(Coeff,2*Is,1,Sr_b,[],[]...
,Innovations,Sigmas,Ret);
%Estimating ARMA-EGARCH model parameters for simulated time series(Ret_b)
Coeff_b= garchfit(Spec,Ret_b(Is+1:end));
q=q+1;
end
q=1;
end
I face the problem when i want to estimate parameters based on Ret_b (simulated data) with garchfit in some cases. I hope you can help me. Thanks a lot in advance

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by