arima/garch (1,1) modelling and forecasting for a · pdf fileelk asia pacific journal of...

20
ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017) www.elkjournals.com ………………………………………………………………………………………………… ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A GE STOCK PRICE USING R Varun Malik Dyal Singh College University of Delhi India [email protected] ABSTRACT This article attempts to present a basic method of time series analysis, modelling and forecasting performance of ARIMA, GARCH (1,1) and mixed ARIMA - GARCH (1,1) models using historical daily close price downloaded through the yahoo finance website from the NASDAQ stock exchange for GE company (USA) during the period of 2001 to 2014. This paper also presents a brief analysis technique introduction to R to build up graphing, simulating and computing skills to enable one to see models in economics in a unified way. The great advantage of R compiler is that it is free, extremely flexible and extensible. It uses data that can be downloaded from the internet, and which is also available in different R packages. This article provides discuses in modeling and forecasting briefly and simply. This paper provides short details the R command lines and output. This article is written to be useful for learning time series analysis on basic different levels as well as a research purpose for beginners who beginning the analysis of time series data in the various scientific and statistical research approaches. ARIMA/GARCH (1,1) model is applied to observed the forecasting values of low and high stock price (in USD) for GE company. The results obtained in this paper are based on the work of [10]. Keywords: ARIMA/GARCH models, time series models, forecasting, R INTRODUCTION In time series are analyzed to understand behavior of the past data points and to predict the future values on the basis of past values, enabling analysis's or decision makers to make properly informed decisions for others. A time series analysis quantifies the main observation findings from data and the random variable. This reason, combined with improved computing, technical and statistical ideas, have made time series methods widely applicable in scientific and statistical research approach in

Upload: vuhanh

Post on 07-Feb-2018

226 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

www.elkjournals.com

…………………………………………………………………………………………………

ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A GE STOCK

PRICE USING R

Varun Malik

Dyal Singh College

University of Delhi India

[email protected]

ABSTRACT

This article attempts to present a basic method of time series analysis, modelling and forecasting

performance of ARIMA, GARCH (1,1) and mixed ARIMA - GARCH (1,1) models using historical daily

close price downloaded through the yahoo finance website from the NASDAQ stock exchange for GE

company (USA) during the period of 2001 to 2014. This paper also presents a brief analysis technique

introduction to R to build up graphing, simulating and computing skills to enable one to see models in

economics in a unified way. The great advantage of R compiler is that it is free, extremely flexible and

extensible. It uses data that can be downloaded from the internet, and which is also available in different

R packages. This article provides discuses in modeling and forecasting briefly and simply. This paper

provides short details the R command lines and output. This article is written to be useful for learning time

series analysis on basic different levels as well as a research purpose for beginners who beginning the

analysis of time series data in the various scientific and statistical research approaches. ARIMA/GARCH

(1,1) model is applied to observed the forecasting values of low and high stock price (in USD) for GE

company. The results obtained in this paper are based on the work of [10].

Keywords: ARIMA/GARCH models, time series models, forecasting, R

INTRODUCTION

In time series are analyzed to understand

behavior of the past data points and to

predict the future values on the basis of

past values, enabling analysis's or

decision makers to make properly

informed decisions for others. A time

series analysis quantifies the main

observation findings from data and the

random variable. This reason, combined

with improved computing, technical and

statistical ideas, have made time series

methods widely applicable in scientific

and statistical research approach in

Page 2: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

governments and private sectors. In most

branches of scientific and statistical

research department in private and

government sectors, there are variables

measured approaches sequentially in

time. Financial/Banking sector record

interest rates as well as exchange rates

each day. The government statistics

department compute and analyze the

country’s GDP on a yearly basis and

other economic data. The weather

department publishes day to day

temperatures and air velocity diagram for

capital cities and in rural areas from

around the world. Meteorological

department record weather parameters at

many different sites with different

instrument such as Weather radar and

optical rain gauge meter and etc. When

such variable is measured sequentially in

time over or at a regular interval, known

as the sampling interval, the resulting

data come from a time series.

Observations that have been collected

over regular sampling intervals from a

historical time series. In this paper, we

give a basic but useful computational and

statistical approach in which the

historical stock price series are treated as

realizations of sequences of random

variables.

A sequence of random variables

published at regular sampling intervals is

sometimes referred to as a discrete-time

stochastic process, though the shorter

name time series model is often

preferred. The theory of stochastic

processes is vast and may be studied

without necessarily fitting any models

over time series data. However, our aim

is to more applied and directed towards

model fitting and forecasting the data

using R computational techniques.

The main features of various time series

are to detect the trends and seasonal

variations that can be modelled

deterministically with respect to

mathematical functions of time. But,

another important feature of most of the

time series is that observations close

together in time tend to be correlated.

Some of the methodology in a time series

analysis is focused on explaining this

correlation factor and the main features

in the data using appropriate statistical

models and descriptive methods. Once an

accurate model is observed and fitted to

data values, then researcher used the

model to forecast future values, or

generate simulations, to guide planning

decisions and future prediction. Fitted

Page 3: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

models are also used as a basis for

statistical tests.

Finally, a fitted statistical model provides

a concise and informative summary of

the main characteristics of a time series,

which can often be essential for

researcher and scientists and financial

analysis. Sampling intervals may be

differ in their relation to the data. The

data may have been aggregated (for

example, the number of foreign

passengers reaching per day/month/year)

or sampled (as in a daily/weekly/monthly

basis time series of trade share prices). If

data are sampled, the sampling interval

must be short enough for the time series

to provide a very close approximation to

the original continuous signal when it is

interpolated. In a volatile share market,

close of historical prices may not suffice

for interactive trading but will usually be

adequate to show the nature of trends

and movement of the stock market price

over several years [1] [2] [3]

The objective of this paper is to provide

a procedure of modelling and

forecasting method in terms of

ARIMA/GARCH modelling for

researchers by means of statistical R

applications. Furthermore, we have

shown how to use R to find these stock

price prediction. We begin with some

basic thoughts about how to store and

process time series data using R

software.

Despite the fact that the auto regressive

integrated moving average (ARIMA)

technique is powerful and flexible also

but it is not able to handle the volatility

and nonlinearity that are present in the

data series. Some previous studies

showed that generalized autoregressive

conditional heteroskedatic (GARCH)

models are used in time series

forecasting to handle volatility in the data

series. [5][6][8].

In the next section we will discuss the

methodology and data preparation. In

particular, Time series and R analysis

packages have been discussed in brief

in sections 3, we have discussed

stationary, non stationary and estimation

of linear trend (GLM) and ACF and

PACF plots respectively in section 4.

Then, in section 5, selection of ARIMA

model and in section 6 GARCH (1,1)

have been discussed. In section 7, we

have obtained the ARIMA/ GARCH

(1,1) model performance for GE stock

price. Finally, we conclude this paper in

section 8.

Page 4: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

METHODOLOGY AND DATA

T is assumed that you have installed R

software on your computer/laptop or

machine, and it is suggested that you

work through the examples, making sure

your output agrees with the results. If

you do not have R, then it can be

installed free of charge from the Internet

site www.r-project.org. It is also

recommended that you have some

familiarity with the basics statistical

packages of R, [1].

In this analysis, we used some of the

time series and forecasting packages

such as zoos, xts, ts, astsa, fts, and

forcast. For representing irregularly

spaced time series, the packages

timeSeries, zoo and xts are mostly used

in time series analysis. In these packages,

timeSeries objects are the core data

objects. But this timeSeries objects are

not frequently used as zoo and xts

objects for representing time series data.

A very flexible time series class is zeileis

ordered observations (zoo) created by

Achim Zeileis and Gabor Grothendieck

and available in the package zoo on

CRAN , [1][10][11][12].

In this study, A Regularly spaced time

series structure, data are arranged with a

fixed interval of time, can be represented

as under the packages ts. we used

historical stock price data over the

period 2001 to 2015 and stored the data

in the .csv file .The function read.csv()

comes to read data from .csv file which

stored on your computer and laptop .

Notice that the first row contains the

names of the columns namely Date, the

date information is in the first column

with the format dd/mm/YYYY, stock

price in the second column namely close

.The first step of identification is to check

the occurrence of a trend in data series

movement by plotting time series which

is as shown in Figure 1 . From the

plotting, it can be seen that the data time

series does not vary in a fixed level or

not which indicates that the series is non

stationary and stationary in both mean

and variance, as well as exhibits an

nature of trends. Time series are shown

in figure 1 as well as figure 2.

General Electric ,GE, is an

American multi national company

incorporated in New York USA. The

company operates through the following

segments i.e., Power & Water, Oil and

Gas, Aviation, Healthcare, Transportatio

n and Capital which cater to the needs of

services, Medical devices, Life

I

Page 5: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

Sciences, Pharmaceutical, Automotive, S

oftware

Development and Engineering industries

, [1][10][11][12]. (Refer Fig. 1)

WORKING WITH TIME SERIES

DATA

The native R classes suitable for storing

time series data include vector, matrix ,

data.frame, and ts objects. But the types

of data that can be stored in these objects

are narrow; furthermore, the methods

provided by these representations are

limited in research and analysis scope.

There exist specialized objects that deal

with more general representation of time

series data as zoo, xts, or time Series

objects, available from packages of the

same name. It is not necessary to create

time series objects for every time series

analysis problem, but more sophisticated

analyses require time series objects. You

could calculate the mean or variance of

time series data represented as a vector in

R, but if you want to perform a seasonal

decomposition using decompose, you

need to have the data stored in a time

series object. .[1][10][11][12]

In the following examples, we assume

you are working with zoo,ts

forcast,timeseries ,stats objects and etc.

because we think there are the most

widely used packages. Before using

statistical objects in r software, we need

to install and load the appropriate

statistical and forcasting package (if you

have already installed it, you only need

to load it) using the appropriate

command, [1][2][3][9].

ESTIMATING A LINEAR TREND

Consider the Stock price series is shown

in Figure 2.The data are mean stock close

price index from 2001 to 2014. In

particular data are deviations , measured

in USD. We note that an apparent

upward trend in the series during this

period. A simple kind of generated series

might be a collection of uncorrelated

random variables, wt with mean 0 and

finite variance σ2w. The time series

generated from uncorrelated variables is

used as a model for noise in statistical

research purpose, where it is called white

noise; The designation white originates

from the analogy with white light and

indicates that all possible periodic

oscillations are present with equal

strength.

Now We express simple linear regression

to estimate that trend by fitting the model

over time series xt = β1 + β2t + wt,t =

Page 6: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

2001..2014. where β1 and β2 are

regression coefficient wt is random error

or noise . In general, it is necessary for

time series data to be stationary, so

averaging lagged products over time, as

in above paragraph. With time series

data, it is the dependence between the

values of the series that is important to

measure; we must, at least, be able to

estimate autocorrelations with precision.

Also, the stock price series shown in

Figure 2 contains some evidence of a

trend over time. The first step in

modelling time index data is to convert

the stationary time series. In order to

convert non stationary series to

stationary , differencing method can be

used in which the series is lagged 1 step

and subtracted from original series.

(Refer Fig. 2)

The first difference is denoted as ∆xt = xt

−xt−1 The first difference of data are also

shown in figure 3, produces different

result than removing trend by de-

trending via regression. The differenced

series does not contain the long middle

cycle observed in de-trended time series.

Over differencing can cause the standard

deviation to increase. First difference is

an example of a linear filter to eliminate

a trend and second difference can

eliminate a quadratic trend and so on. For

other information, De-trend, difference,

log and difference of log series of data

are plotted in figure 3.The differencing

technique is an important component of

the ARIMA model of Box and Jenkins

(1970), [14][15] . (Refer Fig. 3)

ACF and PACF plots

CF and PACF are the core of ARIMA

modelling. The box Jenkins method

provides a way to identify an ARIMA

model according to autocorrelation and

partial autocorrelation graph of the series

as shown in figure 4 (panel a, b, c and d).

The parameters of ARIMA consist of

three components, namely

Autoregressive parameter (p), Number of

differencing (d), and Moving average

parameters (q) In order to to identify

ARIMA model we need to follow these

basic steps are mentioned below:

Step 1:- If ACF cut off after lag n and

PACF dies down, then identify the order

of MA (q) in ARIMA (0, d, q) model

Step 2:- if ACF dies down and PACF cut

off after lag n then identify AR (p) in

ARIMA (p, d, 0) model

Step 3:- if ACF and PACF die down

means, then we get mixed ARIMA (p, d,

A

Page 7: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

q) model, time series needs to

differencing (d).

ACF and PCF are a primary tool for

clarifying the relations that may occur

within and between time series at various

lags. In the beginning of fitting ARIMA

model, the idea of model

parameterization as possible yet still be

capable of explaining the series (i.e., p

and q should be 3 or less, or the total

number of parameters should be less than

3 in view of Box-Jenkins method) based

on figure 4. (Refer Fig. 4)

The more parameters the greater noise

that can be introduced into the model and

hence standard deviation. Classical

regression is often insufficient for

explaining all of the interesting dynamics

of a time series. The ACF and PACF of

the residuals of the simple linear

regression fit of the data reveals

additional structure in the data that the

regression did not capture. Instead, the

introduction of correlation as a

phenomenon that may be generated

through lagged linear relations leads to

proposing the autoregressive (AR) model

and moving average (MA) models.

Adding non stationary models to the mix

leads to the autoregressive integrated

moving average (ARIMA) model

popularized in the landmark work by

Box and Jenkins (1970), [14] [15].

ARIMA MODEL

ARIMA is one type of models in the

Box-Jenkins model. The Box - Jenkins

methodology includes four iterative steps

of model identification, parameter

estimation, diagnostic checking and

forecasting. In identification step, data

transformation is required to make the

series stationary. The stationary process

is a foundation in building an ARIMA (p,

d, q) model. When the observed time

series presents trends and non seasonal

behavior, data transformation and

differencing are applied to the data series

in order to stabilize variance and to

remove the trend before an ARIMA

model is applied. However, In order to

understand to the brief mechanism of

ARIMA (p, d, q) models are also capable

of modelling a wide range of seasonal

data and non seasonal data. A seasonal

ARIMA model is formed by including

additional seasonal terms in the ARIMA

models. In brief, The model is written as

follows taken from [16]:

Page 8: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

Where am = number of periods per

season. We use the uppercase notation

for the seasonal parts of the model, and

lowercase notation for the non-seasonal

parts of the model, [16].

The seasonal part of the model consists

of terms that are very similar to the non-

seasonal components of the model, but

they involve back shifts of the seasonal

period. For example, an ARIMA (p, d,

q) (P, D, Q) 4 model (without a

constant) is for quarterly data (m=4) and

can be written as [16]

Hence , An ARIMA (p, d, q) (P,D,Q)

process can be fitted to data using the R

function Arima with the parameters

order set to c(p, d, q) based on ACF and

PACF plots. In considering the

appropriate orders for an ARIMA

model, restrict attention to the seasonal

lags. The modelling procedure is almost

the same as for non-seasonal data,

except that we need to select seasonal

AR and MA terms as well as the non-

seasonal components of the model. In

another way, The R function, auto.

Arima function can help to select all

three parameters, p, d, and q, and

predict and forecast function can also

help in forecasting the future values. It

may be useful to have an automatic

method for selecting an ARIMA model

parameters and forecasting, [2] [3] [4]

[5]. (Refer Fig. 5) In addition to Box-

Jenkins method, the autocorrelation

function (ACF) and the partial

autocorrelation function (PACF) of the

sample stock price data are used to

identify the order of ARIMA (p, d, q)

model. The ordered model then is

statistically checked whether it

accurately describes the series or not.

The model fits well if the P-value of its

parameter is statistically significant, as

well as its residuals are generally small,

randomly distributed, and contain no

useful information, where at this point,

the model can be used for forecasting.

Akaike Information Criterion (AIC)

provides another way to check and

identify the ARIMA (p.d, q) model.

Page 9: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

AIC is mentioned as shown in table 1.

According to table 1 the p-values for all

parameters are less than 0.05, indicating

that they are statistically significant. In

addition, p-value of the Box- Ljung test

is greater than 0.05, and so we cannot

reject the hypothesis that the

autocorrelation of residuals is different

from 0. The model thus adequately

represents the residuals. Due to the

scope of this paper, we used the

performance GARCH (1,1) with

ARIMA (2,1,2).

According to this procedure, the model

with lowest AICc will be selected.

When perform time series analysis in R,

the program will provide AICc as part

of the result. Based on AICc, we should

select manually ARIMA (2,1,2) model.

The significancy of ARIMA residuals

and QQ plot are shown in figure5 and

figure 6. In figure 6, the red line

indicates the fitted line and blue line

presents the predicted values for 12

months ahead. (Refer Table 1)

In addition, the Ljung - Box test also

provides a different way to double check

the model. Basically, Ljung- Box is a

test of autocorrelation in which it

verifies whether the autocorrelations of

a time series are different from 0. In

other words, if the result rejects the

hypothesis, this means the data is

independent and uncorrelated;

otherwise, there still remains serial

correlation in the series and the model

needs more modification. The

procedure includes observing residual

plot and its ACF and PACF diagram,

and check Ljung- Box result. If ACF

and PACF of the model residuals show

no significant lags, the selected model is

appropriate, [14] [15]. (Refer Fig. 6)

Using ARIMA(2,1,2) as selected model,

the mathematical equation for such

model as follows :

Based on ARIMA (2,1,2), High and

low price corresponding to month,

indicating with numeric value over the

line as shown in figure 6a. In the figure,

X axis indicates the forecast low price

and y axis presents the predicted high

prices corresponding to month

indicating on a curved line. (Refer Fig.

6a)

Page 10: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

GARCH(1,1) MODEL

Although ACF and PACF of residuals

have no significant lags, the time series

plot of residuals shows some cluster of

volatility in figure 5. It is important to

note that ARIMA is a method to linear

model the data and the forecast width

remains constant because the model does

not reflect recent changes or incorporate

new information. In other words, it

provides best linear forecasts for the

series, and thus plays little role in

forecasting model nonlinearly. In order

to model volatility, ARCH/GARCH (1,1)

method is used. Firstly, check if residual

plot (figure 5) displays any cluster of

volatility. Next, observe the squared

residual plot (figure 5). If there are

clusters of volatility, ARCH/GARCH

(1,1) should be used to model the

volatility of the series to reflect most

recent changes and fluctuations in the

series. Finally, ACF and PACF of

squared residuals will help confirm if the

residuals are not independent and can be

predicted. As mentioned earlier, a strict

white noise can- not be predicted either

linearly or nonlinearly while the general

white noise might not be predicted

linearly yet done so nonlinearly. If the

residuals are strict white noise, they are

independent with zero mean, normally

distributed, and ACF and PACF of

squared residuals displays no significant

lags, [10].

According to the plots of squared

residuals are shown in figure 5. The

squared residuals plot shows clusters of

volatility at some points in time. ACF

seems to die down. PACF cuts off after

lag 10 even though some remaining lags

are significant. The residuals therefore

show some patterns that might be

modeled. ARCH/GARCH (1,1) is

necessary to model the volatility of the

series. As indicated by its name, this

method concerns with the conditional

variance of the series. Followings are the

based on the plots of squared residuals: .

The squared residuals plot shows

clusters of volatility at some points in

time. ACF seems to die down. PACF

cuts off after lag 10 even though some

remaining lags are significant The

residuals therefore show some patterns

that might be modeled. ARCH/GARCH

(1,1) is necessary to model the volatility

of the series. Noted that we fit

ARCH/GARCH (1,1) to the residuals

from the ARIMA model selected

previously, not to the original series or

differences log series because we only

Page 11: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

want to model the noise of ARIMA

model. ARIMA 1 year forecasting and

QQ plot are shown in figure 6., [5] [6]

[7] [8]. (Refer Fig. 7 or 7a)

Mathematical equation for GARCH(1,1)

model is

ARIMA GARCH(1,1)

PERFORMANCE

There is two-stage procedure in the

proposed combined model of ARIMA

and GARCH(1,1). In the first stage, the

best of the ARIMA models is used to

modelled the linear data of time series

and the residual of this linear model will

contain only the nonlinear data as shown

in figure 6 and 6a . In the second stage,

the GARCH(1,1) is used to modelled the

nonlinear patterns of the residuals. This

combined model which combines an

ARIMA model with GARCH(1,1) error

components is applied to analyze the

univariate series and to predict the values

of approximation series

[9][10][11][12][13].

In order to estimate the validity of mixed

model, ARIMA forecast obtained using

R methodology and then add conditional

variance to ARIMA forecast as shown in

figure 6 and 6a. The Log price as well

as low and high values at the 95 %

confidence level are also plotted as

shown in figure 7 which gives an

important result with high and low values

for future purpose. The conditional

variances plotted in figure 7, which

reflects the volatility of the time series

over the entire period from 2001 to 2014.

. High volatility in close price is closely

related to a period where the stock price

tumbled. In order to make the final check

on the model is to provide at Q-Q Plot of

residuals of ARIMA-ARCH (1,1) model

as shown in figure 7. Q-Q plot is plotted

directly using the R command to check

the normality of the residuals. The plot

shows that residuals seem to be roughly

normally distributed, although some

points remain off the line. However,

compared to residuals of ARIMA model

in figure 6, those of mixed model are

more normally distributed. [10]

The mathematical equation to complete

a model of ARIMA (2,1,2) as well as

ARCH (1,1) is written below

( Yt - Yt-1 ) - ht = 0.1390 (Yt-1-Yt-2) +

0.8438(Yt-2-Yt-3) - 0.0420 εt-1 + εt-2+εt

+0.0002159 + 0.1553540ε2t-­ 1 + 404955595 ε2

t-­2

ht = 0.0002159 + 0.1553540ε2t-­ 1 + 404955595 ε2

t-­2

Page 12: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

Note that the R compiler will exclude

constant when fitting ARIMA for series

needed differencing. [10]

It is noted that the 95% confidence

intervals of ARIMA (2,1,2) are wider

than that of the combined model ARIMA

(2,0,2) – ARCH (1,1). ARIMA /GARCH

forecasting tells us that the share price

moves between 22.19 to 34.04USD.

This is because the latter reflects and

incorporate recent changes and volatility

of stock prices by analyzing the residuals

and its conditional variances (the

variances affected as new information

comes in) [10].

CONCLUSION

In this work, time domain method is a

useful technique to analyze the financial

time series for predicting the stock price

to making money. There are some basic

points in forecasting based on combined

ARIM-ARCH/GARCH (1,1) model that

need to take into account. Firstly,

ARIMA (p, d, q) model focused on

analyzing time series linearly and it does

not reflect recent changes as new

information is available in the data.

Therefore, in order to more accurate the

model, researches need to incorporate

new data and estimate parameters again

for forecasting. [10]

The variance of stock price in ARIMA

model is unconditional variance and

remains constant. ARIMA is applied for

stationary series and therefore, non-

stationary series should be transformed.

Additionally, ARIMA and GARCH

models are often used together, namely

ARIMA/GARCH (1,1) model.

ARCH/GARCH (1,1) is a method to

measure the volatility of the series, or,

more especially, to model the noise term

of ARIMA model. ARCH/GARCH (1,1)

incorporates new information and

analyses the series based on conditional

variances where users can forecast future

values with up-to-date information to

making money. The forecast interval for

the mixed model is closer than that of

ARIMA-only model.

ACKNOWLEDGEMENTS

We would like to thank the Dyal Singh

College, University of Delhi for

providing the computational facility

during the course of this work.

Page 13: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

REFERENCES

Norman Matlo, The art of R

programming: tour of statistical

software design, No Starch

Press, Inc., ISBN-13: 978-1-

59327-384-2

Michael J. Crawley, The R

Book, John Wiley Sons Ltd,

ISBN-13: 978-0-470-51024-

7,2007

Robert H. Shumway David S.

Staffer, Time Series Analysis

and Its Applications, Third

edition, DOI 10.1007/978-1-

4419-7865-3,2011

Gergely Darczi ,Michael

Puhle,Edina Berlinger,Pter

Cska,Dniel Havran,Mrton

Michalet-

Sky, Zsolt Tulassay, Kata Vradi,

Agnes Vidovics-Dancs1

Introduction to R for

Quantitative

Finance,www.packtpub.com,

ISBN 978-1-78328-093-3.

[5] Christian P. Robert George

Casella, Introducing Monte

Carlo Methods with R, Springer,

ISBN 978-1-4419-1575-7,2010

Y. Cohen J.Y. Cohen, Statistics

and Data with R: An applied

approach through examples,

John Wiley Sons, Ltd. ISBN:

978-0-470-75805,2008.

[7] Ruey S. Tsay, Analysis of

Financial Time Series, Second

Edition, A John Wiley & Sons,

Inc., Publications,

ISBN-13 978-0-471-69074-0,

2005.

[8] Ghulam Ali ,EGARCH, GJR-

GARCH, TGARCH,

AVGARCH, NGARCH,

IGARCH and APARCH

Models for Pathogens at Marine

Recreational Sites, Journal of

Statistical and Econometric

Methods, vol. 2, no. 3, 2013,

57-73 ISSN: 2051-5057 (print

version), 2051- 5065 (online)

Scienpress Ltd, 2013.

[9] Paul S.P. Cowpertwait,

Andrew V. Metcalfe,

Introductory Time Series with R,

Springer Dordrecht Heidelberg

Page 14: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

London, New York, DOI

10.1007/978-0-387- 88698-5,

2009.

[10] Ly Pham, Time Series

Analysis with ARIMA –

ARCH/GARCH model in R, L-

Stern Group, 2013

[11] Varun Malik, Ranjit Kumar,

Abid Hussain, Rather

BAYESIAN ESTIMATION OF

GARCH

Coefficientsof Inr/Usd Exchange

Rate, Elk Asia Pacific Journal Of

Finance And Risk

Management, Issn 2349-2325

(Online); Doi:

10.16962/Eapjfrm/Issn. 2349-

2325/2015; Volume 7 Issue 1

(2016)

[12] John C. Hull, Options,

Futures and Other Derivatives,

Seventh Ed., Pearson – Prentice

Hall, 2009.

[13] J. D. Cryer and K. -S.

Chang, Time Series Analysis

With Applications in R, Springer,

2008.

[14] G M Ljung and G E P Box ,

On a measure of lack of fit in

time series models.Biometrika,

65, 2, pp. 297 - 303,1978.

[15] Box, G. E. P., and D. A.

Pierce. 1970. Distribution of

residual autocorrelations in

autoregressive-integrated

Moving average time series

models. Journal of the American

Statistical Association 65: 1509–

1526.

[16] Rob J

Hyndman,GeorgeAthansopoulos,

www.google.com/fpp

Page 15: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

LIST OF FIGURES:

Figure 1: Time series plot

Figure 2: Time series deviations shown with fitted linear trend line

The given hint helps to produce figure as same as figure 1:

>>data <- read.csv("filename.csv")

>>datat_ts <-ts (data$close, start=c(YYYY,MM), end=c(YYYY,MM) ,frequency = N)

>>plot(data_ts, type="l", ylab = "data", xlab = "Time",main ="Time series")

The given hint helps to produce figure look likes figure 2:

>>plot(data_ts,type="l",ylab = " close price", main="Time Series with trend")

>>newtime<-time(data_ts,start=c(YYYY),end=c(YYYY),frequency=N)

>>fit<-(reg=glm(data_ts ~time(data_ts),na.actio=NULL))

>>abline(fit,col='blue',lty=1:10)

Page 16: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

Figure 3: De trended (panel a), differenced ( panel b), log series(panel c) and

differenced log series(panel d) shown in figure

Figure 4: ACF and PACF plots

The given procedure helps to create figure look likes figure 3:

>>fit<-(reg=glm(data_ts~time(data_ts),na.actio=NULL))

>>par(mfrow=c(2,2))

>>plot(resid(fit),main="(a) detrended series",ylab="")

>>plot(diff(meandata),type="l",main="(b)differenced series",ylab="")

>>plot(log(meandata),main="(c)log series",ylab="")

>>plot(diff(log(meandata)),main="(d)diff.log series",ylab="")

The given procedure helps to create figure look likes figure 4:

par(mfrow=c(3,2))

acf(data_ts,main =" (a) ACF original series")

pacf(data_ts,main ="(b)PACF original series",ylab="")

acf(resid(fit),main ="(c) ACF detrended series",ylab="")

pacf(resid(fit),main ="(d) PACF detrended series",ylab="")

acf(diff(data_ts),main="(e) ACF differenced series",ylab="")

pacf(diff(data_ts),main ="(f) PACF differenced series",ylab="")

Page 17: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

Figure 5: acf and pacf arima residuals

Figure 6: ARIMA residuals

The given R codes helps to create figure look likes figure 5:

>>fit<-(reg=lm(data_ts~time(data_ts),na.actio=NULL))

>>difff<-diff(log(data_ts))

>>f405 <-Arima(difff,seasonal=list(order=c(2,0,2),period=12),include.drift=FALSE)

>>plot(f202$residuals,lag.max=100,main=" arima residual (a)",ylab="")

>>plot((f202$residual^2),lag.max=100,main="arima Squared Residuals(b)",ylab ="")

>>acf(f202$residuals,lag.max=100,ylim=c(-1,1),main="acf arima residual (c)",ylab="")

>>pacf(f202$residuals,lag.max=100,ylim=c(-1,1),main="pacf arima residual(d)",ylab="")

>>acf((f202$residual^2),lag.max=100,main="acf Squared Residuals(e)",ylim=c(-1,1),ylab="")

>>pacf((f202$residual^2),lag.max=100,main="pacf Squared Residuals (f)",ylim=c(- 1,1),ylab="")

The given R codes helps to create figure look likes figure 6:

f410<-Arima(logdata,seasonal=list(order=c(2,0,2),period=6),include.drift=F)

par(mfrow=c(1,2))

plot(forecast(f202),main=" forcast model",ylim=c(3.1,3.6))

lines(fitted(f202),col="red")

qq=f202$residuals

qqnorm(qq,main='ARIMA residuals')

qqline(qq)

Page 18: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

Figure 6a: Forcast price for 2015

Figure 7: ARIMA GARCH(1,1) residuals

The given R command lines helps to create figure look likes figure 7:

>>par(mfrow=c(2,2))

>>plot(log(data_ts),type='l',main='Data')

>>arima202<-Arima(logdata,seasonal=list(order=c(2,0,2),period=6),include.drift=TRUE)

>>fit202<-fitted.values(arima203)

>>low<-fit202-1.76*sqrt(ht.arch11)

>>high<-fit202+1.76*sqrt(ht.arch11)

>>plot(data_ts,type='l',main='Log price,Low,High')

>>lines(low,col='red')

>>lines(high,col='blue')

>>ht.arch11<-arch11$fit[,1]^2 #use 1st column of fit

>>plot(ht.arch11,main='Conditional variances')

>>archres<-res.f202/sqrt(ht.arch11)

>>qqnorm(archres,main='ARIMA-GARCH Residuals')

>>qqline(archres)

Page 19: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

The output of Garch(1,1) model as shown in figure7a:

Figure7a: GARCH(1,1) summary

Page 20: ARIMA/GARCH (1,1) MODELLING AND FORECASTING FOR A · PDF fileelk asia pacific journal of marketing and retail management issn 2349-2317 (online); doi: 10.16962/eapjmrm/issn. 2349-2317/2015;

ELK ASIA PACIFIC JOURNAL OF MARKETING AND RETAIL MANAGEMENT

ISSN 2349-2317 (Online); DOI: 10.16962/EAPJMRM/issn. 2349-2317/2015; Volume 8 Issue 1 (2017)

…………………………………………………………………………………………………

LIST OF TABLES:

Table 1: AIC values for (ARIMA, GARCH)

Arima(pdq) AIC ARCH (p, q) * AIC P value*

(Ljung - Box test)

Arima

(000)

-

759.48

Arch (00) Not done Not done

Arima

(101)

-

757.40

Arch (01) -798.0746 0.6248

Arima

(201)

-

755.75

Arch (02) -797.000 0.9112

Arima

(301)

-

754.41

Arch (03) -789.859 0.8964

Arima

(102)

-

756.10

Arch (04) -782.745 0.9118

Arima

(202)

-

760.85

Arch (05) -776.335 0.8237

Arima

(302)

-

757.08

Arch (06) -768.186 0.7979

Arima

(103)

-

754.69

Arch (07) -763.061 0.8378

Arima

(203)

-

755.23

Arch (08) -755.636 0.8032

Arima

(303)

-

757.08

Arch (09) -801.266 0.7877