Suppose that you have ten years of monthly sales data and are interested in forecasting future sales. Consider the simple model $$\begin{equation*} y_t = \alpha_m + \beta a_t + y_{t-1} + \epsilon_t, \end{equation*}$$ where $y_t$ is log monthly sales, $\alpha_m$ is a monthly fixed effect and $a_t$ is the year at time $t$ (2011, say).

The time trend $\beta$ is not constant, however; it is getting smaller over time and heading toward 0. How can I model this?

I tried adding time-squared and log-time terms, but these send forecasts crashing out-of-sample (that is, the growth rates become negative, rather than limiting to 0).

I could create discrete blocks of time and have time period-year interactions, but

  • This seems like an ad hoc approach and
  • There aren't obvious breaks in the time trend, but rather a more-or-less linear decline that then slows and asymptotes at 0.

I could model the year-on-year growth rates instead of log sales. But the year-on-year difference is strongly correlated with a 12 period lag of itself (because log sales is not a unit root process). I would have to throw away two years of data to estimate this model with the necessary lags, which I am disinclined to do.

Are there any other suggestions that you could offer? Thanks!


3 Answers 3


You could set it up as a state space model and use the Kalman filter to account for time-varying regression parameters.


You could model this with a dampened trend, where $$a_t=\sum_{i=0}^t \varphi^t$$ for some $\varphi\leq 1$. The limit case $\varphi=1$ corresponds to an undampened trend. In this formulation, you can simply feed $\varphi$ into your modeling algorithm and estimate it via maximum likelihood.

Dampened trends are very common in Exponential Smoothing methods. See here or here.


One can detect the number of trends and their length via Intervention Detection. This is done by simply expanding the kinds of Intervention Series to include Pulses , Level/step Shifts and Time Trends. In addition there could be needed ARIMA structure. One needs to control for and allow changes in ARIMA parameters over time and changes in the error variance over time. It is prudent to allow the data to speak to these forms rather than assume a structure/ Estimation does not overcome Model Specification Bias. You can find out more about Intervention Detection here. We have been able to routinely implement the detection of the length and the timing of time trends , each with their own slope and duration length.

Time series analysis: Determine if trend is deterministic fluctuating/stable or stochastic is a quick read ...with @Aksakal contributing salient reflections.

  • $\begingroup$ You refer to "trends" as if $\beta$ could attain just a discrete (and finite) set of values. Wouldn't it adhere better to the statement and approach of the question (as well as being more parsimonious) to consider $\beta$ to be a smoothly varying function of time with decreasing absolute value? $\endgroup$
    – whuber
    Commented May 16, 2018 at 11:20
  • $\begingroup$ That is definitely possible but it is somewhat presumptive in form as it locks in the relationship. If one found a model with a number of trends following a pattern one could certainly restate it a parsimonious way as you suggest. $\endgroup$
    – IrishStat
    Commented May 16, 2018 at 11:26
  • $\begingroup$ In what respect does it "lock in the relationship"? This problem seems akin, at least in spirit, to various nonparametric regression methods such as GAMs. One could, for instance, model $\beta$ with a spline. By searching for detectable discrete jumps your approach appears explicitly to violate the stated assumptions about how $\beta$ behaves over time. $\endgroup$
    – whuber
    Commented May 16, 2018 at 11:34
  • $\begingroup$ At this point I can only suggest that you form a non-trivial outlier affected data set that behaves as you describe and we can then compare alternative results/approaches .. $\endgroup$
    – IrishStat
    Commented May 16, 2018 at 11:40
  • $\begingroup$ I could do that. Indeed, having done so I was forced to look closely at the model. It's going to be dominated by the random walk component, so I doubt you (or anyone else) will have any chance of identifying $\beta,$ especially as it decreases towards $0.$ This isn't an appropriate model for monthly sales of any sort. I believe it needs modification, perhaps to multiply $y_{t-1}$ by small value. $\endgroup$
    – whuber
    Commented May 16, 2018 at 12:04

Your Answer

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

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