ARMA Error
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (2개)
Walter Roberson
2011년 12월 29일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Model Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!