Vous êtes sur la page 1sur 27

PROJECT REPORT

PROJECT REPORT

ESTIMATING THE FUTURE VALUE AND


VOLATILITY OF A TIME SERIES DATA

As a part of the internship program at

Submitted By

Vishal Bohra

(16A1HP068)

Under the guidance of


Prof. Chakrapani Chaturvedula

(Faculty guide)

Institute of Management Technology

Hyderabad

Mr. Anil Kumar Upadhyay

Corporate Finance Head

(Company guide)

Rain Industries Ltd

1|P a g e
A REPORT ON

ESTIMATING THE FUTURE VALUE AND VOLATILITY OF A


TIME SERIES DATA

PREPARED FOR

RAIN INDUSTRIES LIMITED

APPROVED BY

ANIL KUMAR UPADHYAY

(Corporate Finance Head)

BY

VISHAL BOHRA

PGDM

INSTITUTE OF MANAGEMENT TECHNOLOGY

HYDERABAD

JUNE 2017

2|P a g e
Copy right 2017 by Vishal Bohra

This is a work of generating report on Estimating the future value and volatility of a time
series data

All rights reserved.

No part of this report may be reproduced, transmitted, or stored in a retrieval system, in any
form or by any means, electronic, mechanical, photocopying, recording or otherwise, without
the prior permission of the author.

3|P a g e
Forwarding Letter

To

The Corporate Finance Head

Rain Industries Limited

Hyderabad

From

Vishal Bohra

PGDM

Institute of Management Technology

Hyderabad

Subject: Submission of an Internship Project Report for Evaluation

Dear Sir,

I am enclosing herewith an internship project report entitled Estimating the price variance of
products in the industry using time series data for Evaluation.

With the submission of this internship project report, I would like to undertake that the
above-mentioned report has not been published elsewhere, accepted for publication
elsewhere.

The research project was my

PGDM Summer Internship Program

This research project was conducted from 13 March 2017 to 16 June 2017

Yours Sincerely

Vishal Bohra

(IMT Hyderabad)

4|P a g e
PREFACE

The PGDM is a well-structured and integrated course of business studies.

The main objective of internship is to develop skills in students by supplement to the


theoretical study of business management in general. Internship helps to gain real knowledge
about the industrial environment and business practices.

The PGDM program provides student with a fundamental knowledge of business and
organizational functions and activities, as well as an exposure to strategic thinking of
management.

In every professional course, training is an important factor.

Professors give us theoretical knowledge of various subjects in the college but we are
practically exposed to such subjects when we get the internship in the organization. It is only
the training through which I came to know that what an industry is and how it works. I can
learn about various departmental operations being performed in the industry, which would, in
return, help me in the future when I will enter the practical field.

Training is an integral part of PGDM and every student should undergo the internship for 14
weeks in a company and then prepare a project report on the same after the completion of
training.

During this whole training, I got a lot of experience and came to know about the management
practices in real and how it differs from the theoretical knowledge.

In todays globalize world, where cutthroat competition is prevailing in the market,


theoretical knowledge is not sufficient. Besides this, one needs to have practical knowledge,
which would help an individual in his/her carrier activities and it is true that Experience is
the best teacher

5|P a g e
ACKNOWLEDGEMENT

All praise to almighty God whose mercifulness benevolence gifted me the ever-caring
parents whose praise and selfless gesture made this work to reach its fruitful destination.

At the onset, I would like to express my heartiest thanks to Prof. Chakrapani


Chaturvedula who gave me an opportunity to undertake a project at Rain Industries Limited.

I express my sincere regard to my company guide Mr. Anil Kumar Upadhyay


(Corporate Finance Head) for his excellent command over the information regarding interpretation
of financial data and sharing the same with me has come a long way to help me complete this project.
Moreover, I am also thankful to all other employees of the Rain Industries Limited who have been
very supportive throughout the project period.

Lastly I want to pay my hearted thanks to my friends and people who gave to me their
valuable suggestion and guidance in completing my project.

Vishal Bohra

(IMT Hyderabad)

6|P a g e
Table of Contents
1. Company Overview ...................................................................................................... 8
1.1 Rain Group Operating Facilities.............................................................................. 9
2. Outlook of Company's Business ................................................................................ 10
2.1 Outlook Of Carbon Products Business.................................................................. 10
2.2 Outlook of Chemical Business .............................................................................. 10
2.3 Outlook For Cement Industry................................................................................ 10
3. Objectives of Research ............................................................................................... 11
3.1 Description in Brief ............................................................................................... 11
4. Research Methodology ............................................................................................... 12
4.1 Trend Analysis....................................................................................................... 14
4.2 Exponential Smoothing ......................................................................................... 18
5. Derivatives.................................................................................................................. 20
5.1 Forwards ................................................................................................................ 20
5.2 Futures ................................................................................................................... 20
5.3 Options................................................................................................................... 21
5.3.1 Call option ....................................................................................................... 21
5.3.2 Put option ......................................................................................................... 21
5.4 Option Pricing ....................................................................................................... 22
5.5 Volatility ................................................................................................................ 22
5.6 Financial Time Series ............................................................................................ 23
5.7 ARCH Model......................................................................................................... 23
5.8 ARCH (1) Variance Model ................................................................................... 23
5.9 GARCH Model ...................................................................................................... 24
5.10 GARCH Program ................................................................................................ 24
6. References .................................................................................................................. 27

7|P a g e
1. Company Overview

Rain Industries Limited (formerly Rain Commodities Limited) ("Rain Group") is one of the
world's leading producer of Carbon and Chemical Products and is one of the leading producers
of Cement in South India.

Business Verticals Description of Business

Carbon Products
Business Carbon Products comprise Calcined Petroleum Coke
("CPC"), Green Petroleum Coke ("GPC"), Coal Tar Pitch
("CTP"), Co-generated Energy and other derivatives of Coal
Tar Distillation.
Activities across the World with operating facilities spread
across Africa, Belgium, Canada, Germany, India, Poland
and United States of America. The Russian JV facility is
under construction and expected to commence operation
from Second half of CY 2015.
C0-generation facilities located in USA and India.

Chemicals Business Chemicals include the downstream operation of Coal Tar


distillation and comprise Resins, Modifiers, Super
Plasticizers and other specialty products.
Activities across the world with facilities in Germany,
Canada and Netherlands.

Cement Business Production and sale of Cement.


Activities predominantly in South India.
Entering new market regions viz. Maharashtra, Orissa and
Kerala.
Marketed under the brand name "Priya Cement".

8|P a g e
1.1 Rain Group Operating Facilities

Business Verticals Facility

Carbon Products Business Visakhapatnam- Andhra Pradesh,


India
Lake Charles- Louisiana, USA
Robinson- Illinois, USA
Chalmette- Louisiana, USA
Gramercy- Louisiana, USA
Norco- Louisiana, USA
Purvis- Mississippi, USA
Castrop- Rauxel, Germany
Zelzate, Belgium
Hamilton, Canada
Adabeya- Suez, Egypt
Kedzierzyn- Kozle, Poland
Cherepovets, Russia

Chemicals Business Duisburg, Germany


Uithoorn, Netherlands
Candiac, Canada
Hanau, Germany

Cement Business ("Priya Cement") Nalgonda- Telangana, India


Kurnool- Andhra Pradesh, India
Bellary- Karnataka, India

9|P a g e
2. Outlook of Company's Business

2.1 Outlook Of Carbon Products Business

Calcined Petroleum Coke ("CPC") is produced from Green Petroleum Coke ("GPC"), a by-
product of Crude Oil Refining process, through a process known as "Calcining". Similarly,
the key raw material for Coal Tar Pitch ("CTP") is Coal Tar, a liquid by product produced in
the coking process of converting coal into Metallurgical Coke.

Together, CPC and CTP comprise the critical component of Carbon Anodes used in
Aluminium smelting process. As per the recent industry reports, approximately 77% of the
world's CPC production and 79% of the world's CTP production is used in production of
Carbon Anodes for Aluminium smelting process. For every, 1000 kgs of Aluminium 400 kgs
of CPC and 100 kgs of CTP is required.

2.2 Outlook of Chemical Business

With improving economic prospects, in particular through the development of manufacturing


sector, global annual growth in Chemicals is projected to be 3.6% in 2015 and 3.9% in 2016.
The strongest effects will be originated by the developing nations of Asia, Africa and the
Middle East.

According to U.S.'s chemical industry association ACC (American Chemical Council),


chemical output in the U.S. is expected to grow by 3.7% in 2015 and by3.9% in 2016.

According to Europe's leading Chemical industry association CEFIC, Chemical production in


Europe is expected to grow by only 1% in 2015.

For Germany and estimated 1.5% growth for 2015 is expected, compared to a decrease of
0.5% in 2014.

In general the global Chemical industry expects an improvement for the years to come
strengthening production volumes and global capacity utilization.

2.3 Outlook For Cement Industry

With a stable new government at the centre and in the states of Telangana and Andhra
Pradesh, we expect the core thrust to be on infrastructure-driven growth. Based on the recent
reports which suggests that cement demand in India is expected to reach 550-600 MT by
2025, against a current capacity of 360 MT ( second largest after China).

10 | P a g e
3. Objectives of Research

To provide guidance for the pricing of all products of Rain Carbon companies.
To analyse the publicly available financial information of competitors, customers
and suppliers to understand their costing parameters.

3.1 Description in Brief

The industry landscape in which the company operates has changed considerably in a relative
short time in many ways over the last few years. For example, the aluminium industry which
is an important customer base for Calcined Petroleum Coke (CPC) and Coal Tar Pitch (CTP),
has shifted markedly towards Asia. China now produces more than half of the worlds
aluminium. The Middle East and India are areas with substantial production growth, while
production in more traditional markets in the Americas and Europe has eroded. These
changes created significant challenges and opportunities for raw material sourcing, product
quality, logistics and competitive market share.

Historically RIL has managed change mostly in reactive mode. RIL reacted to market
changes to mitigate the impact on their profitability and market share as they see them occur.
However, this approach will not be sufficient to meet future challenges. So RIL wanted to
shift from reactive business model to a proactive strategic model. By this approach the
company wants to proactively see the approaching changes in market trends, regional
developments.

A Proactive Strategic Model is driven by data first, to understand how it will affect the
company, its competitors and markets, and allow RIL to take appropriate action in advance of
events happening.

11 | P a g e
4. Research Methodology

Aluminum is a truly valuable metal with a dynamic future. It has an excellent combination of
light weight, high strength, superior corrosion resistance and excellent electrical conductivity.
It is very easy to recycle only 5% of the energy required to make primary aluminum is
required for recycling a similar quantity. And 70% of the aluminum ever produced is still in
use.

Aluminum lowers the weight of trains, planes, automobiles, structures and transmission lines,
thereby increasing energy efficiency and promoting a better environment. Many consider
aluminum a green metal for its ability to reduce vehicle fuel consumption.

Rain CII is a leading global supplier and innovator in the production of calcined petroleum
coke (CPC), which is essential to the manufacture of aluminum. Carbon anodes are essential
to the production of aluminum.

Anodes used in the Hall-Heroult aluminum process are made from calcined petroleum coke
(CPC) and coal tar pitch. Most smelters maintain an anode plant. A handful of standalone
anode plants supply pre-baked anodes to smelters without plants and to those who need
anodes because of production shortfalls or maintenance shutdowns.

Pre-baked carbon anodes made from CPC are used to produce aluminum. In addition to CPC
and coal tar pitch, spent anodes or butts are used in the anode recipe. A typical breakdown
is 67% CPC, 20% butts and 13% coal tar pitch. Green anodes are produced first and baked in
large furnaces to a final temperature of approximately 1150C. They are then rodded and
used in electrolysis cells. Anodes are consumed in the process and must be replaced every
20-30 days, depending on the size and cell design.

CPC quality directly influences anode quality and performance. Smelters set critical quality
parameters such as sulphur and trace metal impurities (vanadium, nickel, calcium, iron,
silicon and sodium). CPC physical properties such as bulk density, real density and particle
size are also important when making anodes. Because of its lower thermal expansion
coefficient, CPC with a sponge coke structure is favoured over a shot coke structure.

The countries where the aluminium is being smelted are categorised into regions based on the
continent to which they belong.

The time series data of countries pertaining to CPC, GPC and Aluminium (production,
imports, exports, supply & demand), Macroeconomic variables (GDP, Unemployment, CPI),
Exchange rates are being collected and configured in an excel dash board.

The sample excel template is shown below. The data pertaining to both industries specific
and the macro economic data was to be collected and configured in the below format.

12 | P a g e
Fig 1. Dashboard template-1

Fig 2. Dashboard template-2

We are trying to predict the variances in the prices of raw materials required for the industry
by taking in to account the macro-economic data and the industry specific data of the
countries where the aluminium smelters are located.
13 | P a g e
4.1 Trend Analysis
Trend estimation is a statistical technique to aid interpretation of data. When a series of
measurements of a process are treated as a time series, trend estimation can be used to make
and justify statements about tendencies in the data, by relating the measurements to the times
at which they occurred. This model can then be used to describe the behaviour of the
observed data.

To analyse a (time) series of data, we assume that it may be represented as trend plus noise

Where a and b are unknown constants and the e's are randomly distributed errors. If one can
reject the null hypothesis that the errors are non-stationary, then the non-stationary series
{yt } is called trend stationary. The least squares method assumes the errors to be
independently distributed with a normal distribution. If this is not the case, hypothesis tests
about the estimated values of a and b may be inaccurate. It is simplest if the e's all have the
same distribution, but if not (if some have higher variance, meaning that those data points are
effectively less certain) then this can be considered during the least squares fitting, by
weighting each point by the inverse of the variance of that point.

The least-squares fitting process produces a value r-squared (r2) which is the square of the
residuals of the data after the fit. It says what fraction of the variance of the data is explained
by the fitted trend line. It does not relate to the statistical significance of the trend line
statistical significance of the trend is determined by its t-statistic. Often, filtering a series
increases r2 while making little difference to the fitted trend.

On the macro-economic data that we have collected in our template we have taken India data
and applied the linear trend analysis. By doing this we have estimated the values for the next
5 years. Except few variables such as exchange rate, government balance almost all other
variables data that has been collected we have taken in to consideration the y-o-y change in
the value. So, the trend estimates also dont show the exact value of the variable considered
but the growth estimation.

The trend analysis of some of the data is done and is shown below

14 | P a g e
Fig 3. Linear trend estimation of GDP and Private consumption of India.

Conclusions
From the analysis of the data, the GDP growth of India is going to be 7.6%
for 2017-18 and 7.7% for 2018-19. Our findings are near with the
International Monetary Fund (IMF) expected growth rates of GDP i.e. 7.2%
for 2017-18 and 7.7% for 2018-19.
It is expected that the consumption of the households will be seeing a growth
for the upcoming years as the disposable income is going to be more as pay
commission as increased the wages for employees.
The United Nations pegged Indias private consumption rate at 7.7 per cent
in 2017 and 7.6 per cent in 2018.

15 | P a g e
Fig 4. Linear Trend analysis of Exports and Imports

Conclusions
From our analysis, we found out that the exports are going to see a growth of 5.2%
in 2017. As per Ministry of commerce and Industry the growth in exports was seen
to be 4.7% till March-2017.
Coming to imports our analysis has pegged growth to be 3.2% in 2017. As per the
data available till March of 2017 the imports has seen a growth of 2.43%.

16 | P a g e
Fig 5. Linear trend analysis of Unemployment and Consumer prices.

Conclusions

As per the data available till May 2017 the CMIE the unemployment rate in India is
stands at an average of 4.5%. This value is almost close to our findings as the
estimated value we obtained was 4.23%.
As per Nomura a Japanese financial agency the CPI is estimated to be on an
average of 5.3%.

17 | P a g e
4.2 Exponential Smoothing

Exponential smoothing is a rule of thumb technique for smoothing time series data,
particularly for recursively applying as many as three low-pass filters with exponential
window functions. Such techniques have broad application that is not intended to be strictly
accurate or reliable for every situation. It is an easily learned and easily applied procedure for
approximately calculating or recalling some value, or for making some determination based
on prior assumptions by the user, such as seasonality. Like any application of repeated low-
pass filtering, the observed phenomenon may be an essentially random process, or it may be
an orderly, but noisy, process. Whereas in the simple moving average the past observations
are weighted equally, exponential window functions assign exponentially decreasing weights
over time. The use of three filters is based on empirical evidence and broad application.
The raw data sequence is often represented by {xt} beginning at time t=0 , and the output of
the exponential smoothing algorithm is commonly written as {st}, which may be regarded as
a best estimate of what the next value of will be. When the sequence of observations begins
at time t=0 , the simplest form of exponential smoothing is given by the formulas

Fig 6. Exponential smoothing with alpha=0.1

18 | P a g e
Fig 7. Exponential smoothing with alpha=0.5

Fig 8. Exponential smoothing with alpha=0.9

19 | P a g e
Conclusions
As we can see the graph in the red i.e. the exponentially smoothing graph follows the
original graph as the value of alpha () increases.
The graph almost matches with the original graph when alpha=0.9
By this we can forecast the value of a time series data to the extent of next period.

5. Derivatives

The term derivatives is used to refer to financial instruments which derive their value from
some underlying assets. The underlying assets could be equities (shares), debt (bonds, T-bills,
and notes), currencies, and even indices of these various assets, such as the Nifty 50 Index.
Derivatives can be traded either on a regulated exchange, such as the NSE or off the
exchanges, i.e., directly between the different parties, which is called over-the-counter
(OTC) trading. (In India only exchange traded equity derivatives are permitted under the
law.)

The National Stock Exchange (NSE) is the largest exchange in India in derivatives, trading in
various derivatives contracts. The following are the three basic forms of derivatives, which
are the building blocks for many complex derivatives instruments

Forwards
Futures
Options

5.1 Forwards

A forward contract or simply a forward is a contract between two parties to buy or sell an
asset at a certain future date for a certain price that is pre-decided on the date of the contract.
Forward contracts are traded only in Over the Counter (OTC) market and not in stock
exchanges.

5.2 Futures

Like a forward contract. However, unlike a forward contract, a futures contract is not a
private transaction but gets traded on a recognized stock exchange.

20 | P a g e
5.3 Options

An option is a derivative contract between a buyer and a seller, where one party (say First
Party) gives to the other (say Second Party) the right, but not the obligation, to buy from (or
sell to) the First Party the underlying asset on or before a specific day at an agreed-upon
price. In return for granting the option, the party granting the option collects a payment from
the other party. This payment collected is called the premium or price of the option
There are two types of options
Call options
Put option

5.3.1 Call option

A person exercises his right to buy the underlying asset if and only if the price of the
underlying asset in the market is more than the strike price on or before the expiry date of the
contract. The buyer of the call option does not have an obligation to buy if he does not want
to.

5.3.2 Put option

A person exercises his right to sell the underlying asset if and only if the price of the
underlying asset in the market is less than the strike price on or before the expiry date of the
contract.

i. In-the-money option

An option is said to be in-the-money if on exercising the option, it would produce a cash


inflow for the buyer. Thus, Call Options are in-the-money when the value of spot price of the
underlying exceeds the strike price. On the other hand, Put Options are in-the-money when
the spot price of the underlying is lower than the strike price.

ii. Out-of-the-money option

An out of -the-money option is an opposite of an in-the-money option. An option-holder will


not exercise the option when it is out-of-the-money. A Call option is out-of -the-money when
its strike price is greater than the spot price of the underlying and a Put option is out-of-the
money when the spot price of the underlying is greater than the options strike price.

iii. At-the-money option

An at-the-money-option is one in which the spot price of the underlying is equal to the strike
price. It is at the stage where with any movement in the spot price of the underlying, the
option will either become in-the-money or out-of-the-money.

Based on the applications that derivatives are put to, these investors can be broadly classified
into three groups
Hedgers

21 | P a g e
Speculators
Arbitrageurs

5.4 Option Pricing

Before venturing into the world of trading options, investors should have a good
understanding of the factors that determine the value of an option. These include the current
stock price, the intrinsic value, time value, volatility and cash dividends paid. There are
several options pricing models that use these parameters to determine the fair market value of
the option. Of these, the Black-Scholes model is the most widely used.

The effect of volatility is mostly subjective and it is difficult to quantify. Fortunately, there
are several calculators that can be used to help estimate volatility. To make this even more
interesting, there are also several types of volatility - with implied and historical being the
most noted.

Historical volatility provides the investor a relative perspective of how volatility impacts
options prices, while current option pricing provides the implied volatility that the market
currently expects in the future. Knowing the current and expected volatility that is in the price
of an option is essential for any investor that wants to take advantage of the movement of a
stocks price.

5.5 Volatility

Volatility is a statistical measure of the dispersion of returns for a given security or market
index. Volatility can either be measured by using the standard deviation or variance between
returns from that same security or market index. Commonly, the higher the volatility the
riskier the security.

In other words, volatility refers to the amount of uncertainty or risk about the size of changes
in a security's value. A higher volatility means that a security's value can potentially be
spread out over a larger range of values. This means that the price of the security can change
dramatically over a short time in either direction. A lower volatility means that a security's
value does not fluctuate dramatically, but changes in value at a steady pace over a period.

Why Forecast volatility?

The three main purposes of forecasting volatility are for risk management, for asset
allocation, and for taking bets on future volatility. A large part of risk management is
measuring the potential future losses of a portfolio of assets, and to measure these potential
losses, estimates must be made of future volatilities and correlations.
Volatility not only spikes up during a crisis, but it eventually drops back to approximately the
same level of volatility as before the crisis. Over the decades, there have been periodic spikes
in equity volatility due to crises that caused large market drops such as the Great Depression,

22 | P a g e
Watergate, the 1987 stock market crash, Long Term Capital Managements collapse in 1998,
the September 11 terrorist attacks, and the bankruptcy of WorldCom in 2002.

Another observation about returns is they exhibit excess kurtosis (the fourth moment of
returns), or fatter tails, relative to a normal distribution. The models we look at will attempt to
capture the autocorrelation of squared returns, the reversion of volatility to the mean, as well
as the excess kurtosis.

5.6 Financial Time Series

Financial time series data, like the relative return of a stock or a portfolio of stocks, often
consist of periods of calm behaviour alternating with periods of very wild fluctuations. In
general, the fluctuations or the diculty to predict a future value of a stock or some other
asset is a measure of how risky the asset is. In financial terms this is called the volatility of
the asset.

5.7 ARCH Model

An ARCH (autoregressive conditionally heteroscedastic) model is a model for the variance a


time series ARCH models are used to describe a changing, possibly volatile variance.
Although an ARCH model could possibly be used to describe a gradually increasing variance
over time, most often it is used in situations in which there may be short periods of increased
variation. ARCH models were created in the context of econometric and finance problems
having to do with the amount that investments or stocks increase (or decrease) per time, so
theres a tendency to describe them as models for that type of variable.
The variable of interest in these problems might either be

yt = (xt - xt-1)/xt-1, the proportion gained or lost since the last time, or

log(xt/xt-1) = log(xt) - log(xt-1), the logarithm of the ratio of this times value to last times
value.

5.8 ARCH (1) Variance Model

Suppose that we are modelling the variance of a series yt. The ARCH (1) model for the
variance of model yt is that conditional on yt-1, the variance at time t is

We impose the constraints 0 0 and 1 0 to avoid negative variance. Note that the
variance at time t is connected to the value of the series at time t 1. A relatively large
value of y2t1yt12 gives a relatively large value of the variance at time t. This means that

23 | P a g e
the value of yt is less predictable at time t 1 than at times after a relatively small value
of y2t1yt12.

5.9 GARCH Model

A GARCH (Generalized Autoregressive Conditionally Heteroscedastic) model uses values of


the past squared observations and past variances to model the variance at time t. As an
example, a GARCH (1,1) is

2t=0+1y2t1+12t1t2=0+1yt12+1t12

In the GARCH notation, the first subscript refers to the order of the y2 terms on the right side,
and the second subscript refers to the order of the 2 terms. The GARCH process is often
preferred by financial modelling professionals because it provides a more real-world context
than other forms when trying to predict the prices and rates of financial instruments. GARCH
aims to minimize errors in forecasting by accounting for errors in prior forecasting,
enhancing the accuracy of ongoing predictions.

It seems as the GARCH (1,1) process often regarded to be reasonably realistic model. The
equation can be written as

where 0 > 0, 1 > 0, 1 > 0, and 1 + 1 < 1, so that our next period forecast of variance is a
blend of our last period forecast and last periods squared return.

5.10 GARCH Program

GARCH program is used to find the volatility of the share price of the Rain Industries Ltd.

setwd("C:\\Users\\User\\Documents\\Data\\")
rain=read.csv("rain.sp.csv")
str(rain)
rain$Date= as.Date(rain$Date, format="%d-%b-%y")
ret=diff(log(rain$Close))*100

#install.packages("tseries") One time installation required


library(tseries)
meqn2=arima(ret,order=c(0,0,1))

res=residuals(meqn2)

24 | P a g e
sres=(res-mean(res))/sd(res)
par(mfrow=c(2,2))
acf(rain$Close,lag.max = 10)
acf(ret,lag.max = 10)
acf(sres,lag.max = 10)
sresq=sres*sres
acf(sresq,lag.max = 10)
#install.packages("rugarch")

# Running Garch models


#install Packages rugarch from packages install first time only
library(rugarch)

#?garch
#?ugarchfit

fit1=ugarchfit(spec=ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,1)),
mean.model = list(armaOrder=c(0,1))),data=ret)
fit1
gres=residuals(fit1)
gresq=gres*gres
acf(gres,lag.max = 10)
acf(gresq,lag.max = 10)
sgres=(gres-mean(gres))/sd(gres)
sgresq=sgres*sgres
acf(sgresq,lag.max = 10)

volatility=sigma(fit1)
plot(volatility, type='l')
head(volatility)

The results of above program

25 | P a g e
Fig. Plots of ACF

Fig 9. Plots of ACF

Fig 10. Plots of ACF and volatility

Conclusion

From the program results we derived the value of

0 = 1.39
1 = 0.18
1 = 0.70
Variance = 11.58%

26 | P a g e
6. References

1. https://www.math.kth.se/matstat/gru/sf943/ts.pdf

2. https://onlinecourses.science.psu.edu/stat510/node/78

3. http://www.rain-industries.com/

4. http://www.moneycontrol.com/

5. http://www.factfish.com/

6. https://www.rstudio.com/
7. http://math.ucdenver.edu/RTutorial/Tutorial_guide.pdf

27 | P a g e

Vous aimerez peut-être aussi