Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

Post Mid Term assignment 1

Testing Radom Walk


Name- Andhare Sanket Sanjay
Roll No- MBA21191

Company 1 – Infosys – IT Sector


R code
Run Test

Since the p value is greater than 0.05, therefore we accept NULL hypothesis and say that the stock
prices of INFOSYS follow randomness.

Autocorrelation Test up to lag 5


ACF

From ACF test (considering lag up to 5) we can conclude that there’s a correlation between the
residuals of stock prices of INFOSYS having a lag of 1 and lag 2
PACF

Form PACF test we can confirm that there is correlation between the residuals having a lag of 1.

Box Test
Since all the p-values, with lags of 1-5, have value of less than 0.05, we reject the null hypothesis
and conclude that the there is a correlation between the residuals of the stock prices of INFOSYS.

Variance Ratio Test for k = 2, 5, 10

Since all the values of M2 are less than 1.96, we can conclude that stock prices of INFOSYS follow
random pattern.

Using above 3 tests we can conclude that stock prices of INFOSYS follow Random Walk.
Company 2 – SBI

R code
Run Test

Since the p value is more than 0.05, therefore we accept NULL hypothesis and say that the stock
prices of SBI follow randomness.

Autocorrelation Test up to lag 5


ACF
From ACF test (considering lag up to 5) we can conclude that there’s a correlation between the
residuals of stock prices of SBI having a lag of 5.

PACF
Form PACF test we can confirm that there is correlation between the residuals having a lag of 5.

Box Test
Since all the p-values, with lags of 1-4, have value greater than 0.05, we accept the null hypothesis
and conclude that the there is no correlation between the residuals of the stock prices of SBI.

The p-value, with lag of 5, have value of less than 0.05, we reject the null hypothesis and conclude
that the there is correlation between the residuals of the stock prices of SBI.

Variance Ratio Test for k = 2, 5, 10


Since all the values of M2 are less than 1.96, we can conclude that stock prices of SBI follow
random pattern.

Using above 3 tests we can conclude that stock prices of SBI follow Random Walk.

Company 3 – DLF
Run Test-

data: as.vector(ret)

statistic = 1.4023, runs = 641, n1 = 648, n2 = 586, n = 1234, p-value = 0.1608

alternative hypothesis: nonrandomness

Here the p-value is 0.1608>0.05 hence, we accept the null hypothesis which means the prices are
random.

AutoCorrelation Test-

PACF
Form PACF test we can confirm that there is correlation between the residuals having a lag of 1.

Variance Ratio Test

Since all the values of M2 are less than 1.96, we can conclude that stock prices of DLF follow random
pattern.

Using above 3 tests we can conclude that stock prices of DLF follow Random Walk.

Company 4 – Dabur
Price

Returns over the last 5 years


Run Test

statistic = 1.2883, runs = 646, n1 = 634, n2 = 611, n = 1245, p-value = 0.1976

Interpretation: p-value is greater than 0.05, Hence, we cannot reject null hypothesis and the
returns follow a random walk.

Autocorrelation Test lag 5

Box-Pierce test

X-squared = 3.2619, df = 5, p-value = 0.6597

Interpretation: p-value of Auto correlation test is greater than 0.05. Hence, we cannot reject
the null hypothesis and the returns follow a random walk.

Variance Ratio test for k = 2,5,10

For M2, Z-value is less than 1.96 for all k values, thus p-value is greater than 0.05. Thus, we
cannot reject null hypothesis and returns follow a random walk
Company 5 – Dr Reddy’s Lab

Price

Returns over the last 5 years

Runs Test

statistic = -0.27972, runs = 621, n1 = 619, n2 = 631, n = 1250, p-value = 0.7797

Interpretation: p-value is greater than 0.05, Hence, we cannot reject null hypothesis and the
returns follow a random walk.

Autocorrelation Test lag 5

Box-Pierce test

X-squared = 3.9076, df = 5, p-value = 0.5628


Interpretation: p-value of Auto correlation test is greater than 0.05. Hence, we cannot reject
the null hypothesis and the returns follow a random walk.

Variance Ratio test for k = 2,5,10

For M2, Z-value is less than 1.96 for all k values, thus p-value is greater than 0.05. Thus, we
cannot reject null hypothesis and returns follow a random walk

You might also like