Professional Documents
Culture Documents
val fsRDD = sc.textFile("hdfs://spark- H3: Average trading volume during Yamaganda period is
server:5055/user/spark/NSE-DT/*/*.trd/part*") significantly different from that of Post-Yamaganda period
(i.e., Half an hour after Yamaganda).
val finalRDD = fsRDD.map { t =>
val s = t.split('|') A t-Test is done, to check if there is any significant
val (ds,id,st,ts,pr,vol) = difference between Yamaganda and other time periods.
(s(0),s(1),s(2),s(4).substring(0,5),s(5).toFloat,s(6).toFloat)
D. Data Sorting
((ds,ts,st),(id,pr,vol))
} The code used for segregating the data into Yamaganda,
val rRDD = finalRDD.reduceByKey{ (x,y) => Non-Yamaganda, Pre-Yamaganda, and Post-Yamaganda
periods are as follows: (The code is given only for Friday. number of companies with high trading volume during
Similarly, it can be done for other days). different time periods is shown in Fig 2.This data shows that
105 companies have high average traded volume during the
Sub yama() Yamaganda period, 23 companies during the Non-Yamaganda
Dim cel As Range, lop As Range Period, 24 companies during the Pre-Yamaganda period, and
Set lop = Range("B2:B100000") 36 companies during the Post-Yamaganda period.
For Each cel In lop
Table 2Paired t-Test: Yamaganda and Non-Yamaganda
If cel.Value = "FRIDAY" Then
If cel.Offset(0, 10).Value > 0.38541 And cel.Offset(0,
Non-
10).Value < 0.60416701 Then Yamaganda Yamaganda
cel.Offset(0, 7).Value = 2
Mean 5651.81 5035.36
ElseIf cel.Offset(0, 10).Value > 0.6048609 And
Variance 59117647.71 49226469.47
cel.Offset(0, 10).Value < 0.6251 Then
Observations 188 188
cel.Offset(0, 7).Value = 3
Pearson Correlation 0.967648084
ElseIf cel.Offset(0, 10).Value > 0.625693 And cel.Offset(0,
Hypothesized Mean
10).Value < 0.666668 Then Difference 0
cel.Offset(0, 7).Value = 1 Df 187
End If t Stat 4.256647
End If P(T<=t) one-tail 0.000016
Next
t Critical one-tail 1.653043
End Sub
P(T<=t) two-tail 0.000033
IV. ANALYSIS AND FINDINGS t Critical two-tail 1.972731
The results of the study are as follows. IBM SPSS statistics
23 is used to find the average trading volume. Table 3 Paired t-Test: Yamaganda and Pre-Yamaganda
Yamaganda Pre-Yamaganda
Average Traded Volume Mean 5651.81 4996.74
5800.00 5651.81 Variance 59117647.71 46966080.51
5600.00 Observations 188 188
5400.00 5035.36 5119.28 Pearson Correlation 0.963596557
5200.00 4996.74
5000.00 Hypothesized Mean
4800.00 Difference 0
4600.00 df 187
t Stat 4.217878
P(T<=t) one-tail 0.000019
t Critical one-tail 1.653043
P(T<=t) two-tail 0.000038
t Critical two-tail 1.972731
Figure 1. Mean of average traded volume Table 4Paired t-Test: Yamaganda and Post-Yamaganda
Figure 2 Companies with high trading Volume based on different periods The t-Test results for difference in average traded volume
between Yamaganda & Non-Yamaganda, Yamaganda & Pre-
Mean of average traded volumes is shown in Fig. 1.The Yamaganda, and Yamaganda & Post-Yamaganda period is
results shows that average volumes traded during the summarized in Table 2, 3, 4 respectively.Since P-value is less
Yamaganda period is higherthan all the other periods. The
than 0.05 for all cases, the null hypothesis is rejected at the the Non-Yamaganda Period, 0 companies during the Pre-
given confidence interval. Thus, average trading volume at Yamaganda period (Since there is no Pre-Yamaganda period
Yamaganda period is significantly different from average duringtrading hours of Tuesday),and 12 companies during the
trading volume at Non-Yamaganda, Pre-Yamaganda, and Post- Post-Yamaganda period.
Yamaganda periods. Table 5Paired t-Test: Yamaganda and Pre-Yamaganda (Only Tuesday)
The results suggest that the Yamaganda period in not an
influencing factor on investors trading behaviour. Non-
Yamaganda Yamaganda
Nath and Dalvi (2004) empirically tested the day of the Mean 6423.73 4814.66
week effect on Indian stock market and found that Fridays and Variance 93123369.33 45245573.48
Mondays are subjected to day of the week anomaly. Further,
Observations 188 188
Wednesday and Thursday do not have Yamaganda
Pearson Correlation 0.844390182
periodduring the trading hours. Also,during the period of our
Hypothesized Mean
study, trading on Saturday happened only on February 28,
Difference 0
2015. Hence we are eliminating all these days of the week and
df 187
considering only Tuesday to further validate our test result.
t Stat 4.114757
P(T<=t) one-tail 0.000029
Average Trading volume on t Critical one-tail 1.653043
P(T<=t) two-tail 0.000058
Tuesday t Critical two-tail 1.972731
7000.00 6423.73
6000.00 4814.66 Table 6 Paired t-Test: Yamaganda and Pre-Yamaganda (Only Tuesday)
5000.00 4031.85
4000.00
Post-
3000.00
2000.00 Yamaganda Yamaganda
1000.00 0.00 Mean 6423.73 4031.85
0.00 Variance 93123369.33 31447002.61
Observations 188 188
Pearson Correlation 0.85944083
Hypothesized Mean
Difference 0
df 187
t Stat 5.838480361
P(T<=t) one-tail 1.1454E-08
Figure 3 Mean Traded Volume (Only Tuesday) t Critical one-tail 1.653042889
P(T<=t) two-tail 2.2908E-08
t Critical two-tail 1.972731033
160 137
140
120 The t-Test results for difference in average trading volumes
100
80 between Yamaganda & Non-Yamaganda, and Yamaganda &
60 39
40 Post-Yamaganda period on Tuesday eliminating all the other
0 12
20 days is shown in Table 5, 6 respectively. Since P-value is less
0 than 0.05, null hypothesis is rejected. This signifies that on
Tuesday, average trading volume at Yamaganda period is
significantly different from average trading volume during
Non-Yamaganda and Post-Yamaganda period.
[3] Yuan, K., Zheng, L., & Zhu, Q. (2006). Are investors moonstruck?
Lunar phases and stock returns. Journal of Empirical Finance, 13(1), 1-
23.
[5] Nath, G. C., & Dalvi, M. (2004). Day of the week effect and market
efficiency-evidence from Indian equity market using high frequency
data of national stock exchange.
[7] Dichev, I. D., & Janes, T. D. (2003). Lunar cycle effects in stock
returns. The Journal of Private Equity, 6(4), 8-29.
[8] Chan, M. L., Khanthavit, A., & Thomas, H. (1996). Seasonality and
cultural influences on four Asian stock markets. Asia Pacific Journal of
Management, 13(2), 1-24.
[10] Ajayi, R. A., Mehdian, S., & Perry, M. J. (2004). The day-of-the-week
effect in stock returns: further evidence from Eastern European
emerging markets. Emerging Markets Finance and Trade, 40(4), 53-62.