MBA Analytics For Finance 11
MBA Analytics For Finance 11
Names of Sub-Units
Introduction to time series forecasting, Moving average and Weighted moving average.
Overview
This unit begins with the introduction to time series forecasting. Further, it discusses the moving
average, components of time series analysis, categories of smoothening techniques and the concept
of weighted moving average.
Learning Objectives
Learning Outcomes
https://ecapitaladvisors.com/blog/what-is-financial-analytics/
https://www.gartner.com/en/finance/glossary/finance-analytics
11.1 INTRODUCTION
Statistics is a collection of techniques that can be used to solve key data queries. You can transform
raw observations into information that you can comprehend and share using descriptive statistical
methods. Inferential statistical approaches can be used to reason from small samples of data to the
entire domain.
In the subject of applied machine learning, statistics is often regarded as a prerequisite. Statistics are
required to convert observations into information and to answer queries regarding samples of data.
Statistics is a set of methods for summarising data and characterising aspects of a domain given a
sample of observations that have been created over hundreds of years.
Machine learning and statistics are two topics of study that are closely linked. To the point where
statisticians refer to machine learning as “applied statistics” or “statistical learning” rather than the
computer science-centric name.
Now, let us take a look at another use of statistics in addition to data and that is the use for forecasting.
What is the meaning of statistical forecasting? Statistical forecasting, to put it simply, is the use of
statistics based on historical data to estimate what might happen in the future. This can be done with
any numerical data: Stock market performance, sales, GDP, housing sales and so on.
While statistical demand forecasting is a more advanced approach of projecting future demand, it does
have a few requirements to be successful. Statistical forecasting obviously relies entirely on previous
data with three key characteristics: high quality, sufficient historical data and the sort of data used as
inputs to the statistical engine.
As we know, time is one of the most crucial variables in our business and personal lives. But, with constant
improvements taking place in many facets of our lives, technology has helped us manage our time. The
2
UNIT 11: Time Series Forecasting JGI JAIN
DEEMED-TO-BE UNI VE RSI TY
statistical method, which is normally used for statistical forecasting and which deals with time-based
data can be referred to time series data and the statistical models which are built for the purpose are
known as time series modeling. As the name implies, it focuses on time-based data (years, days, hours
and minutes) to uncover hidden insights and better comprehend the market’s unpredictable nature,
which we have been attempting to measure.
Time series forecasting is used in a variety of industries today, from energy and retail to transportation
and banking, to project product demand, resource allocation, financial performance, predictive
maintenance and a variety of other applications. Despite the fact that time series forecasting has the
ability to revolutionise business models and enhance bottom lines, many firms have yet to implement
it and reap the benefits. Let’s begin with a definition and then go on to a quick rundown of applications
and methods.
Time series forecasting is a method for predicting future occurrences by evaluating previous trends and
assuming that future trends would be similar to previous trends. Forecasting is the process of predicting
future values by fitting models to historical data. Time series forecasting is a data-driven method to
effective and efficient planning that is used to solve prediction problems with a time component.
Time series models have a wide range of applications, from sales forecasting to weather forecasting.
Time series models have been found to be one of the most effective forecasting strategies in situations
when there is a degree of uncertainty about the future.
All types of business choices are aided by time series projections. Some instances include:
Forecasting power demand to determine whether another power plant should be built in the next
five years
Call volume forecasting for next week’s call center staffing
Inventory requirements are forecasted to stock inventory to satisfy demand.
Forecasting supply and demand to improve fleet management and other supply chain aspects
Predicting equipment breakdowns and maintenance need to reduce downtime and maintain safety
standards.
To maximise disease management and outbreak strategies, infection rates are forecasted.
From projecting product sales to predicting consumer reviews
Forecasts can have varying temporal frames depending on the conditions and what is being predicted.
Time series forecasts are created using time series analysis, which consists of methods for evaluating
time series data to extract useful statistics and other data features. Time series forecasting attempts to
forecast a future value or categorisation at a specific moment in time.
3
JGI JAIN
DEEMED-TO-BE UNI VE RSI TY
Financial Analytics
A historical time series is used to begin time series forecasting. Analysts look at historical data for
time decomposition patterns such as trends, seasonal patterns, cyclical patterns and regularity.
These patterns can help data scientists and analysts decide which forecasting algorithms to utilise for
predictive modeling.
Sample data refers to the historical time series utilised for data analytics in preparation for forecasting.
A selection of data that is representative of the complete set is called sample data. Statistical
assumptions are built into every machine learning or traditional forecasting method. Data scientists
look at the sample data to see what statistical characteristics it has. This allows them to figure out
which models they can use and what data preprocessing they’ll need to prevent breaking any of their
model’s assumptions.
Many time series forecasting algorithms, for example, presume that the time series does not have a
trend. So, before applying a forecasting algorithm, the data scientist must run a series of statistical tests
on their sample data to see if there is a trend. If a pattern is discovered, they can choose to use a different
model or use differencing to eliminate the trend from their data. Differencing is a statistical technique
for converting a non-stationary or trending time series to a stationary time series.
Training is required for many types of machine learning forecasting models. On the sample data, data
scientists train time series and forecasting models. After the model has been trained, the data scientists
test their predictive modeling or forecasting algorithms on more data to assess the accuracy of their
model selection and to change the model’s parameters to further improve it.
Because time series data can show a range of patterns, it’s often useful to break it down into components,
each of which represents a different pattern category. Decomposition models accomplish this.
Decomposing a time series into numerous components, each representing one of the underlying types of
patterns, is a statistical task. We think of a time series as having three components when we decompose
it into components: a trend component, a seasonal component and residuals or “noise” (anything outside
the trend or seasonality in the time series).
In time series analysis and decomposition, moving average smoothing is frequently the first step. The
moving average eliminates some of the data’s random nature, making it easier to determine whether
or not your data is trending.
One of the most common types of time series decomposition is classical decomposition. Decomposition
based on rates of change and decomposition based on predictability are the two primary types of
classical decomposition. Decomposition based on rates of change can also be additive or multiplicative:
The three components of an additive time series (trend, seasonality and residuals) combine to form
the time series. When the variances around the trend do not vary with the level of the time series, an
additive model is utilised.
The three components of a multiplicative time series multiply to form the time series. If the trend is
proportionate to the time series level, a multiplicative model is applicable.
4
UNIT 11: Time Series Forecasting JGI JAIN
DEEMED-TO-BE UNI VE RSI TY
The phrases ‘forecast’ and ‘forecasting’ are sometimes reserved in hydrology for predictions of value
at specific future dates, whereas the term ‘prediction’ is used for more general estimations, such as the
number of times floods will occur over a lengthy period. Risk and uncertainty are central to forecasting
and prediction. Forecasting is used in the practice of customer demand planning in everyday business
forecasting for manufacturing companies.
A time series consists of data pertaining to a given unit or entity at a number of points in time. A ‘time
series’ is a collection of statistical data organised by time of occurrence or in chronological order. Time
series refers to the numerical data that we obtain at various times in time - the set of observations.
Mathematically, a Time Series is defined by the values Y1, Y2 ……. Yn of a variable Y at time t1, t2 … tn. Here,
Y is a function of time and t and Y t denotes the value of the variable Y at time t. the basic assumption is
that changes witnessed over time in a sample group will be extrapolated to the population.
According to Morris Hamburg, ‘A time series is a set of observations arranged in chronological order.’
According to Croxton and Cowden, ‘A time series consists of data arranged chronologically’.
A time series is a historical series of statistical data. Since these statistical data are historical, they
are subject to the influences of all the changes that may occur over any period of time. The usual
5
JGI JAIN
DEEMED-TO-BE UNI VE RSI TY
Financial Analytics
classification of the influences affecting statistical data recording over time is one based upon the
nature of the influence. Classified in this manner, these influences are as follows:
Secular
variations
or trend
Long term
Cyclical
Regular
Seasonal
Short term
Irregular / eratic
Several techniques are available to forecast time-series data that are stationary or that include no
significant trend, cyclical or seasonal effects. These techniques are called smoothening techniques
because the forecasts are based on smoothening out the irregular fluctuation effects in time series data.
Smoothening
Techniques
Naive
Averaging Exponential
Forecasting
Model Smoothening
Model
Moving Weighted
Simple Average Semi Average
Average Moving
Model Model
Model Average Model
Using averaging models, a forecaster enters information from several time periods into the forecast
and smoothens the data. Averaging models are computed by averaging data from several time periods
and using the average as forecast for the next time period.
Let us now discuss the type of averaging models i.e., moving average and weighted moving average:
6
UNIT 11: Time Series Forecasting JGI JAIN
DEEMED-TO-BE UNI VE RSI TY
The period of the moving average is the first item decided in this procedure. It involves deciding on
the amount of successive elements for which the average will be calculated each time. If the moving
average period is set to 5 years, months, weeks or days (as the case may be), the arithmetic average
of the first 5 items (numbers 1,2,3,4,5) is placed against item no. 3 and the arithmetic average of item
nos. 2, 3, 4, 5, 6 are placed against item no. 4. This method would be continued until the last five items’
arithmetic the average was obtained.
Steps for calculating the odd number of years (3, 5, 7 and 9) i.e., calculation of 3 yearly moving averages
include the following steps:
1. Compute the value of the first three years (1, 2, 3) and place the three-year total against the middle
year (i.e., 2nd year).
2. Leave the first year’s value and add up the values of the next three years i.e., 2, 3, 4 and place the
three year total against the middle year i.e., 3rd year.
3. This process must be continued until the last year’s value is taken for calculating the moving
average.
4. The three yearly total must be divided by 3 and placed in next column. This is the trend value of
moving average.
a + b + c, b c d, c d e
3 3 3
a b c d e, b c d e f, c d e f g
5 5 5
Year 1 2 3 4 5 6 7 8 9 10 11 12
Sales 5.2 4.9 5.5 4.9 5.2 5.7 5.4 5.8 5.9 6.00 5.2 4.8
7
JGI JAINDEEMED-TO-BE UNI VE RSI TY
Financial Analytics
Solution:
Year Sales 3 year moving total 3 year moving 5 year moving 5 year moving
average total average
1 5.2 - - - -
2 4.9 15.6 5.2 - -
3 5.5 15.3 5.1 25.7 5.14
4 4.9 15.6 5.2 26.2 5.24
5 5.2 15.8 5.27 26.7 5.34
6 5.7 16.3 5.41 27.0 5.4
7 5.4 16.9 5.63 28.0 5.6
8 5.8 17.1 5.7 28.8 5.76
9 5.9 17.7 5.23 28.3 5.66
10 6.00 17.1 5.7 27.7 5.54
11 5.2 16.0 5.33 - -
12 4.8 - - - -
Working notes:
1st moving total = 5.2 + 4.9 + 5.5 = 15.6
2nd moving average = 4.9 + 5.5 + 4.9 = 15.3 and so on….
1st moving average = 15.6 / 3 = 5.2
2nd moving average = 15.3 / 3 = 5.1 and so on…
The weighted moving average (WMA) is a technical indicator that traders use to decide whether to
buy or sell a stock. Recent data points are given more weight, whereas older data points are given less.
Each observation in the data collection is multiplied by a predefined weighting factor to generate the
weighted moving average.
The weighted moving average is more accurate than the simple moving average in determining
trend direction since all numbers in the data set are given the same weight. The WMA is calculated by
multiplying each number in the data set by a predefined weight and adding the results.
When calculating the weighted moving average, the most recent data points are given more weight,
while the oldest data points are given less. It’s utilised when the figures in a data collection have varied
weights when compared to one another. The total weight should be one hundred percent or one.
8
UNIT 11: Time Series Forecasting JGI JAIN
DEEMED-TO-BE UNI VE RSI TY
Find the trend for the following series using a three-year weighted moving average with weights 1, 2
and 1.
Year 1 2 3 4 5 6 7
Value 2 4 5 7 8 10 13
Solution:
The weights of the three years are respectively 1, 2 and 1 and their sum is 1 + 2 + 1 = 4
∑w = 4
Year (i) Values Y (ii) 3-yearly weighted moving 3-yearly weighted moving average
totals Yw (iii) (iii) / ∑w
1 2 - -
2 4 (1 x 2) + (2 x 4) + (1 x 5) = 15 15 / 4 = 3.75
3 5 (1 x 4) + (2 x 5) + (1 x 7) = 21 21 / 4 = 5.25
4 7 (1 x 5) + (2 x 7) + (1 x 8) = 27 27 / 4 = 6.75
5 8 (1 x 7) + (2 x 8) + (1 x 10) = 33 33 / 4 = 8.25
6 10 (1 x 8) + (2 x 10) + (1 x 13) = 41 41 / 4 = 10.25
7 13 - -
Statistics is a collection of techniques that can be used to solve key data queries.
Statistics are required to convert observations into information and to answer queries regarding
samples of data.
The statistical method, which is normally used for statistical forecasting and which deals with time-
based data can be referred to time series data and the statistical models which are built for the
purpose are known as time series modeling.
A time series consists of data pertaining to a given unit or entity at a number of points in time. An
arrangement of statistical data in accordance with time of occurrence or in a chronological order
is called a ‘time series’.
A time series is a historical series of statistical data. Since these statistical data are historical, they
are subject to the influences of all the changes that may occur over any period of time.
Several techniques are available to forecast time-series data that are stationary or that include no
significant trend, cyclical or seasonal effects. These techniques are called smoothening techniques.
9
JGI JAIN
DEEMED-TO-BE UNI VE RSI TY
Financial Analytics
Averaging models are computed by averaging data from several time periods and using the average
as forecast for the next time period.
Moving average method is a simple device of reducing fluctuations and obtaining trend values with
a fair degree of accuracy.
The process of averaging smoothens the curve and reduces the fluctuations.
The weighted moving average (WMA) is a technical indicator that traders use to decide whether to
buy or sell a stock.
The WMA is calculated by multiplying each number in the data set by a predefined weight and
adding the results.
11.6 GLOSSARY
Statistics: It is a collection of techniques that can be used to solve key data queries. You can transform
raw observations into information that you can comprehend and share using descriptive statistical
methods.
Forecasting: It is the process of estimation in unknown situations. Prediction is a similar, but more
general term.
Time series: It consists of data pertaining to a given unit or entity at a number of points in time. A
‘time series’ is a collection of statistical data organised by time of occurrence or in chronological
order.
Moving average method: It is a basic tool for decreasing volatility and producing somewhat
accurate trend readings.
The demand for some specific SKUs from a single product category had undergone unusual fluctuation
at a client company (a Multistore Retailer). The client wanted to create a forecasting model to predict
demand for certain SKUs for the next 1 to 12 months. Monthly data for the price, sales and around 50
current-period or lagged potential predictor factors were included in a time-series dataset. To forecast
future demand, an ensemble of LSTM and Autoregressive Time-Series Model was built. Forecasted
demand was used by the client company to better control production and inventory costs and boost
profitability.
Rapid middle-class wealth growth in India is producing periodic excess demand and big surges in the
need for specific SKUs in the client’s manufacturing process. Furthermore, fresh supplies of identical
products on the market appeared frequently, resulting in periodic oversupply and, as a result, price
reductions due to competition. Our customer needs to forecast future demand fluctuations to better
manage product stocks and increase profitability.
10
UNIT 11: Time Series Forecasting JGI JAIN
DEEMED-TO-BE UNI VE RSI TY
The goal of the study was to create a demand forecasting model for a certain product category’s SKU.
The Advanced Analytics team created a time-series analysis dataset, converting all series to monthly
and accounting for missing values, holidays and sales seasons, among other things. The most promising
linear and nonlinear predictors, lagged predictors and combinations of predictors were identified using
variable selection methods on more than 20 macroeconomic variables. The mean absolute prediction
error was used to calculate predictive power. More than ten different models were researched and
assessed to choose the best five models for each prediction time horizon (1,2,3,6,9 & 12 months). The
forecast simulator was created using an ensemble of LSTM and Autoregressive Time-Series Models to
forecast 1, 2, 3, 6, 9 and 12 months into the future, with serial correlation (the correlation over time of the
impact of unobserved variables on the variable being predicted—in this case, demand) appropriately
corrected. The ensemble method aggregated forecasts from numerous models, improving the forecast
accuracy.
The client’s management team was able to enter updated values of predictor factors each month and
forecast the future demand of the specific SKU using a Web-based forecasting tool. Following that, the
client organisation evaluated the model by comparing anticipated and actual values for the first few
months.
Questions
1. What is the goal of the above case study?
(Hint: Create a demand forecasting model)
2. Which technique of forecasting is utilised by the company in the above case?
(Hint: Time series forecasting analysis)
1. Explain the concept of time series forecasting. Also, state the components of time series analysis.
2. How will you distinguish between the concept of moving and the weighted moving average?
11
JGI JAINDEEMED-TO-BE UNI VE RSI TY
Financial Analytics
days) is taken as the trend value for the middle point of the period of moving average. The process
of averaging smoothens the curve and Reduces the fluctuations.
A technical indicator used by traders to determine whether to buy or sell a company is the weighted
moving average (WMA). Recent data points are given more weight, whereas older data points are
given less. Each observation in the data collection is multiplied by a predefined weighting factor to
generate the weighted moving average.
Refer to Section Moving Average and Weighted Moving Average
https://www.techtarget.com/searcherp/definition/financial-analytics
https://www.careerizma.com/careers/financial-analyst/
Make a group of three/four friends to discuss the concept of time series forecasting.
12