# How do I estimate the parameters of an MA(q) process?

It is relatively easy to estimate the parameters of an autoregressive $AR(p)$ process. How do I do with a moving average $MA(q)$ process?

-
Why the vote to close as off-topic? Time series analysis is very important in stat-arb/HFT trading. –  quant_dev Nov 25 '12 at 14:02
In my opinion, it is too elementary to be on topic. Every textbook on time series analysis covers this. –  Ryogi Nov 26 '12 at 20:42

## 1 Answer

Estimating $MA(q)$ models is significantly harder than $AR(p)$ models. Eviews, MATLAB and R can use multiple algorithms which are all based on some form of maximum likelihood estimation. You can look at the source of MATLAB and R or the excellent Eviews documentation.

However, I strongly advise against rolling your own since efficient and well tested algorithms are widely available.

For the interested, this paper describes the method (with code) used by the R arima package. You can see from the abstract the method it is quite complicated.

-
Thanks. I know mature libraries are the way to go in production applications, but I am simply interested in this problem. –  quant_dev Nov 25 '12 at 14:00