You are on page 1of 36

Forecast Range

Very long range forecasts do not work well!!

• Forecasts are done under the assumption that the market and other conditions in future are very
much like the present
neerajshin@gmail.com
• Not that there
LZSQFTU6A9 will be no change in the market
• But the change is gradual, not a drastic change
• A financial crash like 2008 US market will send all forecasts into a tizzy
• Events like Demonetization would throw the forecasts into disarray

Based on the amount of data availability, one should not try to forecast more than a few periods
ahead

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Scope of Module

• Only univariate TS is explored


• No attempt made to forecast
neerajshin@gmail.com
LZSQFTU6A9
more than one interdependent
TS
• The variable measured in TS is
assumed to be continuous and
have fairly decent volume
• Intermittent demand TS is not
consideredThis file is meant for personal use by neerajshin@gmail.com only.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Gathering Information
Historical data required for future prediction

If volume of data is limited, forecasts will not


neerajshin@gmail.com
be reliable enough
LZSQFTU6A9

If data is available for very long past, data may


not be useful at all

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Example: Clay Brick Production

neerajshin@gmail.com
LZSQFTU6A9

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Example: Clay Brick Production

Series not stable


neerajshin@gmail.com
LZSQFTU6A9

Use stable part for forecast

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Forecast Range
Different industry needs forecast for different range for different purpose
with different accuracy

Example: Airlines industry: Interested in passenger volume forecast


• Long-term forecast: 5-10 years
neerajshin@gmail.com ̶ Strategic decision making
LZSQFTU6A9

• Mid-term forecast: 2-5 years


̶ Manpower hiring / Route alteration

• Short-term forecast: 2 weeks – 6 months


̶ Pilot / Cabin Crew rostering
̶ Dynamic pricing

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
neerajshin@gmail.com
LZSQFTU6A9
Forecast

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Simple Forecast
 Naïve Forecast: Use the last observed value
 Average Forecast:
 Moving Average Forecast:
neerajshin@gmail.com • Take average over a window of certain width
LZSQFTU6A9
• Move the window

None of these work well even for the most regular


series

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Moving Average
• One of the most popular and often-
used technical indicators to understand stock
movement
neerajshin@gmail.com
LZSQFTU6A9

• The moving average is easy to calculate and,


once plotted on a chart, is a powerful visual
trend-spotting tool.

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Long Term Movement

neerajshin@gmail.com
LZSQFTU6A9

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
EXPONENTIAL SMOOTHING
neerajshin@gmail.com
LZSQFTU6A9
FORECAST

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Model Validation
Predictive power of a model is estimated by comparing its
forecasting performance on a Test Data

A part of sample data is used to train (develop) the model:


neerajshin@gmail.com
LZSQFTU6A9 Training Data
A part of sample is withheld from estimation process: Test
Data

The model which gives smallest measure of error between


forecast and actual series is the ‘best’

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Model Validation
• Training Data is used to identify a few working models
• The forecasts for training data are called fitted values
• Each of the models is tested against the observed values of the series
for hold-out period
• The model is selected to be the best where observed and forecasted
neerajshin@gmail.com
LZSQFTU6A9
values are the closest

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Model Validation
• For other predicting models hold-out sample is randomly
chosen from the total sample
• Usually in 80:20 ratio

neerajshin@gmail.com
• For time series hold-out sample has to be the most recent
LZSQFTU6A9 period because of the ordered nature of the data

Training Data Test Data

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Model Validation
• If there is seasonality in the data, the at least one
full season’s data need to be held out for validation
• Once a model is selected, held-out period must be
neerajshin@gmail.com incorporated into the sample for final forecasts for
LZSQFTU6A9
future

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Measures of Forecast
Accuracy
• Performance of forecast method is tested by comparing the
forecast values with the test sample observations

neerajshin@gmail.com
෣ Forecast Values
𝑌(𝑡)
LZSQFTU6A9

Y(t)Observed Values
Compare the observed and forecast values through
various methods

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Measures of Forecast Accuracy
 Residual sum of squares

RSS = σ 𝑌 𝑡 − 𝑌(𝑡) 2

 Mean sum of squares


1

MSS = σ 𝑌 𝑡 − 𝑌(𝑡) 2
𝑇
neerajshin@gmail.com
LZSQFTU6A9
 Mean absolute deviation
1 ෣
MAD =𝑇 σ |𝑌 𝑡 − 𝑌 𝑡 |

 Mean absolute percent error


1
MAPE = 𝑇 σ[ |𝑌 𝑡 − 𝑌෣
𝑡 | / 𝑌 𝑡 ] x 100

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Forecast by Average

• Using mean of all past observations – easiest,


neerajshin@gmail.com
intuitive, naïve
LZSQFTU6A9
• Naturally does not work well!!
• Can this scheme be modified to get useful
forecasts?

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Exponential Smoothing
• Weighted averages of past observations
• Weights decaying as observations get older
• Practically speaking, only the recent observations
neerajshin@gmail.com
LZSQFTU6A9 matter
• One or more parameters control how fast the
weights decay
• These parameters have values between 0 and 1

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Exponential Smoothing

Decreasing weight given 0  1


to older observations

neerajshin@gmail.com

 (1   )
LZSQFTU6A9

 (1   ) 2
 (1   ) 3

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Simple Exponential (SES)
If the time series neither has a pronounced trend nor
seasonality: Almost non-available!

neerajshin@gmail.com
LZSQFTU6A9

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Petrol Consumption

neerajshin@gmail.com
LZSQFTU6A9

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Exponential Smoothing
• Performance of the smoothing parameter α controls
performance of the method
• If α is closer to 1, forecasts follow the actual observations
more closely
neerajshin@gmail.com
LZSQFTU6A9 • If α is closer to 0, forecasts are farther from the actual
observations and the line is smooth

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Double Exponential

• Applicable when data has Trend but no seasonality


• An extension of SES
neerajshin@gmail.com • Two separate components are considered: Level and Trend
LZSQFTU6A9
• Level is the local mean
• One smoothing parameter α corresponds to the level series
• A second smoothing parameter β corresponds to the trend
series
• Also known as Holt model

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Caselet V: US GDP

neerajshin@gmail.com
LZSQFTU6A9
Trend Series

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Caselet V: US GDP

α=0.99
neerajshin@gmail.com
α=0.99 β=0.05
LZSQFTU6A9

MAPE=5% MAPE=4.5%

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Petrol Consumption

neerajshin@gmail.com
LZSQFTU6A9

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Petrol Consumption

neerajshin@gmail.com
LZSQFTU6A9

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Exponential Smoothing
with Seasonality: Holt-
Winters’ Model
• Because Seasonality can be additive or multiplicative, HW
model can be additive or multiplicative
neerajshin@gmail.com
LZSQFTU6A9

• Simultaneously smooths the level, trend and seasonality

• Three separate smoothing parameters

• α: Smooths level; 0<α<1


• β: Smooths trend; 0<β<1
• γ : Smooths seasonality; 0<γ<1

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Champagne Sales
Model Estimates

Smoothing parameters:
alpha = 0.0842
beta = 1e-04
neerajshin@gmail.com
LZSQFTU6A9

gamma = 0.7608
• Smoothing parameter for trend (β) almost 0 corroborates well with insignificant
YOY movement
• Smoothing parameter for seasonality(γ) fairly high that almost all fluctuations
are due to seasonality

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Champagne Sales

High sales volume forecasts


neerajshin@gmail.com Are close but not low sales MAPE=16.7%
LZSQFTU6A9
Volume months

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Champagne Sales

High sales volume forecasts


neerajshin@gmail.com as well as low sales volume MAPE=10.6%
LZSQFTU6A9
months

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Passenger Volume

Significant trend
and
seasonality both
neerajshin@gmail.com
LZSQFTU6A9

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Passenger Volume
Model Estimates

Smoothing parameters:
neerajshin@gmail.com
LZSQFTU6A9
alpha = 0.3515
beta = 0.0147
gamma = 0.6481
• Smoothing parameter for trend (β) small compared to
other parameters
• Indicates almost a straight line trend
• Smoothing parameter for seasonality(γ) fairly high
This file is meant for personal use by neerajshin@gmail.com only.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
Passenger Volume

Forecast values show


small bias MAPE=7%

neerajshin@gmail.com
LZSQFTU6A9

This file is meant for personal use by neerajshin@gmail.com only.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Sharing or publishing the contents in part or full is liable for legal action.
neerajshin@gmail.com
LZSQFTU6A9

HAPPY LEARNING

This file is meant for personal use by neerajshin@gmail.com only. 36 prohibited.


Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution
Sharing or publishing the contents in part or full is liable for legal action.

You might also like