I'm studying time series prediction and I have some questions.

Is the Moving Averages movel studied the methods of the ARMA family has the same concept as the methods studied in Moving Averages technical analysis stock trading?

Is there any place where I can find implementations in .Net or Java of time series forecasting with Auto-Regressive AR(p), Moving Average MA(q), ARMA(p, q) and ARIMA (p, d, q)?


1 Answer 1


They are two different concepts.

A moving average (of order $q$) in the context of time series analysis is a way to model a series $y_t$ observed at times $t=1,2,...,n$ according to the following expression: $$ y_t = \mu + \epsilon_t + \theta_1 \epsilon_{t-1} + \theta_2 \epsilon_{t-2} + \cdots + \theta_q \epsilon_{t-q} \,, $$ where $\epsilon_t$, $t=1,2,...,n$ are independent and identically distributed random variables (usually Gaussian), known also as (Gaussian) white noise.

In other contexts, a moving average is a sequence of average values obtained over consecutive or overlapping blocks of observations. For example, a moving average can be obtained as the mean of the first $5$ observations, followed by the mean of the next $5$ observations, and so on. The blocks may contain consecutive or overlapping observations, that is, the first two blocks can contain respectively the observations $[y_1,y_2,y_3,y_4,y_5]$ and $[y_6,y_7,y_8,y_9,y_{10}]$ or $[y_1,y_2,y_3,y_4,y_5]$ and $[y_2,y_3,y_4,y_5,y_6]$.

The term "moving average" is more revealing or straightforward to interpret in the second case.

In the first context, the name may reflect the fact that the equation is a weighted average of the current and past shocks (with weights $\theta_1,...,\theta_q$). It can also be thought as "moving" because the effect of each shock $\epsilon_t$ affects the series $y_t$ only for a limited number of future periods ($q$ periods) and, thus, we have blocks of size $q$. But I cannot ensure that the origin of this name responds to this interpretation.

Your second question about implementations in .Net or Java should be answered by someone else.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.