Automated Time Series Forecasting System
Download
Report
Transcript Automated Time Series Forecasting System
Automated Time Series Forecasting
Process
Valentin Todorov
January 23, 2013
Assurant Specialty Property
Objective
• Develop a time series forecast of incoming calls to the company’s
call centers
– Create a forecast for calls related to mortgages and a separate one for
HELOCs
•
•
•
•
Re-forecast weekly using the most recent actual call data
Distribute results to managers in the call centers
Implement the forecasting process within one month
Budget $0 …. excluding the man-hours to develop the process
All of that should be accomplished with SAS
2
Challenging and messy
Time consuming
Error prone
3
A sleek solution
Dropbox
Every Monday morning an
employee from our call
center sends via FTP a file
with the previous week’s
actual call volumes
Use a CRON job to monitor
the dropbox, and test every 5
minutes for the existence of a
specific file. If a file is present,
execute a SAS code
Import and clean the data, reforecast and send results via
email
The only human in this process is the one who sends the file via FTP
CRON is a job scheduler in UNIX. For more information see http://en.wikipedia.org/wiki/Cron
4
Dropbox
• Folder located on the servers
• CRON job performs a test every 5 minutes for the existence of files
[[ -f “/sas/shared/dropbox/u99/MortgCo/MortgCo_${source_type}_update.csv” ]] &&
MortgCo_haz_update.csv – Calls related to mortgage loans
MortgCo_heloc_update.csv – Calls related to HELOC loans
• If files exist, BASH code is executed which kicks off the SAS code
5
SAS code
•
•
•
•
•
•
Import new files with actual call volume data from previous week
Check for data integrity and consistency
Append to historical files and clean up
Run the forecasts
Package the data
Send forecasts via email to managers in call center
6
Call volume has a consistent daily pattern
• The call volume follows a pattern that repeats on a weekly basis
• The pattern is interrupted by public holidays, which are visible on the
graph
• No calls during weekends
7
The forecasting process is driven by macros
8
Check data integrity of incoming files
• Calculate length of latest file with actual data – should be 7 days
• Check if the dates in the file are the last 7 days
If any condition fails, stop the process and send warning emails!
9
ARIMA Forecast
• The model is ARIMA
– Mortgages: AR (5,10,15,20) MA (5) with a difference = 5
– HELOC: AR (5,10,15) MA (4) with a difference = 5
• Developed using two years of historical data
• The forecast has 24% higher accuracy compared to the incumbent
model
– Accuracy: Number of days forecast has a variance of less than 8%
10
Email final results
11
Valentin Todorov
[email protected]
http://www.linkedin.com/in/vatodorov/
12