Some time series are decomposable into various trend components.
To estimate a trend component without making parametric assumptions,
you can consider using a *filter*.

Filters are functions that turn one time series into another. By appropriate filter selection, certain patterns in the original time series can be clarified or eliminated in the new series. For example, a low-pass filter removes high frequency components, yielding an estimate of the slow-moving trend.

A specific example of a linear filter is the *moving
average*. Consider a time series *y _{t}*,

$${\widehat{m}}_{t}={\displaystyle \sum _{j=-q}^{q}{b}_{j}{y}_{t+j},}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}q<t<N-q.$$

You can choose any weights *b _{j}* that
sum to one. To estimate a slow-moving trend, typically

`conv`

.You cannot apply a symmetric moving average to the *q* observations
at the beginning and end of the series. This results in observation
loss. One option is to use an asymmetric moving average at the ends
of the series to preserve all observations.

Was this topic helpful?