# 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?

-

1
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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 4, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9191123843193054, "perplexity_flag": "middle"}