# Time Series Trend Estimation

Let's say I want to derive an ARIMA model for a time-series.

I already know that after d differentiations the result is stationary and have fit an appropriate ARMA model to it.

How would you then estimate the trend and integrate it with the ARMA model? I recognize that there may be a variety of answers to this, I would rather focus on the most popular algorithms, preferrably those based on Penalized Regression.

I am not asking for R code, but rather abstract mathematical descriptions of algorithms.

I'm not entirely sure what you mean by "How would you then estimate the trend and integrate it with the ARMA model?" Once your series is stationary, there is by definition no trend left.

However, what you can do is fit an ARIMA with a drift:

$$y_t = \beta t + \epsilon_t,$$

where $\epsilon_t$ is ARIMA(p,d,q). This is a regression on time with ARIMA errors. See Rob Hyndman's blog post on "The ARIMAX model muddle" for more information. How to simulate ARIMA with drift(using r) may also be helpful.

In forecasting, especially if you forecast out for a longer horizon, you may want to dampen your trend, i.e., extrapolate $t$ only with dampening.