Ideas for dealing with bounding time series forecasting?

My time series which are sales were limited for certain days in the past. For example, there was a capacity constraint on a day e.g. 1000 orders hence the orders reached this limit while they could had exceed it e.g. 1200 orders.

However, the tricky part of those capacity limits is that they were not constant over time. For example, the business saw that they were reaching full capacity so they took measures to increase it for a bit for future days until maximum capacity was reached again.

Now, I want to forecast the same time series but the capacity limit does not exist anymore.

Furthermore, I give a representative simple example:

y_variable___ = [ 5, 9, 6, 9, 9, 15, 9 , 14, 15, 25, 20, 18, 26]

max_capacity = [ 9, 9, 9, 9, 9, 15, 15, 15, 15, 25, 25, 25, 29]

So in the cases that the sales are reaching maximum capacity I probably have some unforeseen sales, or in other words I could had more sales.

Any ideas on how to deal with that?


  • $\begingroup$ One easily implemented approach would be to flag the bounded days with a 0,1 dummy predictor. Then run the adjusted forecast model including that predictor. $\endgroup$ – user234562 Mar 14 '20 at 12:47
  • $\begingroup$ If I do that, then the model will understand that when I have at the dummy 1 (bounded day) I also have high sales and the opposite. So if set the dummy as 0 at the forecast sample then I will have lower sales which is actually the opposite to reality. If I set it to 1 then I will predict higher number of sales but probably for all the forecast days. $\endgroup$ – George Sotiropoulos Mar 14 '20 at 15:05

If a time series is observed to have values 1,9,1,9,1,9,1,5,1,9,1,9 ….one can identify a pulse effect at period 8 where a "5" was observed AND a "9" was expected thus the "5" could be replaced by a "9" to reflect an exogenous deterministic effect such as you describe. This is solved using "Intervention Detection Procedures" which takes into account any arima structure that might be in play or operational due to systematic effects both stochastic and deterministic.

If you post your data and a brief description (always useful ! ) , I might be able to help further.

  • $\begingroup$ Thanks for your answer! I added a simple example. The difference between my example and yours is that the maximum capacity/limit is always the maximum of the previous sales. Hence, I observe a 9 however, I assume that probably I would had a higher number. However, I don't know how much higher. An idea that I have that is similar to yours is to drop out the observations that I have reached the maximum capacity and then train a simple model on the rest. Then I will predict those observations and if my prediction is higher than the one observed I will replace them. $\endgroup$ – George Sotiropoulos Mar 15 '20 at 17:01
  • $\begingroup$ I see a ton of assumptions in your approach … # of distinct groups is one of them .. what is the "29" at the end ?…. If you post a real data set I might be able to help further $\endgroup$ – IrishStat Mar 15 '20 at 17:18
  • $\begingroup$ My approach easily handles level/step shifts (illustrated by your counter example ) OR local time trends in the data $\endgroup$ – IrishStat Mar 15 '20 at 17:45
  • $\begingroup$ I can't give the real data because they are private data. The 29 at the end is just another capacity limit. The capacity limit changes over time, but is always equal or larger than the sales. If I had to use your example, I would had somehow to replace the nines with a values that is higher than 9. $\endgroup$ – George Sotiropoulos Mar 15 '20 at 18:16
  • 1
    $\begingroup$ without sufficient proof of what that value should be !… that's not statistics that's arithmetic . If you wish you can scale the data by adding a constant and multiplying by another constant … mean/variance rotation ….effectively hides the original data BUT the message comes through nonetheless $\endgroup$ – IrishStat Mar 15 '20 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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