Looking Inside SAS Forecast Studio: White Paper
Looking Inside SAS Forecast Studio: White Paper
Introduction......................................................................... 1
Defining Events.......................................................................4
Forecast Generation.......................................................... 5
Time Series Diagnosis and Model Construction.............5
Model Selection......................................................................6
Forecast Summary..................................................................6
Forecasting View................................................................ 6
Navigating the Forecast Hierarchy......................................6
Exception-Based Forecasting........................................11
Forecast Reports...............................................................12
Conclusion.........................................................................12
References.........................................................................12
SAS White Papers................................................................ 12
Recommended Reading.................................................... 12
1
Abstract Introduction
Organizations depend on statistical forecasting to provide a Generating forecasts is a crucial step in many strategic and
solid foundation for many important planning and decision- tactical planning and decision-making processes. For example,
making processes. SAS® Forecast Server, which comprises a future demand for products and services is forecast to support
graphical user interface (SAS Forecast Studio) and the statistical production planning, marketing activities, resource scheduling
forecasting engine (SAS Forecast Server Procedures), facilitates and financial planning. Much time and effort is spent in the
and speeds the forecasting process by providing a convenient, planning process, and thus improving the reliability of statistical
user-friendly interface to the large-scale automatic forecasting, forecasts that feed these processes can result in huge rewards
model building and time series exploration capabilities avail- such as greater operational efficiency, reduced expenses and
able in SAS. increased profits.
SAS Forecast Server also includes the SAS Time Series Studio Although forecasting is a key business function, many organiza-
graphical user interface, providing extensive time series explo- tions rely on a small forecasting team to generate large numbers
ration capabilities. The new SAS Forecast Server Client (avail- of statistical forecasts. Therefore, a large degree of automation is
able in release 14.1) makes certain functions of SAS Forecast often required to complete the forecasting process in the time
Studio and SAS Time Series Studio available from anywhere available during each forecasting and planning cycle. Forecasting
through a web browser. Find more information about SAS process tasks typically include generating forecasts based on
Forecast Server Client in the white paper “Looking Inside SAS® recent data, reconciling forecasts in a hierarchical manner, identi-
Forecast Server Client” (forthcoming). fying and correcting problematic forecasts, adding overrides to
the forecasts based on business knowledge or scenario analysis
Through SAS Forecast Studio, SAS Forecast Server addresses and publishing the forecasts to other systems or as reports.
the needs of novice forecasters by being largely automated, yet
still meets the needs of more experienced analysts by providing SAS Forecast Server, which consists of a graphical user interface
layers of sophistication that can be accessed as needed. (SAS Forecast Studio) as well as the statistical forecasting engine
SAS Forecast Server Procedures, facilitates and speeds the fore-
SAS Forecast Studio enables users to set up forecasting casting process by providing a convenient, user-friendly inter-
projects, perform large-scale automatic forecasting, identify face to the large-scale automatic forecasting, model building
exceptions, override forecasts and construct their own models if and time series exploration capabilities available in SAS. In
desired. Given the scale of many forecasting problems, addition, the SAS Time Series Studio graphical user interface
manually customizing many statistical models may not be provides extensive time series exploration capabilities. And SAS
feasible. SAS Forecast Studio provides an automated system Forecast Server Client makes certain functions of SAS Forecast
that selects appropriate models and intelligently chooses influ- Studio and SAS Time Series Studio available from anywhere
ential variables that improve the model. Forecasts that violate through a web browser.
business rules can be flagged for further attention. The system
supports hierarchical forecasting processes by providing The wizard-driven graphical user interface of SAS Forecast Studio
top-down, middle-out and bottom-up forecast reconciliation allows the novice forecaster to move quickly through the statis-
and generates SAS code that can be run in a batch tical forecasting process to generate forecasts using state-of-the-
environment. art forecasting methods. Forecasters do not need to know any
SAS programming or how to build time series models to use SAS
Forecast Server – the system can be entirely automated.
SAS Forecast
®
Server Client*
Segmentation and Tracking
Web Client
SAS Management
®
SAS Forecast Server
®
SAS Add-In for
®
SAS/ETS ®
as month or day. For example, the data set may contain data on (SKUs) at the bottom level, and then aggregated upward by
units sold per week, or electricity used per hour. If the data is product line, region and finally, an overall forecast. In this case,
recorded at regular intervals such as month or day, then it is the forecast hierarchy has four levels: product, product line,
time series data and is ready to be forecast. On the other hand, region and overall. “Product” is the fundamental unit to be
if data is collected at irregular intervals, such as raw transaction forecast; “Product Line” and “Region” are SAS BY variables.
data from a retail store or call center, then it must be aggre-
gated by time period to create a proper time series. If needed, SAS Forecast Studio produces separate statistical forecasts at
SAS Forecast Studio performs this aggregation automatically. each level of a user-specified hierarchy, based on the history at
each level. To generate the forecasts at upper levels of the hier-
The Project Wizard begins by prompting the analyst to navigate archy, the historical values from the lowest level are summed up
through SAS libraries and select the input data set. There is no to create the required input data time series.
predefined limit on the size of the data set or the number of
series to be forecast in a project. In practice, the limits on project Since each level of a hierarchy is forecast independently, it is
size will depend on the complexity of the data to be analyzed highly unlikely that the statistical forecast at the second level of
and the amount of history available for each series to be the hierarchy will equal the sum of the statistical forecasts at the
forecast. first level, and so on. In this case, the forecasts must be recon-
ciled within the hierarchy, so that the forecasts across the hier-
Defining the Forecast Hierarchy archy levels are consistent (i.e., lowest level forecasts add up to
the next level, and so on). The Project Wizard guides the user
Many forecasts are hierarchical; for example, the forecast for
through the selection of an appropriate reconciliation tech-
units sold might include the number of individual products
nique: top down, bottom up or middle out.
Assigning Variable Roles Events can be added to regression, ARIMAX and unobserved
components models (UCM) as event variables: variables that
Variable roles determine how input variables are used within a
indicate when something out of the ordinary occurred in the
project. The required time variable is assigned a role of “Time
past or will occur again in the future. Once specified, SAS
ID.” As noted above, other input variables may be assigned the
Forecast Server statistically estimates the impact of the event in
BY variable role and will determine the forecast’s hierarchical
the past and uses the estimated impact to calculate future fore-
structure.
casts where the event recurs.
Defining Events
Some models may be improved by the inclusion of events,
which are occurrences out of the ordinary that may disturb the
underlying time series. Some events are unplanned (such as
strikes or storms); their impact should be isolated so that it is not
propagated in future forecasts. Other events are planned
(holidays, promotions, price changes) and may be recurring;
their impact should be assessed and included in future fore-
casts if appropriate. Figure 5: Defining events.
5
• How sensitive automatic outlier detection and other diag- • Diagnose the characteristics of each series to be forecast, at
nostic tests should be. each level of the hierarchy.
• How leading and trailing zeros in the time series are to be • Estimate parameters for appropriate candidate models.
treated. • Evaluate the performance of the candidate models.
• Whether or not forecasts are allowed to go below zero. • Select the best-performing model for each series, as well as
• Whether or not to use a holdout sample, and if so, its length alternative runner-up models.
definition. • Produce forecasts.
• Reconcile the forecasts in the hierarchy.
SAS Forecast Studio offers standard default settings for all of
these options, simplifying the forecast preparation task for
novice analysts and streamlining the process for advanced Time Series Diagnosis and Model
forecasters. Construction
When generating forecasts, SAS Forecast Server must first
determine an appropriate set of models for each time series
being forecast. Several diagnostic procedures are automatically
run for each time series in the forecast project. For example, in
addition to the standard time series decomposition analysis,
SAS Forecast Server tests for intermittency of the dependent
variable, as well as the presence of outliers and structural shifts.
If a time series is determined to be intermittent – that is, very few
nonzero observations in the data – SAS Forecast Server will
attempt to fit a specialized intermittent demand model.
Otherwise, SAS Forecast Server constructs candidate exponen-
tial smoothing, ARIMAX and UCM models.
Entering Forecast Overrides In addition, in the Series view the analyst can explore the prop-
Statistical forecast values can be manually overridden by erties of both dependent and independent variables by experi-
entering new values in the data table; the numbers can be menting with variable transforms using drop-down selection
typed in, or the override calculator can be used to calculate new boxes. As in the Forecasting view, navigation among the time
values by adjusting the statistical value by a fixed amount or a series is done with the Tree view or Table view in the navigation
percentage. The override values are shown in the forecast panel.
graph, and, after forecast reconciliation, the impact of the over-
rides is shown at each level of the forecast hierarchy.
All the tools needed to set up business rules and flag potentially
problematic forecasts are readily available in SAS Forecast
Studio:
Conclusion References
SAS Forecast Studio delivers the sophisticated time series SAS White Papers
exploration, model building and large-scale automatic fore-
Turbo-Charging Spreadsheets: Accessing SAS® Forecast Server
casting capabilities of SAS to novice forecasters through the
from Microsoft Excel.
SAS Forecast Studio interface. Advanced users can access SAS
Forecast Server Procedures (writing SAS code) if they so desire.
Large-Scale Automatic Forecasting Using Inputs and
Thus, as an extensible and flexible system, SAS Forecast Studio
Calendar Events.
meets the needs of both novice forecasters who need to move
through the production forecasting process quickly as well as
Structured, Large-scale Statistical Forecasting Using
more experienced forecast analysts who wish to delve deeply
SAS® Forecast Server
into the forecast model building process.
The scenario analysis capability in SAS Forecast Studio provides Brocklebank, John C. and Dickey, David A. (2003),
tools for what-if modeling, using the models and parameter SAS® for Forecasting Time Series, Second Edition.
estimates generated by the forecasting system or provided by
the user. This means that SAS Forecast Studio scenarios Chatfield, C. (2000). Time Series Models, Boca Raton, FL:
leverage the underlying, potentially complex, dynamic relation- Chapman & Hall/CRC.
ship between the forecast variable and the independent vari-
ables, adding significantly to their value in the business Gilliland, M. (2010). The Business Forecasting Deal, Hoboken,
planning process. NJ: John Wiley & Sons Inc.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of
SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product
names are trademarks of their respective companies. Copyright © 2015, SAS Institute Inc. All rights reserved.
102418_S144585.0915