ARMA Error
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
I am new in matlab and I am trying to create a simple ARMA(q,p) model which will estimate the best fit parameter automated and then predict the return of the following day. I have a stock daily prices(QQQ) and my code is below.
pr=price2ret(QQQ);
model=armax(pr(1:end-150),[1 2]);
mbest=pem(pr(end-150:end,model);
y = predict(model,pr);
plot(pr(151:end),y(151:end));
If I run this code it will give me a idpoly model(model) and a double 1x1 cell for y variable with an Error
??? Error using ==> plot
Conversion to double from cell is not possible.
I will really appreciate if someone could assist me on this error and give me an insight how can I compile this error! I had tried to use the compare function but it is also give me an error. Does anyone has a better ideas how can I find the best fit parameters for an ARMA model ???
Thanks in advance
0 Kommentare
Antworten (2)
Walter Roberson
am 29 Dez. 2011
The output yp is an iddata object containing the predicted values as OutputData.
Notice it is iddata, not a numeric array.
Perhaps you want to get(yp, 'OutputData') as described at http://www.mathworks.com/help/toolbox/ident/ref/iddata.html
0 Kommentare
Siehe auch
Kategorien
Mehr zu Linear Model Identification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!