SlideShare a Scribd company logo
TIME SERIES FORECASTING
AUTOREGRESSIVE INTEGRATED MOVING AVERAGE(ARIMA)
A Simplistic Explainer Series For Citizen Data Scientists
J o u r n e y T o w a r d s A u g m e n t e d A n a l y t i c s
Introduction with
Example
Introduction
• ARIMA stands for Autoregressive Integrated Moving Average model
• An Auto Regressive Integrated Moving Average (ARIMA) model
predicts future values of a time series by a linear combination of its
past values and a series of errors.
• This method is suitable for forecasting when data is stationary/non
stationary, univariate and has any type of data pattern : level/trend
/seasonality/cyclicity
Example
Let’s take an example of month wise
Nifty closing observations :
The plot of these data suggests that
this is non stationary data showing
gradual upward trend, as shown in
figure below
Hence, we can choose ARIMA
algorithm for forecasting because the
data exhibits non stationarity and
trend
Actual values
Months Index
M1 7000
M2 7600
M3 7800
M4 8000
M5 8200
M6 8400
M7 8600
M8 8800
M9 8400
M10 8000
Forecasted values
M11 8350
M12 8650
M13 8780
M14 8480
M15 8160
Standard Tuning
Parameters
Standard tuning parameters
Note : Refer calculations section to understand how Auto regression(p), differencing(d) and moving average(q) works
Model
parameters :
In ARIMA, there are mainly three parameters to be set to
fit the model :
p: This is the component to apply autoregressive model on series
d: This is the component to apply differencing on series : Basically it converts non
stationary data to stationary ( stationary series : the series remains at a fairly
constant level over time)
q: This is the component to apply moving average model on series
Model
approach:
In ARIMA, there are two approaches to fitting a model :
Automatic and Manual
When p, d and q are automatically selected by system than
it’s called automatic approach and when p, d and q are
manually input by user than it’s called manual approach
For better forecasts, automatic approach should be chosen,
as in this approach, model automatically selects and
applies the right parameters based on the nature of data
Forecast
period :
For both type of approaches , user has to input the
forecast period value
For example, if user wants to predict the sales value for 10
periods ahead then this value should be input as 10
Sample UI For
Input/Tuning
Parameters And Output
Sample UI for Selecting Inputs
& Applying Tuning Parameters
Select the variable you would like
to Forecast
Months
Nifty closing
If user changes the approach
to Manual then this box
should be displayed, showing
additional provision to set p ,
d and q values along with
forecast period
Tuning parameters
Approach
Forecast
Period
Automatic
Approach
Forecast
Period
AR(p)
I(d)
MA(q)
Manual
By default this box should be
displayed with default
approach as Automatic. In
this case parameters to fit
ARIMA will be automatically
detected and applied by
algorithm
Select the time stamp
Months
Nifty closing
Sample UI for output Actual values
Months Index
M1 7000
M2 7600
M3 7800
M4 8000
M5 8200
M6 8400
M7 8600
M8 8800
M9 8400
M10 8000
Forecasted values
M11 8350
M12 8650
M13 8780
M14 8480
M15 8160
Output will contain forecasted values based on user specified
time period along with line chart showing actual and
forecasted series , prediction accuracy and parameters values
decided by the algorithm
Limitations
Limitations
Time dependent error ( decreasing with time)Time independent error ( fairly constant over time & lying within certain range)
Figure 1
Figure 2
The Forecast error also known
as “Residuals” should show
nearly constant trend over time
i.e. it should be time
independent as shown in the
figure 1 below in contrast to the
increasing/ decreasing trend
shown in figure 2 below:
ARIMA model is suggested for
short term forecasting
There should be at least 50
observations in the input data
ARIMA is only for univariate
data forecasts , but there might
be other variables affecting the
output/dependent variable.
ARIMA doesn’t take into
account the influence of other
predictors while forecasting,
hence forecasts made might not
be accurate
Business Case
Business use case
Business benefit:
• A pharmaceutical
company can make use of
these forecasts for better
planning of drug
production
• It also helps in balancing
supply and demand for
the drugs
Business problem :
• A pharmaceutical
company wants to predict
the sales of drug for next
two months based on past
12 months drug sales data
• Data pattern : Input data
exhibits non stationarity
and cyclical pattern
Calculations
Calculations - Autoregression (AR)
• In an autoregressive model, which is one of the components in ARIMA model, we
forecast the variable of interest using a linear combination of past values of the variable
• The term autoregression indicates that it is a regression of the variable against itself
• An autoregressive model of order p, denoted by AR(p) model, can be written as
where ,
c is a constant,
∅ is lag’s coefficient,
𝐞 𝒕 is an error term,
𝐩 is autoregressive model of order
• This is like a multiple regression but with lagged values of yt as predictors
• Order of this component (order of autoregression : AR) is given by parameter p while
fitting the model : ARIMA (p,d, q)
Lagged values : past values of the variable
Calculations - Integration (I) / Differencing (d)
• The second component of ARIMA model i.e. I (for "integration") , is
used to replace the series with the difference between their current
values and the previous values (and this differencing process can be
performed more than once as per the requirement )
• For example,
• The equation for first order differencing is 𝒚 𝒕 = 𝒚 𝒕 − 𝒚 𝒕−𝟏
• Hence, for 𝒚 𝒕 =2 and 𝒚 𝒕−𝟏 = 1 ; 𝒚 𝒕 will be 1
• Similarly second order differencing , 𝒚 𝒕 = (𝒚 𝒕 − 𝒚 𝒕−𝟏) −(𝒚 𝒕−𝟏 −
𝒚 𝒕−𝟐)
• Order of this component (order of differencing) is applied by
parameter d while fitting a model : ARIMA (p,d,q)
Calculations - Moving average (MA)
• A moving average model, the third component in ARIMA uses past
forecast errors as a series in a model
• A Moving average model of order q, denoted by MA(q) model, can be
written as
where ,
yt is predictor ,
c is a constant,
θ is lag’s coefficient,
𝐞 𝒕 is an error term,
q is moving average order
• Order of this component (order of moving average : MA ) is applied by
parameter d while fitting a model : ARIMA (p ,d ,q )
Identification of p,d,q values
• Values of p and q are determined based on the autocorrelation(ACF) and partial auto correlation(PACF) plots
and value of d depends on level of stationarity in data
• In PACF plot, number of spikes indicate the order of the autoregression/AR (value of p in ARIMA(p,d,q))
• For instance, as you can see in the right figure below, there is one spike falling out of range, hence, the order
of AR i.e. value of p would be 1
• In ACF plot, number of spikes indicate the order of the moving average (value of q in ARIMA(p,d,q))
• For instance , as you can see in the left figure there are five spikes falling out of range, hence, the order of
MA i.e. value of q would be 5
Identification of p,d,q values
 Thus, p, d and q parameters in ARIMA (p , d , q) are substituted with integer values where p and q take
any values between 0 to 5 and value of d is set between 0 to 2
 For example, ARIMA(2,1,1) means that you have a second order autoregressive model with a first order
moving average component and series has been differenced once to induce stationarity
 A value of 0 can be used for any of the above mentioned parameters indicating that particular
component (AR/ I/ MA) should not be used. This way, the ARIMA model can be configured to perform
the function of an ARMA model, and even a simple AR, I, or MA model depending on the data
Example
• The automatic approach will select ideal values of Auto
regression(p), differencing(d) and moving average(q)
parameters based on the data pattern
• For instance, if there is non stationarity in data, the algorithm
will apply differencing(d) by applying d=1 in order to make it
stationary
• In case of manual approach, user will select optimum values of
p, d and q parameters, which gives minimum value for MAPE
(Mean absolute percentage error) in order to get better
accuracy. This is a bit iterative process as there may be many
iterations involved till the desired accuracy is achieved
• After the ARIMA model is run, it will provide forecasted values
of target variable(Nifty closing) for user specified periods
ahead , let’s say 5 as shown in blue text in table:
Forecasted values
Actual index
Months Index
M1 7000
M2 7600
M3 7800
M4 8000
M5 8200
M6 8400
M7 8600
M8 8800
M9 8400
M10 8000
Forecasted Index
M11 8350
M12 8650
M13 8780
M14 8480
M15 8160
Model Accuracy
• Along with forecasted values, MAPE and prediction accuracy is displayed so user knows how much accurate
the forecasts are
• How MAPE and Accuracy is calculated is explained below :
• Using this formula , MAPE can be calculated for 5 months ahead forecasts using recent most 5 months data
(generally, actual as well as predicted values for recent most 20% data is taken to check accuracy) as shown
in table below:
MAPE :
Where Yt is the actual, known series value for time period t,
Y^t is the forecast value of the variable Y for time period t
N is number of observations
MAPE = 4%
Hence accuracy = 100-MAPE = 96% , So model is accurate
Years Actual Y Predicted Y^ Abs((Actual - predicted)/actual)*100
M12 8400 8350 0.60
M13 8600 8650 0.58
M14 8800 8780 0.23
M15 8400 8480 0.95
M16 8000 8160 2.00
MAPE = Sum(M11 to M15) =4
Accuracy =100-MAPE=96
Want to Learn
More?
Get in touch with us @
support@Smarten.com
And Do Checkout the Learning section
on
Smarten.com
June 2018

More Related Content

PPTX
time series analysis
PPT
Mba 532 2011_part_3_time_series_analysis
PPTX
Time Series Analysis.pptx
PPTX
Time Series Analysis, Components and Application in Forecasting
PDF
Timeseries forecasting
PPT
Univariate, bivariate analysis, hypothesis testing, chi square
PPTX
Time series
PDF
time series analysis
Mba 532 2011_part_3_time_series_analysis
Time Series Analysis.pptx
Time Series Analysis, Components and Application in Forecasting
Timeseries forecasting
Univariate, bivariate analysis, hypothesis testing, chi square
Time series

What's hot (20)

PPTX
Arima model
PPTX
Forecasting Models & Their Applications
PPTX
Machine learning & Time Series Analysis
PPT
Arima model (time series)
PPTX
Measurement of seasonal variations
PDF
Time Series, Moving Average
PDF
Time series forecasting
PDF
Box jenkins method of forecasting
PPTX
Lesson 2 stationary_time_series
PDF
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet Mahana
PPTX
Time Series Decomposition
PPT
Demand forecasting
PPTX
Lesson 5 arima
PPTX
Operations research - an overview
PPTX
Demand forecasting by time series analysis
PDF
Operations research-an-introduction
PPT
Simulation Techniques
PDF
Machine Learning Strategies for Time Series Prediction
Arima model
Forecasting Models & Their Applications
Machine learning & Time Series Analysis
Arima model (time series)
Measurement of seasonal variations
Time Series, Moving Average
Time series forecasting
Box jenkins method of forecasting
Lesson 2 stationary_time_series
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet Mahana
Time Series Decomposition
Demand forecasting
Lesson 5 arima
Operations research - an overview
Demand forecasting by time series analysis
Operations research-an-introduction
Simulation Techniques
Machine Learning Strategies for Time Series Prediction
Ad

Similar to What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis? (20)

PPTX
What is ARIMAX Forecasting and How is it Used for Enterprise Analysis?
PPTX
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
PDF
Different Models Used In Time Series - InsideAIML
PDF
Module 5.pptx (Data science in engineering)
PPTX
ARIMA MODEL USED FOR TIME SERIES FORECASTING
PPTX
Air Passenger Prediction Using ARIMA Model
PDF
Time series modelling arima-arch
PDF
Enhance interval width of crime forecasting with ARIMA model-fuzzy alpha cut
PDF
arimamodel-170204090012.pdf
PPTX
Dynamic Pricing Of stocks
PDF
Social_Distancing_DIS_Time_Series
PDF
Non-Temporal ARIMA Models in Statistical Research
PDF
Short-Term Load Forecasting Using ARIMA Model For Karnataka State Electrical ...
PPTX
PDF
Forecasting Methodology Used in Restructured Electricity Market: A Review
PPTX
Auto Regression in Econometrics, DU.pptx
PPTX
HR Cost Forecasting using ARIMA modelling
PDF
Forecasting Retail Sales with ARIMA_ A Case Study in Time Series Analysis
PDF
timeseries cheat sheet with example code for R
PPTX
Time series analysis
What is ARIMAX Forecasting and How is it Used for Enterprise Analysis?
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
Different Models Used In Time Series - InsideAIML
Module 5.pptx (Data science in engineering)
ARIMA MODEL USED FOR TIME SERIES FORECASTING
Air Passenger Prediction Using ARIMA Model
Time series modelling arima-arch
Enhance interval width of crime forecasting with ARIMA model-fuzzy alpha cut
arimamodel-170204090012.pdf
Dynamic Pricing Of stocks
Social_Distancing_DIS_Time_Series
Non-Temporal ARIMA Models in Statistical Research
Short-Term Load Forecasting Using ARIMA Model For Karnataka State Electrical ...
Forecasting Methodology Used in Restructured Electricity Market: A Review
Auto Regression in Econometrics, DU.pptx
HR Cost Forecasting using ARIMA modelling
Forecasting Retail Sales with ARIMA_ A Case Study in Time Series Analysis
timeseries cheat sheet with example code for R
Time series analysis
Ad

More from Smarten Augmented Analytics (20)

PPTX
Hot Lead Prediction Analytics Use Case - Smarten
PPTX
Crop Yield Predictive Analytics Use Case – Smarten
PPTX
Crime Type Prediction - Augmented Analytics Use Case – Smarten
PPTX
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
PPTX
What Is Generalized Linear Regression with Gaussian Distribution And How Can ...
PPTX
What Is Random Forest Classification And How Can It Help Your Business?
PPTX
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
PPTX
Students' Academic Performance Predictive Analytics Use Case – Smarten
PPTX
Random Forest Regression Analysis Reveals Impact of Variables on Target Values
PPTX
Gradient Boosting Regression Analysis Reveals Dependent Variables and Interre...
PPTX
What is Simple Linear Regression and How Can an Enterprise Use this Technique...
PPTX
What is Multiple Linear Regression and How Can it be Helpful for Business Ana...
PPTX
Fraud Mitigation Predictive Analytics Use Case – Smarten
PPTX
Quality Control Predictive Analytics Use Case - Smarten
PPTX
Machine Maintenance Management Predictive Analytics Use Case - Smarten
PPTX
Predictive Analytics Using External Data Augmented Analytics Use Case - Smarten
PPTX
Marketing Optimization Augmented Analytics Use Cases - Smarten
PPTX
Human Resource Attrition Augmented Analytics Use Case - Smarten
PPTX
Customer Targeting Augmented Analytics Use Case - Smarten
PPTX
What is Naïve Bayes Classification and How is it Used for Enterprise Analysis?
Hot Lead Prediction Analytics Use Case - Smarten
Crop Yield Predictive Analytics Use Case – Smarten
Crime Type Prediction - Augmented Analytics Use Case – Smarten
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
What Is Generalized Linear Regression with Gaussian Distribution And How Can ...
What Is Random Forest Classification And How Can It Help Your Business?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
Students' Academic Performance Predictive Analytics Use Case – Smarten
Random Forest Regression Analysis Reveals Impact of Variables on Target Values
Gradient Boosting Regression Analysis Reveals Dependent Variables and Interre...
What is Simple Linear Regression and How Can an Enterprise Use this Technique...
What is Multiple Linear Regression and How Can it be Helpful for Business Ana...
Fraud Mitigation Predictive Analytics Use Case – Smarten
Quality Control Predictive Analytics Use Case - Smarten
Machine Maintenance Management Predictive Analytics Use Case - Smarten
Predictive Analytics Using External Data Augmented Analytics Use Case - Smarten
Marketing Optimization Augmented Analytics Use Cases - Smarten
Human Resource Attrition Augmented Analytics Use Case - Smarten
Customer Targeting Augmented Analytics Use Case - Smarten
What is Naïve Bayes Classification and How is it Used for Enterprise Analysis?

Recently uploaded (20)

PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Introduction to Artificial Intelligence
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
history of c programming in notes for students .pptx
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
System and Network Administration Chapter 2
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Transform Your Business with a Software ERP System
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administraation Chapter 3
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPT
Introduction Database Management System for Course Database
PDF
top salesforce developer skills in 2025.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Introduction to Artificial Intelligence
wealthsignaloriginal-com-DS-text-... (1).pdf
How to Migrate SBCGlobal Email to Yahoo Easily
history of c programming in notes for students .pptx
Design an Analysis of Algorithms I-SECS-1021-03
System and Network Administration Chapter 2
Designing Intelligence for the Shop Floor.pdf
Understanding Forklifts - TECH EHS Solution
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Transform Your Business with a Software ERP System
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administraation Chapter 3
Navsoft: AI-Powered Business Solutions & Custom Software Development
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Introduction Database Management System for Course Database
top salesforce developer skills in 2025.pdf
PTS Company Brochure 2025 (1).pdf.......
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
How to Choose the Right IT Partner for Your Business in Malaysia

What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?

  • 1. TIME SERIES FORECASTING AUTOREGRESSIVE INTEGRATED MOVING AVERAGE(ARIMA) A Simplistic Explainer Series For Citizen Data Scientists J o u r n e y T o w a r d s A u g m e n t e d A n a l y t i c s
  • 3. Introduction • ARIMA stands for Autoregressive Integrated Moving Average model • An Auto Regressive Integrated Moving Average (ARIMA) model predicts future values of a time series by a linear combination of its past values and a series of errors. • This method is suitable for forecasting when data is stationary/non stationary, univariate and has any type of data pattern : level/trend /seasonality/cyclicity
  • 4. Example Let’s take an example of month wise Nifty closing observations : The plot of these data suggests that this is non stationary data showing gradual upward trend, as shown in figure below Hence, we can choose ARIMA algorithm for forecasting because the data exhibits non stationarity and trend Actual values Months Index M1 7000 M2 7600 M3 7800 M4 8000 M5 8200 M6 8400 M7 8600 M8 8800 M9 8400 M10 8000 Forecasted values M11 8350 M12 8650 M13 8780 M14 8480 M15 8160
  • 6. Standard tuning parameters Note : Refer calculations section to understand how Auto regression(p), differencing(d) and moving average(q) works Model parameters : In ARIMA, there are mainly three parameters to be set to fit the model : p: This is the component to apply autoregressive model on series d: This is the component to apply differencing on series : Basically it converts non stationary data to stationary ( stationary series : the series remains at a fairly constant level over time) q: This is the component to apply moving average model on series Model approach: In ARIMA, there are two approaches to fitting a model : Automatic and Manual When p, d and q are automatically selected by system than it’s called automatic approach and when p, d and q are manually input by user than it’s called manual approach For better forecasts, automatic approach should be chosen, as in this approach, model automatically selects and applies the right parameters based on the nature of data Forecast period : For both type of approaches , user has to input the forecast period value For example, if user wants to predict the sales value for 10 periods ahead then this value should be input as 10
  • 8. Sample UI for Selecting Inputs & Applying Tuning Parameters Select the variable you would like to Forecast Months Nifty closing If user changes the approach to Manual then this box should be displayed, showing additional provision to set p , d and q values along with forecast period Tuning parameters Approach Forecast Period Automatic Approach Forecast Period AR(p) I(d) MA(q) Manual By default this box should be displayed with default approach as Automatic. In this case parameters to fit ARIMA will be automatically detected and applied by algorithm Select the time stamp Months Nifty closing
  • 9. Sample UI for output Actual values Months Index M1 7000 M2 7600 M3 7800 M4 8000 M5 8200 M6 8400 M7 8600 M8 8800 M9 8400 M10 8000 Forecasted values M11 8350 M12 8650 M13 8780 M14 8480 M15 8160 Output will contain forecasted values based on user specified time period along with line chart showing actual and forecasted series , prediction accuracy and parameters values decided by the algorithm
  • 11. Limitations Time dependent error ( decreasing with time)Time independent error ( fairly constant over time & lying within certain range) Figure 1 Figure 2 The Forecast error also known as “Residuals” should show nearly constant trend over time i.e. it should be time independent as shown in the figure 1 below in contrast to the increasing/ decreasing trend shown in figure 2 below: ARIMA model is suggested for short term forecasting There should be at least 50 observations in the input data ARIMA is only for univariate data forecasts , but there might be other variables affecting the output/dependent variable. ARIMA doesn’t take into account the influence of other predictors while forecasting, hence forecasts made might not be accurate
  • 13. Business use case Business benefit: • A pharmaceutical company can make use of these forecasts for better planning of drug production • It also helps in balancing supply and demand for the drugs Business problem : • A pharmaceutical company wants to predict the sales of drug for next two months based on past 12 months drug sales data • Data pattern : Input data exhibits non stationarity and cyclical pattern
  • 15. Calculations - Autoregression (AR) • In an autoregressive model, which is one of the components in ARIMA model, we forecast the variable of interest using a linear combination of past values of the variable • The term autoregression indicates that it is a regression of the variable against itself • An autoregressive model of order p, denoted by AR(p) model, can be written as where , c is a constant, ∅ is lag’s coefficient, 𝐞 𝒕 is an error term, 𝐩 is autoregressive model of order • This is like a multiple regression but with lagged values of yt as predictors • Order of this component (order of autoregression : AR) is given by parameter p while fitting the model : ARIMA (p,d, q) Lagged values : past values of the variable
  • 16. Calculations - Integration (I) / Differencing (d) • The second component of ARIMA model i.e. I (for "integration") , is used to replace the series with the difference between their current values and the previous values (and this differencing process can be performed more than once as per the requirement ) • For example, • The equation for first order differencing is 𝒚 𝒕 = 𝒚 𝒕 − 𝒚 𝒕−𝟏 • Hence, for 𝒚 𝒕 =2 and 𝒚 𝒕−𝟏 = 1 ; 𝒚 𝒕 will be 1 • Similarly second order differencing , 𝒚 𝒕 = (𝒚 𝒕 − 𝒚 𝒕−𝟏) −(𝒚 𝒕−𝟏 − 𝒚 𝒕−𝟐) • Order of this component (order of differencing) is applied by parameter d while fitting a model : ARIMA (p,d,q)
  • 17. Calculations - Moving average (MA) • A moving average model, the third component in ARIMA uses past forecast errors as a series in a model • A Moving average model of order q, denoted by MA(q) model, can be written as where , yt is predictor , c is a constant, θ is lag’s coefficient, 𝐞 𝒕 is an error term, q is moving average order • Order of this component (order of moving average : MA ) is applied by parameter d while fitting a model : ARIMA (p ,d ,q )
  • 18. Identification of p,d,q values • Values of p and q are determined based on the autocorrelation(ACF) and partial auto correlation(PACF) plots and value of d depends on level of stationarity in data • In PACF plot, number of spikes indicate the order of the autoregression/AR (value of p in ARIMA(p,d,q)) • For instance, as you can see in the right figure below, there is one spike falling out of range, hence, the order of AR i.e. value of p would be 1 • In ACF plot, number of spikes indicate the order of the moving average (value of q in ARIMA(p,d,q)) • For instance , as you can see in the left figure there are five spikes falling out of range, hence, the order of MA i.e. value of q would be 5
  • 19. Identification of p,d,q values  Thus, p, d and q parameters in ARIMA (p , d , q) are substituted with integer values where p and q take any values between 0 to 5 and value of d is set between 0 to 2  For example, ARIMA(2,1,1) means that you have a second order autoregressive model with a first order moving average component and series has been differenced once to induce stationarity  A value of 0 can be used for any of the above mentioned parameters indicating that particular component (AR/ I/ MA) should not be used. This way, the ARIMA model can be configured to perform the function of an ARMA model, and even a simple AR, I, or MA model depending on the data
  • 20. Example • The automatic approach will select ideal values of Auto regression(p), differencing(d) and moving average(q) parameters based on the data pattern • For instance, if there is non stationarity in data, the algorithm will apply differencing(d) by applying d=1 in order to make it stationary • In case of manual approach, user will select optimum values of p, d and q parameters, which gives minimum value for MAPE (Mean absolute percentage error) in order to get better accuracy. This is a bit iterative process as there may be many iterations involved till the desired accuracy is achieved • After the ARIMA model is run, it will provide forecasted values of target variable(Nifty closing) for user specified periods ahead , let’s say 5 as shown in blue text in table: Forecasted values Actual index Months Index M1 7000 M2 7600 M3 7800 M4 8000 M5 8200 M6 8400 M7 8600 M8 8800 M9 8400 M10 8000 Forecasted Index M11 8350 M12 8650 M13 8780 M14 8480 M15 8160
  • 21. Model Accuracy • Along with forecasted values, MAPE and prediction accuracy is displayed so user knows how much accurate the forecasts are • How MAPE and Accuracy is calculated is explained below : • Using this formula , MAPE can be calculated for 5 months ahead forecasts using recent most 5 months data (generally, actual as well as predicted values for recent most 20% data is taken to check accuracy) as shown in table below: MAPE : Where Yt is the actual, known series value for time period t, Y^t is the forecast value of the variable Y for time period t N is number of observations MAPE = 4% Hence accuracy = 100-MAPE = 96% , So model is accurate Years Actual Y Predicted Y^ Abs((Actual - predicted)/actual)*100 M12 8400 8350 0.60 M13 8600 8650 0.58 M14 8800 8780 0.23 M15 8400 8480 0.95 M16 8000 8160 2.00 MAPE = Sum(M11 to M15) =4 Accuracy =100-MAPE=96
  • 22. Want to Learn More? Get in touch with us @ support@Smarten.com And Do Checkout the Learning section on Smarten.com June 2018