I have several datasets which exhibits clear seasonality/cyclical patterns w.r.t date of month. The days after the 25th seem to be clearly correlated between months suggesting that in this case customers buy more after their payday.

Now i am thinking about ways of modelling this, the typical way of modelling seasonality is with fourier-features, the issue with this in this case is that the seasonality is not regular. February solely have 28 days and december 31 e.g.

The other way of dealing with this type of seasonality is to have date-dummies, one for each day. Since that means we would have 31 extra dummies the model would be far from parsimonious. I am thinking about ways of dealing with these issues and have come up with what i think a nice way of doing so.

I am already taking an bayesian approach to model the underlying equations so i thought about this approach:

We could e.g have a hierarchical model where all date-dummies depend on an toplevel, this is interesting since we use information from all dates to model one date whilst letting the specific date run away from the higher level distribution stemming from all dates.

Another way of dealing with this that i find much more interesting is to have each date depend on the previous date. It will create some sort of markov-chain hierarchicy where the 28th depends on the 27th which depends on the 26th etc. This will make the model aware of the 27th being close to the 26th which we would not capture in the 2-level hierarchicay presented earlier.

What are your thoughts about this?



Your Answer

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