How to model damped linear trend in GLM (timeseries) regression

In timeseries data, usually it can decomposed into trend, seasonality, and influence from other control variables. In GLM, we can model a timeseries by de-trend regression data. However, there is a problem with prediction, as if we predicted for enough into the future, (linear) trend could grow without bounds

For timeseries forecast model like Holt’s model, it added dampening terms such that trend would decayed to a constant value at some point. But if I use GLM, I don’t have the same formulation as it is not autoregressive

I have the idea of using exponential decay to mimic this behaviour, but it became a hyper-parameter that is not optimized in the model. I’ve made a draft formulation using desmos here. Now, I want to reformulate this such that it is learnt with the graphical model, any ideas?

There’s a nice summary of exponential smoothing family of models (of which the dampened Holt-Winters model is a member) in Forcasting: Principles and Practice. You can write these very nicely in PyMC using a pytensor scan. You will need to put priors for the initial values of the three states, \mathcal{b}, \ell, and \mathcal{s}, along with parameters \alpha, \beta^\star, and \phi, then scan over the three equations presented in the book. This GARCH notebook shows the basics of using the most up-to-date scan syntax to estimate a recursive model.