BookmarkSubscribeRSS Feed
hienvu
Calcite | Level 5

Hi everyone,

Sorry for this long post. I really need your Forecast Studio expertise help. I am pretty new to FS so there are many things I am not so sure.

I need to create a demand forecast model for weekdays (Mon-Fri). My dataset has the following characteristics:

- Demand is usually higher at the beginning of the month.

For example: If Feb 1 is on Wednesday, the demand on Feb 1 will be higher than demand on other Wednesdays

- Demand is usually higher at the beginning of the week. \

For example: Monday demand is higher than other weekdays

- There is no demand on Public holiday. Demand on the day right after public holiday will higher than normal

For example: Public holiday is on Mon. Demand on Tuesday right after PH will be higher than other Tuesdays

Questions:

1/ How can I set 2 seasonal cycle length (5 days weekday and 20 days monthly) for a forecast?

2/ Can I set an event to indicate certain percentage increase at the beginning of the month? The current event repository is designed in a way that I need to add specific date to event table e.g. 02Jan2014, 01Feb2014, 01Mar2014,... Plus, I can only indicate there is an increase yet I cant decide percentage or absolute increase. The increase is decided by the FS automatically.

3/ Currently I use 20 as seasonal cycle length and I have an uplift table outside FS. The table will indicate % uplift and absolute increase. Forecast result from FS will be uplifted in the db itself, not in FS. I have a problem with this design.

Let's say I want to forecast demand from 01Feb2014 to 10Feb2014. If Monday,01Feb2014, is public holiday, my forecast model still forecast demand for Monday (it is not supposed to forecast for Monday because demand is 0). On the next day (Tuesday,02Feb2014), actual demand will be higher than other Tuesday but my forecast model doesnt know Tuesday is the day after PH so it will forecast a demand similar to other Tuesday. I will uplift the forecast figure in database, outside FS so that will not be reflected in my model.

Assume that my model forecast 400 for Tuesday, 02Feb2014 but the actual demand is 600. Next day, when I want to forecast demand from 03Feb2014 to 12Feb2014, actual demand for 02Feb2014 is now part of my historical data for this forecasting. Since previous forecast for 02Feb2014 is 400 and actual is 600, when doing forecast from 03Feb2014, the model will think that it under-forecast last time so it will assume pattern repeated with higher increasing trend. Therefore, the model will auto-adjust itself and as a result, it will over-forecast demand from 02Feb2014 to 11Feb2014. How can I tell my FS that the  increase on 2Feb2014 (after PH) is temporary, dont take into consideration this temp increase?

4/ I am trying to resolve problem described in 3/.  I believe if the forecast for 2Feb2014 is close to actual demand, FS will not over forecast for demand from 03Feb2014 to 12Feb2014. Therefore, I am trying to bring the uplift to inside FS instead of outside. I am not sure if override method will work in this case. Override calculator will allow to override forecast with certain percentage increase of statistical forecast. When I unarchive the FS project, I am able to see override figures are stored in outovrd.sas7bdat dataset. I plan to use override logic to indicate % uplift for dates I want and use sas code to store override figures in outovrd.sas7bdat dataset. The final forecast result after uplift/override will be stored in finalfor.sas7bdat. I believe after uplift/override forecast is closer to actual forecast for 2Feb2014 so next time when I run model to forecast from 3Feb2014 to 12Feb2014, my model wont see a significant different between its forecast and actual thus it wont over-forecast. I am not sure if my line of thought is correct. Even when it is correct, I cant figure out where the code to calculate override figures is in model project folder.

In fact all of my above questions are to figure out a solution for problem described in 3/ .

Really appreciate sas communities help.

Regards,

Hien

4 REPLIES 4
udo_sas
SAS Employee

Hello -

This is a long post indeed - let me try to tackle it.

I have been dealing with an ATM forecasting project in AP where I was faced with a similar challenge: daily data with peek time of demand at the end of the month. Basically I tackled the problem using a 2-step approach: a) estimate the peak time separately using a custom interval and b) remove the peak demand and estimate the base line demand. Worked pretty well for me.

Here are some thoughts on your specific questions:

1. Nope - only one seasonality is allowed for now

2. Nope - the way Forecast Studio works is that it will try to estimate the impact of events - note that this is different to assigning % changes to events.

3. If I understand this correctly you might be able to use a ADJUSTMENT variable for your approach. See Chapter 6 of the Forecast Studio User's Guide "Understanding Variable Roles".

Thanks,

Udo

hienvu
Calcite | Level 5

Hi Udo,

Thank you very much for spending time to reply my post. I would life to clarify with you a few things.

1. Adjustment variable:

If my actual for Feb1 is 600 and my forecast is 500, when I include this data point to forecast from Feb2 onward, I will use adjustment variable which will overwrite 600 with 500. My forecast model will now think actual figure for Feb1 is 500 instead. Will this affect my model to pick up new trend in the dataset?

2.  Do you mind elaborating more about your 2-step approach in ATM forecasting project? Do you mean you have a seperate forecasting model for month-end?

Regards,

Hien

udo_sas
SAS Employee

Hi Hien -

Glad that my feedback was useful.

Here are some more thoughts:

1. The idea of a adjustment variable is to incorporate "deterministic" components of your forecast, which don't need to be modeled. There are different scenarios, for example you might want to remove deterministic components first, then you deal with your foreasting model, and finally you add the deterministic component back again. Or you may want to add an "uplift" after modeling only. ADJUSTMENT variables will allow you to do both. This won't be impact the type of model which gets selected - it's more of a pre- and post-processing activity.

2. Yes, I created 2 different forecasting projects and combined the results later outside of Forecast Studio using a data step. One of the projects was just looking at the end-of-month effect, to accomplish this I used a custom date interval. The other project was used to model the base line demand only.

Regards,

Udo

hienvu
Calcite | Level 5

Hi Udo,

Thank you very much for the help. I managed to resolve the problem by introducing 2 more independent variables: day and month in the model. My forecast now works fine for month-start and PH with fix day and month.

Really appreciate all the help.

Regards,

Hien

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2475 views
  • 5 likes
  • 2 in conversation