Detrending time series is a process of eliminating the trend component from a time series, where a trend refers to a change in the mean over time (a continuous decrease or increase over time). It means that when data is detrended, an aspect from that data has been removed that you think is causing some kind of distortion.

Assuming the **multiplicative model**:

$$Detrended\, value = \frac{Y}{T} = \frac{TSCI}{T}=SCI $$

Assuming **additive model**:

$$Detrended\, value = Y-T=T+S+C+I-T = S+C+I$$

### Detrending Time Series (Stationary Time Series)

The **detrending time series** is a process of removing the trend from a non-stationary time series. A detrended time series is known as a stationary time series, while a time series with a trend is a non-stationary time series. A stationary time series oscillates about the horizontal line. If a series does not have a trend or we remove the trend successfully, the series is said to be trend stationary.

Eliminating the trend component may be thought of as rotating the trend line to a horizontal position. The trend component can be eliminated from the observed time series by computing either the ratios to the trend if the multiplicative model is assumed or the deviations from the trend if the additive model is assumed.

Note that the best detrending method depends on the nature of your trend:

- Use differencing for stationary trends (constant increase/decrease).
- Use model fitting for more complex trends (curves, changing slopes).

Detrending is often a preparatory step for further analysis such as forecasting and identifying seasonal patterns. On the other hand, detrending might not be necessary if the trend is already incorporated into your analysis. Some methods, like deseasonalizing, can involve both detrending and removing seasonal effects.

**Read about ****Secular Trends in Time Series**

**Learn **R Programming Language