Remove deterministic trend (e.g. linear, polynomial, etc.) from the input time series.

## Syntax

**DETREND**(

**X**,

**Order**,

**Method**)

- X
- is the univariate time series data (a one dimensional array of cells (e.g. rows or columns)).
- Order
- is the time order in the data series (i.e. the first data point's corresponding date (earliest date=1 (default), latest date=0)).
Order Description 1 ascending (the first data point corresponds to the earliest date) (default) 0 descending (the first data point corresponds to the latest date) - Method
- is the order of the polynomial time trend.
Order Description 0 subtracts mean (default) 1 constant plus trend model 2 constant plus trend and squared trend model

## Remarks

- The time series is homogeneous or equally spaced.
- The time series may include missing values (e.g. #N/A) at either end.

## Files Examples

## Related Links

## References

- Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
- Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740

## Comments

Article is closed for comments.