You are on page 1of 19

Trading of Derivative in the Stock Market: A Strategic Decision

Making Perspective

Abstract
In this paper we have tried to predict next day stock price on the basis of previous day stock
prices. For this, we have used a statistical tool Multivariate Regression. Every day we have tried
to predict the tomorrows price. On the basis of that, we have developed a method of trading in
stocks and corresponding derivatives. Although predictability is very small, in some case it
becomes significant. Then we have done error analysis. The error is nearly same as the change
per day. Therefore error analysis does not reveal anything significant. But there are other
statistical observations which increase the reliability of the method. The values of coefficients
appearing in regression give an idea how and when this method can be used for trading. If the
coefficients of regression acquire large value of magnitude, the prediction becomes more
accurate. For some stocks/indices this condition is satisfied, while for some others it is not
satisfied. And the condition is satisfied during a particular time span only. Therefore, while using
this method of trading these things should be kept in mind, and trading should be done on
selected stocks only. If basic criteria are fulfilled for a stock, huge profit can be generated by this
method of trading. Results also indicate that there is very little scope for time series analysis for
next day stock price prediction. But predictability is not zero. There is small amount of scope
existing for some selected stocks and indices.

Introduction- Indian and US stock market


Stock market is a place where shares and other related financial instruments are traded. Shares
are the share in the ownership of a company. Apart from shares other financial instruments such
as derivatives (futures and options) are also traded in stock market. As the name suggest
derivative have their values derived from shares (or other underlying asset) from which they are
derived. Primary reason behind trading of shares is the different expectation from the company
by two trading parties. The person who buys the share is optimistic about future performance of
company. He/she expects that share will be traded at higher price in future and by buying it today
and selling later will fetch some profit. Those who sell the shares are pessimistic about the future
performance of the company. This paper includes the study of shares and derivative of Indian
Stock Market and US Stock Market. US based Nasdaq Stock Exchange has one of largest market
capitalization in world while Indian Stock Market NSE is one of the busiest market in world.
Everyday shares of values Billions of US dollar are exchanged in these markets. This paper aims
to find a method for day to day trading of shares and its derivatives. Multivariate Regression has
been used to forecast the tomorrows share/index price and according to that a trading method has
been developed to take a buy/sell decision.
Trading of Derivative
In this paper, we have studied the price variation of shares and the market index. Although data
used is that of shares, the presented method is more suitable for the derivative (future) trading
based on those shares. Since this trading method includes buying and selling nearly on everyday
basis, trading cost becomes an important factor in decision making, therefore derivatives trading
are suggested over share trading. Derivative trading had much smaller trading cost as compared
to share trading cost. Apart from this short selling is possible only for intraday trading for shares.
But derivatives can be traded to take a short or long position in share/index (basket of shares).
What are derivatives? These are financial instruments based on some underlying asset. The
underlying asset could be shares, market index, commodity, currency etc. here we will discuss
only about special kind of derivative called futures, and that to based on market index and shares
only. What is future? Future is an agreement between two parties according to which one party
agrees to buy/sell the shares or index at a particular price from the other party on a particular date
(called date of expiry). These kinds of future agreement are allowed in almost all stock markets
of world. On expiry date, If actual price of share goes above the agreed price, then the person
agreed to buy the share at fixed price will be in profit (because he/she will buy it at previously
agree lower price and sell it in market at higher price). While the other party will incur loss
because he/she has to sell the shares at price lower than that of market (he/she has to buy shares
at higher price from market and sell it at lower price to the first party at lower price).

On expiry date, If actual price of share goes below the agreed price, then the person agreed to
buy the share at fixed price will be in loss(because he/she has to buy it at previously agree higher
price).
But practically price of a future and price of its underlying share (spot price) generally maintains
a small gap. This gap gradually converges to zero on by the time of expiry. In a small time
horizon (2-3 days) the gap between future price and spot price remains nearly same. Therefore
predicting a spot price is well suitable for trading in futures.

Literature support - Various methods has been developed by analysts in this direction. But due
to highly stochastic nature of the stock market, no method is full proof. There has been simple
moving average(Simple Technical Trading Rules and the Stochastic Properties of Stock Returns
By WILLIAM BROCK, JOSEF LAKONISHOK, and BLAKE LEBARON) used for forecasting
future price. But the Moving Average method lacks on various aspects. It cannot deal well with
stochastic variation. We have a modified form Exponential Moving Average which assumes
stock prices to follow exponential pattern. Other methods which have been developed are auto
regressive model. It assumes that future prices are dependent on past and present prices. This
method has some merit because, though small, some auto correlation exists in the stock price
movement. There are other methods which include both Auto Regression and Moving Average
(ARMA). There are other methods such as Box-Jenkins method, which is based on the concept
of ARIMA (Integrated Mixed Autoregressive Moving Average Series).ANN(Artificial Neural
Network ) Model has also been developed for predicting stock market( ANN Model to Predict
Stock Prices at Stock Exchange Markets by Wanjawa, Barack Wamkaya & Muchemi,
Lawrence). Genetic Algorithm has also been used for forecasting of stock prices (Kyoung-jae
Kim and Ingoo Han). Evaluation and review has also been done for these methods by various
experts (How effective are Neural Networks at Forecasting and Prediction? A Review and
Evaluation by MONICA ADYA AND FRED COLLOPY).
Data source and software used
For predicting the next day stock price, we have used Multivariate regression with the help of
Microsoft Excel. The data has been taken from www.yahoofinance.com .It provides historical
share price data in tabular form with variables date, open price, high price, low price, close price
and Volume . A particular row contains data about open price, High price, Low price, Close price
and Volume on that particular date. Last 5 year data has been studied in this paper.
Model
Objective:- Our objective is to suggest a trading method for derivatives to maximize the profit
over a long time.

Research Methods:- Our method is similar to auto-regression model with some modification.
We have used Multivariate regression, the equation for the same can be written as

where y is dependent variable while x 1 , x2 ,x3, x4 , x5 are independent variable. a,b,c,d,e,f are
constants. It is assumed that y is linearly dependent on x 1, x2, x3, x4, x5 with different coefficients.
Last 150 days data is used for finding the coefficients a, b, c, d, e, f. Least square curve fitting
method is used to find the best value of coefficients a,b,c,d,e,f. This whole calculation is done
with help of MS Excel. Excel takes the last 150 days data and returns the best values of
coefficients.
CP =closing price
HP= High price
LP= Low price
Here dependent variable y=todays CP
Independent variable
x1= yesterdays (HP+LP+CP)/3
x2= day before yesterdays (HP+LP+CP)/3
x3= 3 days back (HP+LP+CP)/3
x4= 4 days back (HP+LP+CP)/3
x5= previous days HP-LP
Similarily, total 150 set of data corresponding to previous 150 trading days are considered for
finding the best forecast. Regression on these 150 set of data returns the best value of
coefficients. Now next day closing price y is predicted by using the value of corresponding x 1 , x2
,x3, x4 , x5 with calculated coefficients. By todays closing time of market we have values of all
the required independent variables for tomorrows price prediction, all independent variable
values are known by todays closing time of market. It can be expressed as;

For tomorrows price prediction,


y1 is todays closing price and corresponding independent variables
y2 is yesterdays closing price and corresponding independent variables
y3 is day before yesterdays closing price and corresponding independent variables
upto 150 day
For every coming day the y and independent variables will be different with new set of data
coming for the day. Therefore we find the corresponding coefficients everyday by the time
market closes. Since we have to place the order accordingly before closing of market, we take
price at 15 minute before closing price of the day and feed the data for tomorrows price
prediction. After calculating the tomorrows predicted price, we can take buy/sell decision before
closing of market.
Why have we used Multi Variable Regression? Share prices are highly stochastic in nature and
exhibit very small correlation with the previous prices. If correlation coefficient is found for
todays price change with the yesterdays price change, its value ranges from .1 to .35 for
different share and indices, which cant be considered significant. But even small profit making
opportunity, added over a long time gives huge return. The hope exists because, correlation is not
zero.
Decision making:- If tomorrows predicted price is more than todays closing price then we go
for long position. Similarly, if tomorrows predicted price is less than todays closing price then
we go for short position.

Decision Making Tree

Star
t

PP=tomorrows
predicted price
CP=todays closing
price

If
PP>CP

If Position=
Long

If Position=
Long

Sell 2 units ;

Sell 2 units ;

Position=Short;

Position=Long;

Repeat for next


day
End for
the day

Every day by the closing time of market we predict the price for next day and we trade
accordingly. The price prediction has been done for the last 5 years on everyday basis.
I.

Next we have analyzed that, if we would have followed this method of trading then what
profit/loss would have been made. For this we have taken the predicted price and the next
day actual closing price, and we can calculate profit/loss for the day as

before

Profit= Tomorrows CP - Todays CP


closing of todays market}

Profit= Todays CP - Tomorrows CP


closing of todays market}

.{If Long position was taken


.{If Short position was taken before

The profit is calculated on everyday basis.


Why are we doing the above calculation?
Because it gives an idea that, how this method would performs on real time.
II.
Then we have calculated the percentage gain per day . It is done by taking profit/loss
percentage change with respect to previous closing price.
Profit 100
P=
Closing Price
Why are we doing the above calculation?
It is giving us an idea that, how much percentage profit/loss will be made on day to day
basis. We have done his calculation for various stocks. Since it gives percentage gain, it
becomes easier to compare different shares on this method.
III.

To see how much profit can be made by this trading method, daily percentage profit/loss
is summed over a period of 250 trading days(nearly one year).Say it accumulated
percentage profit/loss. It gives an idea about how much profit can be made per year.
Accu. Percentage profit = yesterdays accu. Percentage Profit + todays percentage profit
Starting from September 2015 upto September 2016(250 consecutive trading days), we
calculated accumulated profit for one year. Similarly from September 2014 to September 2015,
we calculated accumulated profit for previous year. And we did this for last 5 years
Then accumulated profit/loss has been plotted with time on x-axis. Accumulated profit for five
different years has been shown on the same graph. The graph gives a very clear picture about
how profit is varying with time. It also gives an idea about an average rate of growth in realized
profit
Why are we doing the above calculation?
It is giving us an insight that, how much profit/loss will be made over a period of one year.
Error Analysis:IV. To analyze the risk associated with the proposed trading method, we have done the error
analysis. For this first we took rms(root mean square) of per day percentage change of
closing prices. Rms change has been found for last 250 days. It gives an idea about how
much the price can change per day.

100 ( CP iCP i1 )
C h pi =
C h rms =
CPi1

C h p2i
n

Here CPi is closing price of ith day. Then percentage error has been found for a particular
day by formula

e i=100

CPi PP i
CPi 1

Where CPi is actual closing price of the day and PPi is the predicted price of the day. Here
Chrms been calculated by using data of last 250 days.
Now we find the ratio of erms/ Chrms(say it normalized error)
e
e n= rms
C hrms
For the method to be significant,
0<

en

<1 . If

e n> 1

en

should be smaller than 1. Ideally we should have

, the method is worthless. Smaller the

e rms

, better the

method is .
V.

We have plotted calculated coefficients a,b,c,d,e,f with time. It is found that these
coefficients are more or less constant. But there are some points of time when these
coefficients acquire smaller magnitude. While at some other points of time, these
coefficients acquire larger magnitude. For further analysis, sum of square of coefficients
have been taken because some of these coefficients have negative value. And it has been
found that when coefficients have larger magnitude, our price prediction is more
accurate.

The whole calculation has been done on various stocks and indices in US and Indian stock
market.

Results and Discussion


First we analyze for nifty. It is frontline index for Indian stock exchange NSE. Nifty is based on
top 50 companies in stock exchange.

Nifty
Year
2015-2016
2014-2015
2013-2014
2012-2013
2011-2012

ERRO
CHANG Normalised
no of profitable no of unprofitable
R rms
E rms
error
days
days
0.965
0.919
1.050
119
130
1.040
1.035
1.005
138
112
0.999
0.941
1.062
110
138
1.202
1.017
1.181
117
117
1.190
1.195
0.995
124
115

Accumulated % Profit
40
30
20
10

Accumulated % Profit

0
-10
-20
-30

We see that normalized error is nearly 1. Its value very close to 1, indicates that we have very
small amount of predictability by this method. But even the very small amount of predictability
can give significant amount of profit. If we compare the number of profitable days and number
of unprofitable days out of 250 trading days across different years, these two are nearly same.
Only in year 2014-2015 number of profitable days was significantly larger than number of
unprofitable days. If we look at Accumulated Percentage Profit graph, Accumulated Percentage
Profit is not steadily increasing each year. Only in year 2011-12 and 2015-2016 we have
significantly positive result. In these two years accumulated profit increases.
Now we try to relate this with other statistical observation:- We can see in the graph that
coefficients of Multivariate Regression acquire smaller value(converge) or acquire larger
value(diverge).In the year 2015 it is maximum divergent(magnitudes of coefficients are large).
Profit is also maximum when in year 2015.When these coefficients acquire smaller values as in
2012-13 and 2013-14 and 2016 we have low level of accuracy in prediction.

2
1.5
1
b

0.5

c
d

-0.5
-1
-1.5

To analyze this more precisely, we have taken Sum of Square of Coefficients X 10 and
accumulated profit on the same graph. Sum of Square of Coefficients has been multiplied by 10
so that it can be easily put side by side on same graph with accumulated profit. We can see if sum
of coefficient square is high accumulated profit is on the rise. We can use a condition that if Sum
of Square of Coefficients X 10 is more than 25 then we can use this method for Nifty. When Sum
of Square of Coefficients X 10 is less than 25, it is not advisable to use this method of trading.
50
40
30
20
10
0
-10
-20
-30

Sum of Coefficient Square

accumulated profit

Similarly, we did the same kind of calculation for other stocks. First we choose the Indian PSU
(Public Sector Unit) ONGC. It has been chosen randomly
ONGC

year
2015-2016
2014-2015
2013-2014
2012-2013
2011-2012

ERRO
R rms
1.989
2.145
2.180
2.260
1.519

CHANGE
rms
1.842
1.974
2.140
2.135
1.469

ERROR rms/
CHANGE
rms
1.080
1.087
1.019
1.059
1.034

no of profitable
days
110
119
133
119
129

no of unprofitable
days
123
118
100
115
108

We see that normalized error is nearly 1. Its value very close to 1 indicates that we have very
small amount of predictability by this method. If we compare the number of profitable days and
number of unprofitable days out of 250 trading days across different years, these two are nearly
same. Only in year 2011-2012 and 2013-2014 number of profitable days was significantly larger
than number of unprofitable days.

Accumulated % Profit
60
50
40
30

Accumulated % Profit

20
10
0
-10
-20
-30

If we look at Accumulated Percentage Profit graph, Accumulated Percentage Profit is not


steadily increasing each year. Only in year 2011-12 and 2013-2014 we have significantly
positive result. In these two years accumulated profit increases.
Now we try to relate this with other statistical observation- We can see in the graph that
coefficients of Multivariate Regression acquire smaller value (converge) or acquire larger
value(diverge).In some year, it is maximum divergent(magnitudes of coefficients are large).
When these coefficients acquire smaller values, we have low level of accuracy in prediction.

1.5

1
b
c

0.5

d
e

-0.5

-1

60
50
40
30
20
10

Sum of Coefficient Square

accumulated profit

0
-10
-20
-30

To analyze this more precisely, we have taken Sum of Square of Coefficients X 10 and
accumulated profit on the same graph. Sum of Square of Coefficients has been multiplied by 10
so that it can be easily put side by side on same graph with accumulated profit. We can see if sum
of coefficient square is high accumulated profit is on the rise. We can use a condition that if Sum
of Square of Coefficients X 10 is more than 20 then we can use this method for Nifty. When Sum
of Square of Coefficients X 10 is less than 20, it is not advisable to use this method of trading.

Now Consider Indian Software Company TCS(Tata Consultancy Services):-

year
2015-2016
2014-2015
2013-2014
2012-2013
2011-2012

ERRO
R rms
1.393
1.295
1.733
1.596
1.793

CHANGE
rms
1.300
1.297
1.607
1.578
1.608

ERROR rms/
CHANGE rms

no of
profitable
days

1.072
0.998
1.079
1.012
1.115

109
133
122
125
120

no of
unprofitable
days
124
104
111
112
117

We see that normalized error is nearly 1. Its value very close to 1, indicates that we have very
small amount of predictability by this method. If we compare the number of profitable days and
number of unprofitable days out of 250 trading days across different years, these two are nearly
same. Only in year 2014-2015 number of profitable days was significantly larger than number of
unprofitable days.

Accumulated % Profit
30
20
10
0

Accumulated % Profit

-10
-20
-30
-40

If we look at Accumulated Percentage Profit graph, Accumulated Percentage Profit is not


steadily increasing each year. Only in year 2014-15 we have significantly positive result. In this
two year accumulated profit increases.
Now we try to relate this with other statistical observation:- We can see in the graph that
coefficients of Multivariate Regression acquire smaller value(converge) or acquire larger
value(diverge). Value of coefficients is very small. When these coefficients acquire smaller
values, we have low level of accuracy in prediction.

1.5

1
b
c

0.5

d
e

-0.5

-1

30
20
10
0
Sum of Coefficient Square

accumulated profit

-10
-20
-30
-40

To analyze this more precisely, we have taken Sum Of Square Of Coefficients X 10 and
accumulated profit on the same graph. Sum Of Square Of Coefficients has been multiplied by 10
so that it can be easily put side by side on same graph with accumulated profit. We can see if sum

of coefficient square has value less than 20 throughout. Predictability is very low for this
company. This method is not advisable for trading on this company.
Now we consider Nasdaq Composite. NASDAQ Composite is a stock market index of
the common stocks and securities listed on the NASDAQ stock market, United States.

year

2015-2016
2014-2015
2013-2014
2012-2013
2011-2012

ERR
OR
rms
1.09
9
1.16
3
0.87
3
0.89
2
1.20
0

CHANGE
rms

ERROR
rms/
CHANGE
rms

no of
profitable
days

no of
unprofitable
days

1.060

1.037

127

122

1.056

1.101

112

138

0.827

1.055

122

128

0.835

1.068

113

137

1.159

1.035

122

128

We see that normalized error is nearly 1. Its value very close to 1, indicates that we have very
small amount of predictability by this method. If we compare the number of profitable days and
number of unprofitable days out of 250 trading days across different years, these two are nearly
same. Actually it is opposite to our prediction, number of unprofitable days are more than
profitable days most of the year.

Accumulated % Profit
30
20
10
0
-10
-20
-30
-40

Accumulated % Profit

Instead of profit we can see losses. So this method not to be used here for Nasdaq Composite. We
can also see the coefficient b,c,d,e are very small in magnitude throughout.

1.5

1
b
0.5

c
d
e

-0.5

-1

To analyze this more precisely, we have taken Sum Of Square Of Coefficients X 10 and
accumulated profit on the same graph. We can see if sum of coefficient square has value less than
20 throughout. Predictability is very low for this company. This method is not advisable for
trading on this index.

30
20
10
0
Sum of Coefficient Square

accumulated profit

-10
-20
-30
-40

Conclusion
We tried to give a method of trading for different stocks and indices. The method used
Multivariate regression for prediction of tomorrows price. Although predictability is very small,
in some case it becomes significant. If the coefficients of regression acquire large value of
magnitude, the prediction becomes more accurate. If sum of squares of coefficients become
greater than a threshold value(approximately greater than 2 ), our prediction becomes useful.
Since we have considered 10 X sum of square of coefficients for analysis, its threshold value
should be approximately 20-22. For some stocks/indices this condition is satisfied, while for
some others it is not satisfied. And the condition is satisfied during a particular time span only.
Therefore, while using this method of trading these basic criteria should be satisfied, and trading
should be done on selected stocks. If basic criteria are fulfilled for a stock, huge profit can be
generated by this method of trading. Results also indicate that there is very little scope for time
series analysis for the next day stock market price prediction. But predictability is not zero. There
is small amount of scope existing for some selected stocks and indices.

Reference:[1] CREATIVE MATH. 12 (2003), 103 110 Forecasting methods and stock market analysis Virginica
Rusu and Cristian Rusu

[2] How effective are Neural Networks at Forecasting and Prediction?A Review and Evaluation
MONICA ADYA AND FRED COLLOPY
[3] Genetic algorithms approach to feature discretization in articial neural networks for the prediction of
stock price index Kyoung-jae Kim and Ingoo Han
[4] Predicting Excess Stock Returns Out of Sample: Can Anything Beat the Historical
Average?
John Y. Campbell and Samuel B Thompson
[5]Random Walks in Stock Market Prices by Eugene F. Fama
[6] www.Wikipedia.com
[7] www.Investopedia.com
[8] Price Prediction of Share Market using Artificial Neural Network (ANN) by Zabir Haider Khan &
Tasnim Sharmin Alin & Md. Akter Hussain
[9] STOCK PRICE FORECASTING: AUTOREGRESSIVE MODELLING AND FUZZY NEURAL
NETWOK by Duan Marek , Department of Macro and Micro Economics, University of ilina, Slovak
Republic

[10] Prediction of Stock Price using Autoregressive Integrated Moving Average Filter ((Arima
(P,D,Q)) By Olayiwola Olaniyi Mathew, Apantaku Fadeke Sola, Bisira Hammed Oladiran &
dewara Adedayo Amos
[11] Time Series Analysis of Stock Prices Using the Box-Jenkins Approach by Shakira Green,
Georgia Southern University
[12] BoxJenkins Modeling of Greek Stock Prices Data by Chaido Dritsaki
[13] Comparison of ARIMA and Artificial Neural Networks Models for stock Price Prediction by
Ayodele Ariyo Adebiyi, Aderemi Oluyinka Adewumi, and Charles Korede Ayo

[14] Box-Jenkins Modelling of Nigerian Stock Prices Data by Ette Harrison Etuk, Bartholomew
chendu, Ephraim Okon Udo
Appendix:-

You might also like