# Is there a Julia package that can decompose a time series data into trend, seasonality and random?

**URL:** <https://discourse.julialang.org/t/is-there-a-julia-package-that-can-decompose-a-time-series-data-into-trend-seasonality-and-random/9518>\
**Category:** Statistics\
**Tags:** first-steps, time-series\
**Created:** [March 5, 2018, 8:29pm UTC](https://discourse.julialang.org/t/is-there-a-julia-package-that-can-decompose-a-time-series-data-into-trend-seasonality-and-random/9518 "2018-03-05T20:29:00Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 6, 2018, 7:38am UTC](https://discourse.julialang.org/t/is-there-a-julia-package-that-can-decompose-a-time-series-data-into-trend-seasonality-and-random/9518/7 "2018-03-06T07:38:03Z")

</div>

I asked a [similar question](https://discourse.julialang.org/t/package-for-deseasonalizing/9275) a while ago, and apparently there isn’t any. I have implemented [Hamilton (2017)](http://econweb.ucsd.edu/~jhamilto/hp.pdf) for detrending, and plan to release it soon. I also came up with a simple multilevel model-based deseasonalizer that seems to work surprisingly well, but that is still experimental.

As I said in the [other topic](https://discourse.julialang.org/t/interesting-observations-about-julia-language-google-trends-time-series/9519), most of these methods introduce spurious patterns, especially for the “trend”. Deseasonalizing with sophisticated algorithms (STL or X13-ARIMA-SEATS) is also prone to this, to a smaller extent. But of course they are OK for exploratory plotting, one just has to be aware of this.

---

_[View the full topic](https://discourse.julialang.org/t/is-there-a-julia-package-that-can-decompose-a-time-series-data-into-trend-seasonality-and-random/9518)._
