You are on page 1of 28

g Average (ARIMA) Model for fore

Financial
Engineering
Term Paper

Submitted to:
Dr. Nalini P.
Tripathy

Group 6:
Shradha Saraogi 2012PGP052
Deepak P 2012PGP058
VLV Prasanna Kumar

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Contents
Introduction................................................................................................................ 2
Literature Review....................................................................................................... 2
Objectives of the Study.............................................................................................. 3
Time Series Modeling................................................................................................. 3
ARIMA (p, d, q) Model................................................................................................. 4
Data and Methodology............................................................................................... 5
Empirical Analysis....................................................................................................... 7
MAE to assess the Forecasting Accuracy..................................................................13
MAPE to assess the Forecasting Power.....................................................................13
Ljung-Box Test or White Noise Test...........................................................................14
ARCH Test................................................................................................................. 14
Concluding Observations.......................................................................................... 15
Limitations of the Study........................................................................................... 15
References............................................................................................................... 16
Appendices............................................................................................................... 18

Deepak | Prasanna | Ram Prasad | Shradha


1 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Introduction
The use of intelligent systems and advanced techniques for market prediction has
been widely established. The development of accurate techniques is critical to
economists, investors and analysts. The traditional statistical models used in the
recent years for predicting financial markets fail to capture the inter relationships
between market variables. Hence, advanced forecasting models which could explain
the relationship among market variables in a much better way and can predict with
more accuracy have been developed.
Another trend that is witnessed in this field is the development of the hybrid
models, a combination of several models. The basic idea of the model combination
in forecasting is to use each models unique feature to capture different patterns in
the data and thereby improve the accuracy.
The motivation behind this paper is to find out how efficiently ARIMA model could be
employed to forecast the Indian Derivatives market.
In this paper we will try to find the fit of ARIMA model (a stationary time series
model) in the Indian Derivatives Market. This study involves forecasting the values
of MCX Commodity Index (MCX COMDEX), Gold & Silver Spot prices and CNX NIFTY.
The predicted values are then compared with the actual values to check the
efficiency of the model for each of the time series.

Literature Review
ARIMA (Auto Regressive Integrated Moving Average) Model is an amalgamation of
Auto Regressive (AR), Integrated (I) and Moving Average (MA) Models. The output of
this model depends on current input, previous input and previous outputs. Lot of
study has been done regarding the efficiency of this model in predicting various
events like Stock Markets, Currency Exchange Values, Commodity prices etc. Some
other works carried out in this area also include the comparison of this forecasting
model with other models like Neural Networks, Hybrid models etc. and finding out
the most accurate of all these models in predicting exactly some of the above
mentioned events.
Ghiassi et al. (2005) compared the forecasting performance of a dynamic Neural
Network with traditional neural networks and ARMA models and found that
performance of Neural Network was much better than the ARMA models. Dr.
Tripathy N. (2011) in the paper A Comparison of Artificial Neural Network (ANN)
Model & Auto Regressive Integrated Moving Average (ARIMA) Model for Forecasting
Indian Stock Market compared the ANN model and ARIMA model for forecasting the
next day close value of stock price. Mean Absolute Error (MAE) and Mean Absolute
Deepak | Prasanna | Ram Prasad | Shradha
2 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Percentage Error (MAPE) were used as factors for evaluating the performance of the
models. Dunis et al. (2012) in his paper compared the performance of ANN

model and the traditional ARMA model in forecasting EUR/USD exchange rate
during the financial crisis of 2007 and found that ANN model was far superior
to the traditional ARMA model.
Variations of ARMA model such as the vector ARMA for forecasting of Treasury bill
rates and changes in money supply have been discussed by Aksu et. all in 1991 and
seasonal fractionally differenced ARMA model for long range forecasting of revenue
of IBM by Ray in 1993. Swiss National Bank (SNB) uses ARIMA model for forecasting
the inflation over the short term period and literature regarding the model
employed and factors considered regarding this has also been studied. Apart from
this, ARIMA has been used in forecasting a wide variety of items. For instance Lisa
Bianchi (1998) used ARIMA to predict arrivals in a call center in his paper
Improving forecasting for telemarketing centers by ARIMA modeling with
intervention. There have been attempts to combine the different models to form a
hybrid model, Zhang, G. Peter (2003), Time Series Forecasting Using a Hybrid
ARIMA and Neural Network Model.
There have been a number of models built to predict the commodity prices as well.
Milton S. Boyd tried comparing ANN and ARIMA in his paper titled A comparison of
Artificial Neural Network and time series models for forecasting commodity prices.

Objectives of the Study


The following are the objectives of this study project:

To use ARIMA model and forecast the future prices in the Indian derivative
market
To test the accuracy of the ARIMA models that are implemented
To determine predictive power of ARIMA model in Indian commodity market and
stock market
To determine the adequacy of the ARIMA model in predicting commodity and
stock prices
To determine if ARIMA model is the best model for predicted Indian Derivative
market

Time Series Modeling


Time series analysis is about the study of data collected through time. There are
different types of time series data possible:
Purely random process (non-stationary) A stochastic process, where each
element is (statistically) independent of every other element
Deepak | Prasanna | Ram Prasad | Shradha
3 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Stationary Those time series those whose statistical properties remain


constant over time. This consistency may range even up-to the fourth moments
(expectations, variance, skew-ness and kurtosis)

MCX Spot Index (MCXCOMDEX)


MCX Future Index (MCXCOMDEX) is a significant barometer for the performance

of commodities market and would be an ideal investment tool in


commodities market over a period of time. MCX also computes the daily Spot
Index value (MCXCOMDEX) for its MCX COMDEX, MCX AGRI, MCX METAL &
MCX ENERGY by using the current spot prices of the respective commodities
vis a vis their spot prices in the same base period of average of 2001. The
MCX COMDEX is the simple weighted average of the three group indices MCX AGRI, MCX METAL & MCX ENERGY. The group indices are computed
based on Geometric Mean.
Gold & Silver Spot
In India, Gold and silver prices generally rise when sentiments on the economy and
the financial markets are bearish or there is uncertainty over future trends. Riding
the rally, gold exchange-traded funds (ETFs) in India gave their highest ever
monthly return of 15% in August 2011. All this came with increased volatility; there
were many months when both gold and silver gave negative returns. Gold and silver
follow an almost similar pattern and historically they have maintained a ratio that
has fluctuated widely between 15 and 100 since the 1970s.
CNX NIFTY
The CNX Nifty, also called the Nifty 50 or simply the Nifty, is National Stock
Exchange of India's benchmark index for Indian equity market. 'CNX' in its name
stands for 'CRISIL NSE Index'. The CNX Nifty covers 22 sectors of the Indian
economy and offers investment managers exposure to the Indian market in one
portfolio. The top two contributors (in terms of weight) to CNX Nifty 50 Index include
financial services (25.26%) and IT sector (16.24%). Other sectors like industrial
manufacturing contribute just 0.73% weightage while there is no weightage for
agricultural sector in the index. The index was initially calculated on full market
capitalization methodology. From June 26, 2009, the computation was changed to
free float methodology. The base period for the CNX Nifty index is November 3,
1995.

ARIMA (p, d, q) Model


The data series that we are working on are non-stationary. Therefore, to better
understand the data or to predict future points in the series, we need a uni-variate
model that converts the non-stationary data into a stationary data. One such model
Deepak | Prasanna | Ram Prasad | Shradha
4 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

is ARIMA, Autoregressive Integrated Moving Average, which is one of the most


commonly used linear models. The other models include Non-linear models like
different versions of Artificial Neural Networks (ANN) Model, etc.
Both Autoregressive (AR) and Moving Average (MA) models express different kinds
of stochastic dependence. AR processes encapsulate a Markov-like quality where
the future depends on the past, whereas MA processes combine elements of
randomness from the past using a moving window. An obvious step is to combine
both types of behavior into an ARMA(p, q) model which is obtained by a simple
concatenation.

Xt = 1Xt1 + + pXtp + t + 1t1 + + qtq


Auto-regressive element, p

= lingering effects of preceding scores

Integrated element,

= trends in the data

Moving Average element,


shocks

= lingering effects of preceding random

These are the input parameters for ARIMA. Therefore, some of the questions to be
answered before running the model are - How lingering is lingering? That is, do you
have to take into account just the previous score (or shock) or do you get a better
model if you take into account two or more of the previous scores (or shocks)?
The first three steps in the analysis, identification, estimation, and diagnosis, are
devoted to modeling the patterns in the data. The first step is identification in which
autocorrelation functions (ACFs) and partial autocorrelation functions (PACFs) are
examined to see which of the potential three patterns are present in the data.

Data and Methodology


The study employs the closing prices of MCX COMDEX Index (507 data points),
Gold Spot Prices (501 data points), Silver Spot Prices (513 data points),
and CNX NIFTY Index (441 data points). All the required information for the
study has been derived from the Multi Commodity Exchange (MCX) of India Limited
and National Stock Exchange (NSE) website.
The time period under study is from March, 2012 to November, 2013.
Steps in ARIMA model building:
The first in implementing an ARIMA model is transforming the data to convert nonstationary data into stationary data and to remove the trends or seasonality
present in the data. In many cases we can say if the data is stationary or not by
Deepak | Prasanna | Ram Prasad | Shradha
5 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

observed simple line plot of the data, a more appropriate method would be to plot
the autocorrelation function to observe if the lags are influencing the current value
of data or not. If we find that there is significant autocorrelation present in the data
then it means that data is not stationary. Data can be transformed into stationary
data by simple differencing. The differenced data is then checked for stationary
nature, if the first difference does give us the stationary data then we move on to
second differenced data. This process will continue until we get transform the data
to be stationary. In general, we attain stationary data within first two differenced
data points only. Once the stationary data is obtained, note the degree of difference
value. This will serve as the value of d in ARIMA (p,d,q).
The second step in ARIMA implementation is to identify the autocorrelation
order p and the order of moving averages q. These values can be
obtained from the autocorrelation function (ACF) and partial autocorrelation function
(PACF) of the differenced data. By looking at the autocorrelation function of the
differenced data the order of moving average model can be predicted. This is done
by observed which of the lags is significantly correlated to the current value, if the
second lag in ACF is significantly correlated to the current value then we say that
the value q is 2. Similarly based on the lag that is significantly correlated to the
current value in PACF we predict the order of auto regressive model.
Akaikes information criteria (AIC) and Schwarzs criteria (SC) is utilized for
selecting lags of the model. ARIMA (p, d, q) has the general form:
p(B)(1 B)dYt = + q(B)"t
Or
p(B)Wt = + q(B)"t
Once the ARIMA model parameters are identified the model can be fitted and the
future values can be forecasted using variety of statistical tools that provide various
options for time series analysis. Few of them are SPSS, R, excel plug-ins like
NumXL, XLStat, etc.
In this study project we have used the XLStat plug-in to fit the ARIMA model on
the data in excel.
XLSTAT Time is a powerful statistical software for time series analysis and
forecasting. XLSTAT-Time complements XLSTAT-Pro by providing you with
outstanding functions to find out the degree of dependence between the values of a
time series, to discover trends (seasonal or not), to apply specific pretreatments
such as the Autoregressive Moving Average variants and finally to build predictive
models. XLSTAT-Time offers a wide selection of ARIMA models such as ARMA
Deepak | Prasanna | Ram Prasad | Shradha
6 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

(Autoregressive Moving Average), ARIMA (Autoregressive Integrated


Average) or SARIMA (Seasonal Autoregressive Integrated Moving Average).

Moving

Akaike information criterion (AIC)


It is a measure of the relative quality of a statistical model, for a given set of data.
As such, AIC provides a means for model selection.
AIC deals with the trade-off between the goodness of fit of the model and the
complexity of the model. It is founded on information entropy: it offers a relative
estimate of the information lost when a given model is used to represent the
process that generates the data.
In the general case, the AIC is

where k is the number of parameters in the statistical model, and L is the


maximized value of the likelihood function for the estimated model.
Given a set of candidate models for the data, the preferred model is the one with
the minimum AIC value. Hence AIC not only rewards goodness of fit, but also
includes a penalty that is an increasing function of the number of estimated
parameters. This penalty discourages overfitting (increasing the number of free
parameters in the model improves the goodness of the fit, regardless of the number
of free parameters in the data-generating process).
Ljung-Box Q Statistic:
This statistic can be used to examine residuals from a time series model in order to
see if all underlying population autocorrelations for the errors may be 0 (up to a
specified point). For nearly all models that we consider, the residuals are assumed
to be white noise, meaning that they are identically, independently distributed
(from each other). Thus, the ideal ACF for residuals is that all autocorrelations are
0. This means that Q(m) should be 0 for any lag m. A significant Q(m) for residuals
indicates a possible problem with the model. a p-value is calculated as the
probability past Q(m) in the relevant distribution. A small p-value (for instance, pvalue < .05) indicates the possibility of non-zero autocorrelation within the first m
lags.
In this study project, we have attempted to forecast the future values of various
listings in the Indian derivative market namely MCXSCOMDEX, Gold spot prices and
Silver spot prices. Finally we have implemented ARIMA on CNX Nifty index to
compare the predicting power of ARIMA on derivatives against equity stocks in
general.
Deepak | Prasanna | Ram Prasad | Shradha
7 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Empirical Analysis
MCXCOMDEX
First, we have considered MCXCOMDEX which is considered to be acting as a
significant barometer for the performance of commodities market in India and
would be an ideal investment tool in commodities market over a period of time.

MCXCOMDEX Index prices (Rs.)


5000.00
4500.00
4000.00
3500.00
3000.00
2500.00
2000.00
1500.00
1000.00
500.00
0.00

800.00
600.00
400.00
200.00
0.00
-200.00
-400.00
-600.00
-800.00

Close

First Difference

The above line plot for daily closing prices of MCXCOMDEX shows that the closing
prices of this index do not represent stationary data. The first difference values
plotted are nearer to random walk values can be considered stationary. Also, the
ACF for actual closing prices of MCXCOMDEX have shown significant autocorrelation
between the lag values and the current values.

ACF
20%
10%

ACF

UL

LL

0%
-10%

10

-20%

Autocorrelation Function (ACF) for first differenced MCXCOMDEX closing prices:

Deepak | Prasanna | Ram Prasad | Shradha


8 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Partially Autocorrelation Function (PACF) for first differenced MCXCOMDEX closing


prices:

PACF
15%
10%
5%
0%
-5%
-10%
-15%
-20%
-25%

PACF
1

UL
3

LL
7

10

On observing the ACF and PACF graphs of the first differenced MCXCOMDEX closing
prices we can interpret that the order of auto regression p is 1 which is obtained
from partially auto correlated function and the order of moving averages q is also
1 which is obtained from auto correlated function. Hence according to out
interpretation the best fit model for ARIMA in this case will be ARIMA(1,1,1).
However the actual ARIMA best fit is finalized based on the AIC values calculated
below.
AIC Test: AIC
As we know, Akaike information ARIMA (p,d,q)
Value
Best Model
criterion (AIC) is a measure of ARIMA (1,1,0)
6345.14
Best Model
the
relative
quality
of
a ARIMA (0,1,1)
6345.14
statistical model, for a given set ARIMA (0,1,2)
6347.16
of data. It offers a relative ARIMA (1,1,1)
6347.16
estimate of the information lost ARIMA (2,1,0)
6347.16
when a given model is used to ARIMA (1,1,2)
6349.19
represent the process that ARIMA (2,1,1)
6349.19
6351.23
generates the data. The model ARIMA (2,1,2)
NA
with lowest value AIC is the best ARIMA (0,1,0)
model, in this case we observe that ARIMA (1,1,0) is the best model with lowest AIC
value.

Gold Spot Market Prices


Deepak | Prasanna | Ram Prasad | Shradha
9 | Page

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Economists consider gold prices as a good indicator of the health of the economy. In
the past it has been observed that investors flock to gold when they are protecting
their investments from either a crisis or inflation. When gold prices drop that usually
means the economy is healthy. That's because investors have left gold for other,
more lucrative, investments like stocks, bonds or real estate.

Gold Spot prices (Rs.)


35000

1500.00
1000.00
500.00
0.00
-500.00
-1000.00
-1500.00
-2000.00
-2500.00
-3000.00

30000
25000
20000
15000
10000
5000
0

Spot Price(Rs.)

First Difference

The line plot for spot market prices of GOLD in the commodity market shows that
the spot prices of the commodity do not represent stationary data. The first
difference values plotted are nearer to random walk values can be considered
stationary. Also, the ACF for actual spot prices of GOLD have shown significant
autocorrelation between the lag values and the current values.
Auto Correlation Function (ACF) for first differenced GOLD spot prices:

ACF
15%
10%

ACF

5%

UL

LL

0%
-5%

10

-10%

Partially Auto Correlation Function (PACF) for first differenced GOLD spot prices:

Deepak | Prasanna | Ram Prasad | Shradha


10 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

PACF
15%
10%

PACF

5%

UL

LL

0%
-5%

10

-10%

On observing the ACF and PACF graphs of the first differenced MCXCOMDEX closing
prices we can interpret that the
AIC
order of auto regression p is 2 ARIMA
(p,d,q)
Value
Best Model
which is obtained from partially auto
ARIMA (2,1,0) 7054.92
Best Model
correlated function and the order of
ARIMA (0,1,2) 7054.92
moving averages q is also 2 which
ARIMA (1,1,1) 7054.92
is obtained from auto correlated
ARIMA (1,1,0) 7056.95
function. Hence according to out
ARIMA (0,1,1) 7056.95
interpretation the best fit model for ARIMA (1,1,2) 7058.98
ARIMA
in
this
case
will
be ARIMA (2,1,1) 7058.98
ARIMA(2,1,2). However the actual ARIMA (2,1,2) 7061.02
ARIMA best fit is finalized based on ARIMA (0,1,0) NA
the AIC values calculated below.
AIC Test: - We know that the model with lowest value AIC is the best model. In this
case we observe that ARIMA(2,1,0) is the best model with lowest AIC value.

Silver Spot Market Prices

Deepak | Prasanna | Ram Prasad | Shradha


11 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Silver Spot Prices (Rs.)


70000

6000.00

60000

4000.00

50000

2000.00

40000

0.00

30000

-2000.00

20000

-4000.00

10000

-6000.00

-8000.00

1st Diff

Gold and silver follow an almost similar pattern and historically they have
maintained a ratio that has fluctuated widely between 15 and 100 since the 1970s.
Similar to Gold prices, Silver prices also rise when sentiments on the economy and
the financial markets are bearish or there is uncertainty over future trends.
The above line plot for spot market prices of SILVER in the commodity market shows
that the spot prices of the commodity do not represent stationary data. The first
difference values plotted are nearer to random walk values can be considered
stationary. Also, the ACF for actual spot prices of SILVER have shown significant
autocorrelation between the lag values and the current values.
Auto Correlation Function (ACF) for first differenced SILVER spot prices:

ACF
15%
10%
ACF

5%

UL

LL

0%
-5%

-10%
-15%

Deepak | Prasanna | Ram Prasad | Shradha


12 | P a g e

10

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Partially Auto Correlation Function (PACF) for first differenced SILVER spot prices:

PACF
15%
10%
PACF

5%

UL

LL

0%
-5%

10

-10%
-15%

Though from the above ACF


and PACF graphs for the first
differenced values seem to
imply that the value of p is 8
and q is 8. This is because of
the
observed
significant
correlation of current values
with 8th lag in ACF and PACF.
However, the actual values of
ARIMA model parameters are
determined based on the AIC
values below.

ARIMA (p,d,q)
ARIMA (1,1,0)
ARIMA (0,1,1)
ARIMA (0,1,2)
ARIMA (1,1,1)
ARIMA (2,1,0)
ARIMA (1,1,2)
ARIMA (2,1,1)
ARIMA (2,1,2)
ARIMA (0,1,0)

AIC
Value
8297.46
8297.46
8299.48
8299.48
8299.48
8301.51
8301.51
8303.55
NA

Best Model
Best Model

AIC Test: - We know that the model with lowest value AIC is the best model. In this
case we observe that ARIMA(1,1,0) is the best model with lowest AIC value.

CNX Nifty
CNX Nifty is the benchmark index for Indian equity market. CNX Nifty has shaped up
as a largest single financial product in India, with an ecosystem comprising:
exchange traded funds (onshore and offshore), exchange-traded futures and options
(at NSE in India and at SGX and CME abroad), other index funds and OTC derivatives
(mostly offshore). The CNX Nifty covers 22 sectors of the Indian economy and offers
investment managers exposure to the Indian market in one portfolio.

Deepak | Prasanna | Ram Prasad | Shradha


13 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

CNX NIFTY Prices (Rs.)


7000.00

300

6000.00

200

5000.00

100

4000.00

3000.00

-100

2000.00
1000.00

-200

0.00

-300

Close

1st Diff

The above line plot for daily closing prices of CNX Nifty shows that the closing prices
of this index do not represent stationary data. The first difference values plotted are
nearer to random walk values can be considered stationary. Also, the ACF for actual
closing prices of CNX Nifty have shown significant autocorrelation between the lag
values and the current values.
Autocorrelation Function (ACF) for first differenced CNX Nifty closing prices:

ACF
15%
10%
ACF

5%

UL

LL

0%
-5%

10

-10%
-15%

Partially Autocorrelation Function (PACF) for first differenced CNX Nifty closing
prices:

Deepak | Prasanna | Ram Prasad | Shradha


14 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

PACF
15%
10%
PACF

5%

UL

LL

0%
-5%

10

-10%
-15%

As from the above ACF and PACF


graphs for the first differenced
values do not directly tell anything
about the possible values for p and q
the actual values of ARIMA model
parameters are determined based
on the AIC values below.

ARIMA
(p,d,q)
ARIMA (1,1,0)
ARIMA (0,1,1)
ARIMA (0,1,2)
ARIMA (1,1,1)
ARIMA (2,1,0)
ARIMA (1,1,2)
ARIMA (2,1,1)
ARIMA (2,1,2)
ARIMA (0,1,0)

AIC Test - We know that the model


with lowest value AIC is the best
model. In this case we observe that
ARIMA(1,1,0) is the best model with lowest AIC value.

AIC
Value
4848.86
4848.86
4850.89
4850.89
4850.89
4852.93
4852.93
4854.97
NA

Best Model
Best Model

MAE to assess the Forecasting Accuracy


The above table shows the forecasting accuracy of
ARIMA models that we have applied on MCXCOMDEX,
GOLD spot prices, SILVER spot prices and CNX Nifty
using error measure, Mean Average Error (MAE). It is
observed from the table that MAE does exist in each
of the forecasts and thus, there is always an error
element when ARIMA model is used to predict future
values.

INDICES/
Commoditi
es
MCXCOMDE
X
GOLD
SILVER
CNX NIFTY

MAE
29.28
249.27
882.61
133.43

MAPE to assess the Forecasting Power


The above table shows the forecasting power of
ARIMA models that we have applied on MCXCOMDEX,
GOLD spot prices, SILVER spot prices and CNX Nifty
using error measure, Mean Average Percentage Error
(MAPE). It is observed from the table that MAPE is
least in ARIMA (1, 1, 0) model for the MCXCOMDEX
Deepak | Prasanna | Ram Prasad | Shradha
15 | P a g e

INDICES/
Commoditi
es
MCXCOMDE
X
GOLD
SILVER
CNX NIFTY

MAPE
0.7277%
0.8181%
1.9831%
2.2077%

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

prices. So it is experiential that this model has performed better than all the other
ARIMA models. Also, it can be observed that the MAPE is highest in the case CNX
Nifty which is very much expected as INDICES/
pDF
value
the volatility of equity stocks is higher Commodities
<
than that of the commodity market.
6
0.0001
Since ARIMA is a linear model it can MCXCOMDEX
12
0.000
be used to predict commodity prices
6
0.918
than to predict the equity market. GOLD
12
0.573
This is proved with the MAPE analysis
6
0.613
which shows highest MAPE for CNX SILVER
12
0.066
Nifty.
CNX NIFTY
6
0.817
12
0.520
However, it should be understood
that the MAPE analysis is used to compare the performance among the models and
INDICES/
Commodities

Lag

Score

C.V.

P-Value

Present?

MCXCOMDEX

284.775

3.84146

6.8E-64

TRUE

451.701

5.99146

8E-99

TRUE

486.894

3.84146

7E-108

TRUE

957.868

5.99146

1E-208

TRUE

504.262

3.84146

1E-111

TRUE

999.003

5.99146

1E-217

TRUE

427.760

3.84146

5E-95

TRUE

GOLD
SILVER
CNX NIFTY

2
840.176
5.99146
4E-183
TRUE
this does not mean that ARIMA(1,1,0) is the best fit for MCXCOMDEX, the adequacy
of this model can be judged by the Q-statistic value from Ljung-Box test.

Ljung-Box Test or White Noise Test


As we know, in Ljung-Box test a small p-value (for instance, p-value < .05) indicates
the possibility of non-zero autocorrelation within the first m lags. From the above
table we can say that the p-value is lowest in case of MCXCOMDEX which means
that the model is inadequate and there still exists some autocorrelation.

ARCH Test
The correlogram analysis is a key tool to explore the interdependency of the
observation values. We have observed that the PACF of MCXCOMDEX shows a
significant autocorrelation up to the 5th lag order for the first difference values and
it has also been observed that further difference did not help the cause. As a result,
it can expected that an ARCH/GARCH model may be in order here. In order to test
Deepak | Prasanna | Ram Prasad | Shradha
16 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

this, we have applied the ARCH test on all the data values that we used in this study
project. The results were presented in the above table. From the above table it can
be observed all the 4 time-series data do have conditional heteroscedasticity and
hence, and ARCH/GARCH model can be applied to these time-series data.

Concluding Observations
In this study project, we have successfully implemented ARIMA to predict the
commodity and stock prices in the Indian markets. Based on the results obtained in
the empirical analysis undertaken in this study project, we can conclude that ARIMA
is not sufficient to accurately predict the derivative and stock prices, models like
ANN, ARCH, GARCH, etc are better than ARIMA model. We can also conclude that
the predictive power of ARIMA model is better when applied on commodity prices
than on stock prices. This is because of the fact that stock prices are more volatile
than commodity prices and hence other non-linear model can be used for
forecasting.

Limitations of the Study


The limitations of this study project are:

We have observed that when different statistical tools like R, NumXL and XLStat
are used to implement ARIMA, we obtained slightly varying results. Hence, we
would like to state the results obtained here are only approximate and may not
be accurate as they are tool dependent.
We have implemented only ARIMA model and tried to test its accuracy and
adequacy using various test statistics but we did not implement other models
like artificial neural networks to compare the predictive power of ARIMA model.

Deepak | Prasanna | Ram Prasad | Shradha


17 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

References
JOURNAL PAPERS

G.P. Nason, Chapter 11, Stationary and non-stationary time series


Dr. Tripathy N. (2011), A Comparison of Artificial Neural Network (ANN) Model &
Auto Regressive Integrated Moving Average (ARIMA) Model for Forecasting Indian

Stock Market, International Journal of Contemporary Business Studies


Tina Jakaa et. al., 2011, Electricity price forecasting ARIMA model approach
Zsuzsanna HORVATH and Ryan JOHNSTON, AR(1) TIME SERIES PROCESS

Econometrics
D.S.G. POLLOCK,

Identification of ARIMA Models


Brian Borchers, 2002, Notes on ARIMA Modelling
Heino Bohn Nielsen, 2005, Univariate Time Series Analysis - ARIMA Models
Manish Kumar, 2009, Time series forecasting using a hybrid ARIMA and neural

network model
Aidan Meyler et. al., FORECASTING IRISH INFLATION USING ARIMA MODELS
NOUR MEDDAHI, 2003, ARMA representation of integrated and realized

variances
Ghiassi et al. (2005), A dynamic architecture for artificial neural networks,

ECONOMIC

FORECASTING

1992,

Lecture

The

Neurocomputing

Dunis et al. (2012), A Comparison of Linear and Nonlinear Models in


Forecasting Market Risk: The Evidence from Turkish Derivative Exchange,

Journal of Economics and Behavioral Studies


Aksu et. al. (1991), State Space Forecasting of Treasury-Bill Rates, The Journal

of Business Forecasting
Bonnie K. Ray (1993), Long-range forecasting of IBM product revenues using a
seasonal

fractionally

differenced

ARMA

model,

International

Journal

of

Forecasting
Lisa Bianchi, Jerey Jarrett, and R. ChoudaryHanumara, (1998) Improving
forecasting for telemarketing centres by ARIMA modeling with intervention,

International Journal of Forecasting


Zhang, G. Peter (2003). Time Series Forecasting Using a Hybrid ARIMA and

Neural Network Model, Neurocomputing


NowrouzKohzadi,
Milton
S.
Boyd,

BahmanKermanshahi,

and

IebelingKaastra(1996), A comparison of Artificial neural network and time series


models for forecasting commodity prices, Neurocomputing
Deepak | Prasanna | Ram Prasad | Shradha
18 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

WEBSITES

XLSTAT, Statistical and Data Analysis Software for EXCEL, www.xlstat.com


Spider financials NumXL support website, www.spiderfinancial.com
Online coursed on financial econometrics, https://onlinecourses.science.psu.edu

STANDARD TEXT BOOKS

John C. Hull and Sankarashan Basu, Opitons, Futures and other Derivatives,

Eigth Edition
John C. Hulls, Risk Management and Financial Institutions, third edition
Zvi Bodie et. al., Investments, eight edition

Deepak | Prasanna | Ram Prasad | Shradha


19 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Appendices
MAE and MAPE calculations
MCXCOMDEX
Predicted
Actual
Date
Values
Values
11/22/2013
4021.75
4065.45
11/23/2013
4021.68
4065.45
11/25/2013
4021.69
4012.73
11/26/2013
4021.69
4035.21
11/27/2013
4021.69
4002.83
11/28/2013
4021.69
3975.74
11/29/2013
4021.69
3991.48
MEAN AVERAGE ERROR (MAE)
MEAN AVERAGE PERCENTAGE ERROR (MAPE)

Error
43.70
43.77
8.96
13.52
18.86
45.95
30.21
29.28

Percentage
Error
1.075%
1.077%
0.223%
0.335%
0.471%
1.156%
0.757%
0.728%

GOLD
Actual
Date
Predicted Values
Values
11/21/2013
30900.56
30858.00
11/22/2013
30898.53
30987.00
11/25/2013
30897.32
30348.00
11/26/2013
30897.29
30898.00
11/27/2013
30897.29
30750.00
11/28/2013
30897.28
30379.00
11/29/2013
30897.28
30499.00
MEAN AVERAGE ERROR (MAE)
MEAN AVERAGE PERCENTAGE ERROR (MAPE)

Error
42.56
88.47
549.32
0.71
147.29
518.28
398.28
249.27

Percentage Error
0.138%
0.286%
1.810%
0.002%
0.479%
1.706%
1.306%
0.818%

SILVER
Predicted
Actual
Date
Values
Values
11/21/2013
45527.19
44947.00
11/22/2013
45527.35
44906.00
11/25/2013
45527.34
44286.00
11/26/2013
45527.34
45050.00
11/27/2013
45527.34
44834.00
11/28/2013
45527.34
44111.00
11/29/2013
45527.34
44379.00
MEAN AVERAGE ERROR (MAE)
MEAN AVERAGE PERCENTAGE ERROR (MAPE)
Deepak | Prasanna | Ram Prasad | Shradha
20 | P a g e

Error
580.19
621.35
1241.34
477.34
693.34
1416.34
1148.34
882.61

Percentage
Error
1.291%
1.384%
2.803%
1.060%
1.546%
3.211%
2.588%
1.983%

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

CNX NIFTY
Actual
Date
Predicted Values
Values
11/21/2013
6204.00
5999.05
11/22/2013
6204.00
5995.45
11/25/2013
6204.00
6115.35
11/26/2013
6204.00
6059.10
11/27/2013
6204.00
6057.10
11/28/2013
6204.00
6091.85
11/29/2013
6204.00
6176.10
MEAN AVERAGE ERROR (MAE)
MEAN AVERAGE PERCENTAGE ERROR (MAPE)

Error
204.95
208.55
88.65
144.90
146.90
112.15
27.90
133.43

Percentage Error
3.416%
3.478%
1.450%
2.391%
2.425%
1.841%
0.452%
2.208%

Predictions and Residuals


ARIMA (MCXCOMDEX)
4800
4600
4400
4200

C lose

4000
3800
3600
3400
3200
Dec/11

Apr/12

Jul/12

Oct/12

Jan/13

May/13

Aug/13

Date
Clos e

ARIMA (Clos e)

Validation

Prediction

Lower bound (95%)

Upper bound (95%)

MCXCOMDEX

Deepak | Prasanna | Ram Prasad | Shradha


21 | P a g e

Nov/13

Mar/14

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Residuals (MCXCOMDEX)
800
600
400
200

Residual

0
-200
-400
-600
-800

Date

GOLD spot prices

ARIMA (GOLD Spot Price(Rs.))


34000
33000
32000
31000
30000

Spot Price(Rs.)

29000
28000
27000
26000
25000
Dec/11

Apr/12

Jul/12

Oct/12

Jan/13

May/13

Aug/13

Nov/13

Date
S pot Price(Rs .)

ARIMA (S pot Price(Rs .))

Validation

Prediction

Lower bound (95%)

Upper bound (95%)

Deepak | Prasanna | Ram Prasad | Shradha


22 | P a g e

Mar/14

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Residuals (GOLD)
1500
1000
500
0
-500

Residual
-1000
-1500
-2000
-2500
-3000

Date

SILVER spot prices

ARIMA (SILVER Spot Price(Rs.))


65000
60000
55000

Spot Price(Rs.)

50000
45000
40000
35000
Dec/11

Apr/12

Jul/12

Oct/12

Jan/13

May/13

Aug/13

Nov/13

Date
S pot Price(Rs .)

ARIMA (S pot Price(Rs .))

Validation

Prediction

Lower bound (95%)

Upper bound (95%)

Deepak | Prasanna | Ram Prasad | Shradha


23 | P a g e

Mar/14

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Residuals (SILVER)
6000

4000

2000

Residual
-2000

-4000

-6000

-8000

Date

CNX Nifty
ARIMA (CNX Nifty)
7000

6500

6000

C lose

5500

5000

4500
Dec/11

Apr/12

Jul/12

Oct/12

Jan/13

May/13

Aug/13

Date
Clos e

ARIMA (Clos e)

Validation

Prediction

Lower bound (95%)

Upper bound (95%)

Deepak | Prasanna | Ram Prasad | Shradha


24 | P a g e

Nov/13

Mar/14

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Residuals (CNX Nifty)


300

200

100

Residual

-100

-200

-300

Date

Normality test and White noise test results


MCXCOMDE
X
Normality test and white noise tests
(Residuals):

Statistic

DF

Value

Jarque-Bera

1319.4
87

Box-Pierce

35.687

Ljung-Box

36.077

6
12

64.929
36.121

McLeod-Li
Box-Pierce

Deepak | Prasanna | Ram Prasad | Shradha


25 | P a g e

pvalue
<
0.000
1
<
0.000
1
<
0.000
1
<
0.000
1
0.000

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

Ljung-Box

12

36.523

McLeod-Li

12

81.886

0.000
<
0.000
1

GOLD
Normality test and white noise tests
(Residuals):

Statistic

Value
3232.7
26

pvalue
<
0.0001

6
6
6
12
12
12

1.996
2.020
6.481
10.270
10.492
14.351

0.920
0.918
0.371
0.592
0.573
0.279

DF

Jarque-Bera
Box-Pierce
Ljung-Box
McLeod-Li
Box-Pierce
Ljung-Box
McLeod-Li

SILVER
Normality test and white noise tests
(Residuals):

Statistic
Jarque-Bera
Box-Pierce
Ljung-Box
McLeod-Li
Box-Pierce
Ljung-Box
McLeod-Li

DF
2
6
6
6
12
12
12

Value
4730.9
88
4.414
4.476
26.110
19.682
20.070
30.541

pvalue
<
0.0001
0.621
0.613
0.000
0.073
0.066
0.002

CNX NIFTY
Normality test and white noise tests
Deepak | Prasanna | Ram Prasad | Shradha
26 | P a g e

FINANCIAL ENGINEERING TERM


PAPER

GROUP - 6

(Residuals):

Statistic

DF

Value

Jarque-Bera
Box-Pierce
Ljung-Box
McLeod-Li
Box-Pierce
Ljung-Box

2
6
6
6
12
12

71.202
2.900
2.937
18.176
10.845
11.108

McLeod-Li

12

79.352

Deepak | Prasanna | Ram Prasad | Shradha


27 | P a g e

pvalue
<
0.0001
0.821
0.817
0.006
0.542
0.520
<
0.0001

You might also like