Stock Market Data Analysis Using Rescaled Range

24
Stock Market Data Analysis Using Rescaled Range (R/S) Analysis Method Jason Gruber Research Advisor: Soundararajan Ezekiel Computer Science Department Indiana University of Pennsylvania

Transcript of Stock Market Data Analysis Using Rescaled Range

Page 1: Stock  Market  Data  Analysis  Using  Rescaled  Range

Stock Market Data Analysis Using Rescaled Range (R/S) Analysis Method Jason Gruber

Research Advisor: Soundararajan EzekielComputer Science DepartmentIndiana University of Pennsylvania

Page 2: Stock  Market  Data  Analysis  Using  Rescaled  Range

Thanks to:

Professor James Wolfe, Chairman of Computer Science Department at IUP

My research group, especially Matt Selnekovic, Gary Greenwood

Research Group Advisor Dr. Soundararajan Ezekiel

Page 3: Stock  Market  Data  Analysis  Using  Rescaled  Range

Introduction Methods for accessing the fractal characteristics are useful

for non-stationary signals such as stock market data. These signals which vary apparently irregularly have been considered to be driven by external parameters. Standard methods such as Fourier analysis assume that the signals are stationary in temporal windows. Such an assumption is inappropriate for stock market data as it changes constantly.

Fractal based methods such as relative dispersional methods and rescaled range analysis methods do not impose this assumption and therefore are better suited for this analysis. In this paper, we use rescaled range analysis to analyze stock market data which gives statistical insight.

Page 4: Stock  Market  Data  Analysis  Using  Rescaled  Range

Introduction Cont.

In 1951, Hurst defined a method to study natural phenomena such as the flow of the Nile River. This method was based on the statistical assessment of many observations of the natural phenomena. After studying 800 years of records, Hurst observed that the flow of the Nile River was not random, but patterned. He defined a constant, K, which measures the bias of the fractional Brownian motion.

In 1968 Mandelbrot defined this pattern as fractal. There are many algorithms to calculate fractal characteristics such as fractal dimensions, which is a number that quantitatively describes how an object fills its space. He renamed the constant K to H in honor of Hurst. The fractal dimension, D, can be derived from the Hurst exponent, H, by the relation D = 2 – H. The Hurst exponent gives a measure of the smoothness of a fractal object where H varies between 0 and 1.

Page 5: Stock  Market  Data  Analysis  Using  Rescaled  Range

low H values indicate high levels of roughness, meaning the signal almost fills the next higher dimension. High value of H indicate high levels of smoothness, meaning the signal fills very little of the next higher dimension.

We use H and D to analyze our stock market data as it has a broad applicability to signal processing due to its robustness. These parameters can be calculated by the rescaled range analysis method.

It is useful to distinguish between random and nonrandom data points. If H equals 0.5, then the data is determined to be random. If the H value is less than 0.5, it represents anti-persistence, meaning, if the signal is up/down in the last period then more likely it will go down/up in the next period. If the H value varies between 0.5 and 1, this represents persistence, where, if the signal is up/down in the last period, then most likely in the next period the signal will continue going up/down.

Introduction Cont.

Page 6: Stock  Market  Data  Analysis  Using  Rescaled  Range

Methodology

Step1 Start with the whole observed data set that

covers a total duration and calculate its mean over the whole of the available data

Page 7: Stock  Market  Data  Analysis  Using  Rescaled  Range

step 2

Sum the differences from the mean to get the cumulative total at each time point, V(N,k), from the beginning of the period up to any time

Page 8: Stock  Market  Data  Analysis  Using  Rescaled  Range

step 3

Find the Vmax the maximum of V(N,k), Vmin

the minimum of V(n,k) for 0<k<N and calculate the range

Page 9: Stock  Market  Data  Analysis  Using  Rescaled  Range

step 4

Calculate the standard deviation , S, of the values , F(ti) of the observation over the period , during which the local mean is

step 5

Page 10: Stock  Market  Data  Analysis  Using  Rescaled  Range

step 6 For next stage, N will cover a fraction of all the

values in the data set, typically 1/2 for N= N/2. then repeat the entire procedure , step 1-5 and determined R/S for each segment of the data set, then take averaged R/S value. Repeat, using successively shorter at each stage dividing the data set into non-overlapping segments and finding the mean R/S of these segments.

step7

Plot log-log plot that is fit Linear Regression Y on X where Y=log R/S and X=log n where the exponent H is the slope of the regression line.

Page 11: Stock  Market  Data  Analysis  Using  Rescaled  Range

Sample (HRV) Signal

Page 12: Stock  Market  Data  Analysis  Using  Rescaled  Range

Log-Log Plot

Page 13: Stock  Market  Data  Analysis  Using  Rescaled  Range

Result Hurst exponent (Slope) =0.3586

Fractal Dimension = 1.6414

From RD: H=0.3723 and FD = 1.6277.

From R/S: H =0.3586 and FD 1.6414 Difference:

H difference : 0.3723-0.3586 = 0.0137= 1.37% FD difference : 1.6414-1.6277 = 0.0137 =1.37%

Comparison

Page 14: Stock  Market  Data  Analysis  Using  Rescaled  Range

Comparison Cont.

The fractal dimension FD of the signal, and the Hurst parameter H which quantify the degree of correlation, can be determined from each of these methods of analysis

Page 15: Stock  Market  Data  Analysis  Using  Rescaled  Range

Testing Our Method To illustrate our proposed method, we

applied it to 48 sets of daily closing prices of various stocks listed from the New York Stock Exchange and the NASDAQ from January 25, 1988 to January 24, 2003. We then calculated the H value for each and found the maximum H value as 0.5928, and a minimum value of 0.4257.

Page 16: Stock  Market  Data  Analysis  Using  Rescaled  Range

GD - 0.5928

Page 17: Stock  Market  Data  Analysis  Using  Rescaled  Range

XOM - 0.4527

Page 18: Stock  Market  Data  Analysis  Using  Rescaled  Range

IBM - 0.5626

Page 19: Stock  Market  Data  Analysis  Using  Rescaled  Range

HPQ - 0.5559

Page 20: Stock  Market  Data  Analysis  Using  Rescaled  Range

KFT - 0.4735

Page 21: Stock  Market  Data  Analysis  Using  Rescaled  Range

MMM - 0.4445

Page 22: Stock  Market  Data  Analysis  Using  Rescaled  Range

MSFT - 0.5395

Page 23: Stock  Market  Data  Analysis  Using  Rescaled  Range

MCD - 0.4999

Page 24: Stock  Market  Data  Analysis  Using  Rescaled  Range

Conclusion

Further we observed that all these values are differ from 0.5, showing the stock market to be clearly fractal. We can also measure how jagged the signal is by using the parameter H. Low H values represent higher noise, more random-like, or volatile data, thus representing a higher risk. A higher H value indicates lower noise levels and less randomness, representing a lower risk.

In our observation, GD had the highest H value, while XOM had the lowest H value. Therefore we would conclude GD less risky than XOM.

Future Work – Further experimental analysis still needs to be carried out

with different data sources, including international markets, bonds and mutual funds, commodities, and currency exchanges.