Author Topic: Help with arma(q,p)  (Read 518 times)

Offline Loukas

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
Help with arma(q,p)
« on: December 31, 2011, 12:40:25 AM »
Hi all,

I am new in matlab and I am trying to create a simple ARMA(q,p) model which will predict a value 1 day ahead. I have a stock daily prices(QQQ) and my code is below.

pr=price2ret(QQQ);
model=armax(pr(1:end-150),[1 2]);
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 in order to be able to plot a chart with y or to compare the model with the actual report

I had tried to use the compare function but it is also give me an error.

There is a very similar example at mathworks in the following link:

http://www.mathworks.co.uk/help/toolbox/ident/ref/predict.html (http://www.mathworks.co.uk/help/toolbox/ident/ref/predict.html)

Thanks in advance

Matlab and SimuLink Development Forum

Help with arma(q,p)
« on: December 31, 2011, 12:40:25 AM »