Sie sind auf Seite 1von 7

1

STATISTICAL ANALYSIS FOR DAILY FORECAST


OF STOCK PRICES
Vandana Gariney, Electrical And Computer Engineering, Portland State University
E-mail: vandana@ece.pdx.edu
ECE 557: Learning From Data, Winter 2002.
Instructor: James McNames

Abstract-- Forecasting is a necessity of human life and a


common problem in all branches of learning. Financial and
economic problems are domains in which forecasting is of major
importance. The basic goal of market participants is to predict
the future trends of stock price and determine the best time to
execute transactions in order to optimize investment decisions.
This paper proposes a model to forecast the daily financial stock
price of a company taking into account the leading indicator such
as closing stock price. In this project the stock price of Intel along
with its customers and competitors for the year 2000 is
considered, and the increase, decrease or no-change pattern is
examined. The Binomial upper tailed test is applied at a
significance level of 0.01 and the results are analyzed. The true
and predicted performance of Intel is examined at different
threshold levels for the year 2000 and is optimized to forecast the
daily stock price for the year 2001. The rate of sensitivity
examined for the year 2001 at the optimum threshold levels tends
to be too low to be useful. So there is no discernable statistical
significance between the closing stock price of the leading
indicator and Intels stock price on the next day. These results
are delivered in the form of tabular columns as well as time
series graphs.

Keywords-- Threshold Level, Significance Level, Customer,


Competitor, Closing Stock Price, False Positive, False Negative.
I. INTRODUCTION
Stock price forecasting is a real-world problem, which has
drawn plenty of attention in the recent years, partly because of
the great importance to economic theory and world economy
of stock behavior, and partly because of the possibility of
obtaining profits by trading stocks. Stock markets are affected
by many highly interrelated economic, social, political and
even psychological factors, and these factors interact with
each other in a very complicated manner. In this project I wish
to forecast Intels daily stock price when compared to its
customers and competitors stock price.
Intel is the third largest provider of communication
silicon, which offers world-class semiconductor design and
manufacturing expertise. Intel manufactures and develops
complex silicon devices to support the internet
transformations, personal computers and laptops producing
quality microprocessors and integrated chips. It also

manufactures servers, internet hubs, networking and


communication tools that link voice, data and the Internet. In
wireless technology, they are the leaders in flash memory for
cell phones. From the products Intel manufactures, companies
such as Dell, Compaq, Cisco, Hewlett Packard, IBM, Sony,
and Motorola can be listed as its customers; and companies
such as Texas Instruments, VIA Technologies, Advanced
Micro Devices, and Cypress can be listed as its competitors.
According to ref [1] Intels stock price depends not only on its
own growth and development but also has an impact of its
customer and competitors growth ref [2].
II. METHODOLOGY
The historical stock price of Intel, along with its
customers and competitors for the year 2000, was considered.
This historical stock price is considered since it provides us
different indices such as Days High stock price, Days Low
stock price, Opening stock price, Closing stock price, Trading
volume and so on which help us in finding out the increase,
decrease or no-change pattern of the stock price. There are
also other leading indicators such as unemployment rate ref
[3], consumer demand, terrorist attacks, retail sales ref [4],
consumer confidence, and price war with competitors ref [6],
which also help us in finding out the trend of the stock price.
The data was obtained from www.finance.yahoo.com.
I examined the increase, decrease or no-change pattern of
Intel, its customers and competitors at different threshold
levels in the range of 0 to 5, and with a step size of 0.05. Let
us assume that the threshold level considered be 2%. Let the
stock price of Intel on day one is X, and stock price on day
two is Y, then the threshold value was calculated as
T = (Y X) / X * 100,
If T >= 2, then the stock price was considered to be increased,
If T <= -2, then the stock price was considered to be
decreased, and If 2 < T < 2, then the stock was considered to
be having no-change.
Then I compared Intels pattern to each of its customers
and competitors pattern to find out the number of days Intels
stock price increased, decreased or had no-change with
respect to the company compared and the results are tabulated
in Table 1. and Table 2.

2
Table 1. Comparison of increase, decrease or no-change pattern of
Intel for the year 2000 at threshold level 1%

INTEL
DI D
D

Company

II

ID

IN

D
N

NI

N
D

N
N

AMD
Compaq
Cypress
Cisco
Dell
HP
IBM
Microsof
t
Motorola
SONY
SUN
TEXAS

44
54
49
37
47
44
27
32

45
23
48
51
49
38
48
45

18
28
23
19
20
21
23
22

40
21
35
40
34
35
41
32

40
48
47
32
38
39
30
31

21
15
20
23
20
20
14
13

13
22
14
20
16
18
29
34

20
33
9
21
18
27
27
28

10
7
6
18
9
9
12
14

53

47

24

29

43

17

16

14

38
26
50

43
33
43

23
18
24

33
37
37

33
34
41

13
14
16

28
34
12

27
38
19

13
17
9

INTEL
Table 2. Comparison of increase, decrease or no-change pattern of
Intel for the year 2000 at threshold level 2%
INTEL

Company

II

ID

IN

DI

D
D

D
N

NI

N
D

N
N

23 31 30 19 17
35
25 27
39
AMD
31 10 25 10 28
26
31 36
54
Compaq
28 29 36 20 29
38
24 16
31
Cypress
25 31 30 24 15
34
23 28
41
Cisco
32 18 27 17 17
33
23 30
34
Dell
25 26 29 19 25
28
28 23
48
HP
18
18
18
20
12
18
34
45
68
IBM
20
38 34
61
Microsof 21 22 24 14 17
t
23
23 29
43
Motorola 30 23 38 20 22
21 18 27 21 15
18
32 40
59
SONY
11 11 18 11 14
11
49 48
77
SUN
31 16 39 23 26
26
20 31
39
TEXAS
II No. Of Days Companys stock price increased and Intels
stock price increased the next day.
IDNo. Of Days Companys stock price increased and Intels
stock price decreased the next day.
INNo. Of Days Companys stock price increased and Intels
stock price had no-change the next day.
DINo. Of Days Companys stock price decreased and Intels
stock price increased the next day.
DDNo. Of Days Companys stock price decreased and
Intels stock price decreased the next day.
DNNo. Of Days Companys stock price decreased and
Intels stock price had no-change the next day.
NINo. Of Days Companys stock price had no-change and
Intels stock price increased the next day.
NDNo. Of Days Companys stock price had no-change and
Intels stock price decreased the next day.

NNNo. Of Days Companys stock price had no-change and


Intels stock price had no-change the next day.
Here the company may be Intels customer or its competitor.
III. TESTS
On the results obtained, I did the Binomial upper tailed
test at a threshold level of 1%, where the null hypothesis and
the alternate hypothesis when Intels customers are considered
is
H0: As stock price of Intels customer increases, Intels stock
price decreases or has no-change.
H1: As stock price of Intels customer increases, Intels stock
price increases.
I choose the significance level as 0.01,meaning that the
outcome of the test has one percent chance of not being true.
Significance level is the criterion used for rejecting the null
hypothesis. The advantage of choosing 0.01 as the
significance level is that the test is less likely to make a Type I
error. Type I error occurs when the null hypothesis is rejected
when it is in fact true; that is, H0 is wrongly rejected. The
percentage number of days Intels stock went up for the year
2000 is 38%. The p-value was examined at a significance
level of 0.01 and a threshold level of 1%, and the results are
tabulated in Table 3.
Table 3. Results of Binomial Upper Tailed test performed on Intels
customers at a significance level of 0.01 and Threshold level of 1%.
The percentage number of days Intels stock increased is 38%.

Customer

II

Number Of days
customer stock
price increased.

P-value

Compaq

54 (51.42%)

105

0.0035

Cisco

37 (34.57%)

107

0.7956

Dell

47 (40.51%)

116

0.3196

HP

44 (42.71%)

103

0.1876

IBM

27 (27.55%)

98

0.9887

Microsoft

32 (32.32%)

99

0.8985

Motorola

53 (42.74%)

124

0.1597

SONY

38 (36.53%)

104

0.6558

SUN

26 (33.76%)

77

0.8107

II No. Of Days Customers stock price increased and Intels


stock price increased the next day.
The outcome of this test is that I fail to reject the null
hypothesis at a significance level of 0.01 and a threshold level
of 1% since p-value is larger than the significance level
considered. The same test is applied at different threshold
levels and the p- values obtained are tabulated in Table 4.

4
Table 4. Results of Binomial Upper Tailed test performed on Intels
customers at a significance level of 0.01 and at different Threshold
levels.
P-value at Threshold Level
Company

1%

2%

3%

4%

5%

Compaq

0.0035

0.0027

0.0082

0.0018

Cisco

0.7956

0.6904

0.7465

0.8302

Dell

0.3196

0.1175

0.2025

0.6163

HP

0.1876

0.3731

0.4974

0.6978

IBM

0.9887

0.5306

0.1872

0.8341

Microsof
t
Motorola

0.8985

0.5034

0.8045

0.8963

0.1597

0.2520

0.5056

0.5700

SONY

0.6558

0.2286

0.6836

0.7496

SUN

0.8107

0.6552

0.5491

0.4689

0.003
3
0.261
9
0.491
3
0.471
5
0.329
3
0.625
8
0.303
4
0.460
4
0.008
1

The results show that except for Intels customer


Compaq, the p-value is larger than the significance level
considered at all threshold levels. The outcome of all the tests
except for that done on Compaq is that I fail to reject the null
hypothesis at a significance level of 0.01. As for Intels
customer Compaq, since the p-value is smaller than the
significance level considered at all threshold levels the
outcome of the tests is that I reject the null hypothesis.
When the same test was applied to its competitors then
the null hypothesis and the alternate hypothesis was
H0: As stock price of Intels competitors increases, Intels
stock price increases or has no change.
H1: As stock price of Intels competitors increases, Intels
stock price decreases.
The significance level I choose here is also 0.01, meaning that
the outcome of the test has one percent chance of not being
true. The percentage number of days Intels stock increased in
the year 2000 is 38%. Then I found out the p-value and the
results can be seen in Table 5.
Table 5. Results of Binomial Upper Tailed test performed on Intels
competitors at a significance level of 0.01 and Threshold level of 1%.
The percentage number of days Intels stock increased is 38%.

Competitors

II

Number Of days
P-value
competitors stock
price increased
0.4062
AMD
40 (39.60%)
101
0.7454
CYPRESS
35 (34.31%)
102
0.4310
TEXAS
37 (39.36%)
94
II No. Of Days Competitors stock price increased and
Intels stock price increased the next day.
The outcome of this test is that I fail to reject the null
hypothesis at a significance level of 0.01 and a threshold level

of 1% since the p-value is larger than the significance level


considered. The same test is applied at different threshold
levels and the p-values obtained are tabulated in Table 6.
Table 6. Results of Binomial Upper Tailed test performed on Intels
competitors at a significance level of 0.01 and at different threshold
levels.
P-value at Threshold Level
Company
AMD

1%
0.4062

2%

3%

0.6616

4%

0.7758

0.9651

5%
0.6590

Cypress

0.7454

0.9072

0.7328

0.8623

0.8583

TEXAS

0.4310

0.2719

0.1616

0.2225

0.2032

Then I found out the performance indices Sensitivity,


Specificity, False Positive, and False Negative of Intel with
respect to each of its customers and competitors at different
threshold levels. Performance indices are a group of numerical
indices that describe how well a test works. They are
independent of the size of the sample used to assess the test.
Sensitivity is the probability that a test statistic will be positive
for a positive statistic. Specificity is the probability that a test
statistic will be negative for a negative statistic. False Positive
is the probability that a test statistic will be positive for a
negative statistic and False Negative is the probability that a
test statistic will be negative for a positive statistic. The sum
of sensitivity and false negative is 100% and the sum
specificity and false positive is 100%. And the results are
tabulated in table 7.
Table 7. Performance of Intel when compared to Dell at different
threshold levels for the year 2000.
FP
FN
FP
Threshold Sensitivity Specificit
Level
y
+FN
0.00
0.50
1.00
1.50
2.00
2.50
3.00
3.50
4.00
4.50
5.00

60

61

71

59

50.4%

46.2%

53.8%

49.6%

55

70

72

54

50.4%

49.3%

50.7%

49.6%

47

85

69

50

48.5%

55.2%

44.8%

51.5%

39

101

64

47

45.3%

61.2%

38.8%

54.7%

34

114

60

43

44.1%

65.5%

34.5%

55.9%

25

133

51

42

37.3%

72.2%

27.8%

62.7%

19

143

49

40

32.2%

74.4%

25.6%

67.8%

13
26.5%
6

161
79.7%
175

41

36

20.3%

73.5%

39

31

16.2%

81.8%

18.2%

83.8%

4
12.9%
3

189
85.9%
200

31

27

14.1%

87.1%

26

22

12.0%

88.5%

11.5%

88.0%

130
126
119
111
103
93
89
77
70
58
48

From the above results a graph is drawn with the


threshold level on x-axis and the rate of FP + FN on the y-axis
to obtain an optimum threshold level. At the optimum
threshold level, the rate of FP and the rate of FN are low.

5
Since the sum of sensitivity and false negative is a 100% and
the sum of specificity and false positive is a 100%, a low rate
of FN will result in a high rate of sensitivity, and a low rate of
FP will result in a high rate of specificity. The graph is
obtained as shown in Fig. 1

Fig. 3. Performance of Intel when compared to Texas Instruments at


different threshold levels, to obtain the optimum threshold level.

Fig. 1.Performance of Intel when compared to Dell at different


threshold levels, to obtain the optimum threshold level.

In the same way the graphs for other companies are


also obtained as shown in Fig. 2, and Fig 3.

From the above graphs it can be seen that the threshold


level is limited to 5% because if it is increased beyond 5% the
rate of sensitivity obtained at the optimum threshold level
tends to be too low to be useful.
The optimum threshold levels obtained from these graphs
are tabulated in Table 8.
Table 8. Optimum Threshold levels obtained for Intel when
compared to each company for the year 2000.

Company
AMD
COMPAQ
CYPRESS
CISCO
DELL
HP
IBM
MICROSOFT
MOTOROLA
SONY
SUN
TEXAS
Fig. 2. Performance of Intel when compared to Advanced Micro
Devices at different threshold levels, to obtain the optimum threshold
level.

Optimum Threshold Level


5.00
5.00
5.00
4.95
4.95
4.90
4.95
5.00
4.95
4.90
5.00
4.95
IV. RESULTS

These optimum threshold levels obtained from the graphs


are used to find the increase, decrease or no-change pattern of
Intel when compared to each company for the year 2001 and
the results can be seen in Table 9.

6
Table 9. Comparison of increase, decrease and no-change pattern
of Intel for the year 2001 at optimum threshold levels.

AMD
Compaq
Cypress
Cisco
Dell
HP
IBM
Microsoft
Motorola
SONY
SUN
TEXAS

II

ID

IN

DI

DD

DN

NI

ND

NN

2
1
2
4
3
2
0
3
3
0
0
4

4
1
1
3
5
1
0
0
1
0
1
1

34
16
30
38
16
13
4
4
20
9
3
34

19
10
20
24
17
19
20
14
20
21
11
23

2
2
2
4
1
3
2
2
1
3
1
5

27
17
24
20
24
10
3
6
21
7
1
22

19
20
19
16
20
19
23
19
20
22
23
15

9
12
12
13
13
16
19
18
18
19
18
15

143
171
150
144
162
178
195
194
161
186
200
146

From the above data the performance indices for the year
2001 at the optimal threshold level is found out and tabulated
in Table 10. The number of days considered are 247 that are
the total number of days the stock price was quoted in the year
2001.
Table 10. Performance of Intel when compared to its customers and
competitors at optimum threshold levels for the year 2001.
Company
Threshold Sensitivit
Specificit
FP
FN
Level
y
y
AMD

5.00

Compaq

5.00

Cypress
Cisco
Dell
HP
IBM
Microsof
t
Motorola
SONY
SUN
TEXAS

5.00
4.95
4.95
4.90
4.95
5.00
4.95
4.90
5.00
4.95

186

38

21

8.7%

83.0%

17.0%

91.3%

207

17

22

4.3%

92.4%

7.6%

95.7%

193

31

21

8.7%

86.1%

13.9%

91.3%

182

41

20

16.6%

81.6%

18.4%

83.4%

202

21

21

12.5%

90.5%

9.5%

87.6%

208

15

22

8.3%

93.2%

6.8%

91.7%

218

25

0.0%

98.1%

1.9%

100%

219

21

12.5%

98.2%

1.8%

87.6%

203

21

20

13.0%

90.6%

9.6%

87.0%

213

25

0.0%

95.9%

4.1%

100%

219

24

0.0%

98.2%

1.8%

100%

188

35

20

16.6%

82.9%

17.1%

83.4%

The values obtained above can be compared to the values


obtained at the optimum threshold levels for the year 2000
tabulated in Table 11. Here the number of days considered are
251 that are the total number of days the stock price was
quoted in the year 2000.

Table 11. Performance of Intel when compared to its customers and


competitors at optimum threshold levels for the year 2000
Company
Sensitivit
Specificit
FP
FN
Threshol
y
y
d
Level
AMD
5.00
4
188
39
20
Compaq
Cypress
Cisco
Dell
HP
IBM
Microsoft
Motorola
SONY
SUN
TEXAS

5.00
5.00
4.95
4.95
4.90
4.95
5.00
4.95
4.90
5.00
4.95

16.6%

82.8%

17.2%

205

21

83.4%

17

32.0%

90.7%

9.3%

68%

182

19

63

8.7%

90.5%

9.5%

91.3%

201

25

21

16.0%

88.9%

11.1%

84.0%

200

26

22

12.0%

88.5%

11.5%

88.0%

199

26

23

11.5%

88.4%

11.6%

88.5%

214

12

24

4.0%

94.7%

5.3%

96.0%

204

22

24

4.0%

90.2%

8.8%

96.0%

199

27

21

16.0%

88.0%

12.0%

84.0%

209

15

25

7.4%

93.3%

6.7%

92.6%

226

23

4.1%

99.5%

0.5%

95.9%

197

29

20

23.0%

87.1%

12.9%

77.0%

The results in Tables 10. and 11. show that there is no


fundamental difference between the years 2000 and 2001
since the rate of sensitivity is low in both the cases.
V. DISCUSSION
Tables 1. and 2. give the number of days Intels closing
stock price increases, decreases or has no-change when
compared to its customer and competitors closing stock price.
There is no discernable relationship between the closing stock
price of the leading indicator and Intels stock price on the
next day.
The binomial upper tailed test was applied on the data
shown in Table 3. for Intels customers. The results in Table
4. show that all the tests except for Intels customer Compaq
resulted in a failure to reject the null hypothesis at a
significance level 0.01 and at all threshold levels. As for
Intels customer Compaq, since the p-value is smaller than the
significance level considered at all threshold levels the
outcome of the tests is that I reject the null hypothesis.
Similarly Tables 5. and 6. show the results for Intels
competitors as a failure to reject the null hypothesis at the
significance level of 0.01 and at all threshold levels.
Table 7. gives the rate of sensitivity, specificity, false
positives and false negatives when compared to Dell at
different threshold levels for the year 2000. The results show
that at lower threshold levels the rate of sensitivity and
specificity are approximately 50%. As the threshold level is
increased the specificity increases, but the rate of sensitivity
decreases.

7
The figures show that as the threshold level is increased the
rate of FP+FN decreases. The threshold level was limited to
5% because if it is increased beyond 5% the rate of sensitivity
is too low to be useful. Hence the optimum threshold level is
not in the range of values considered.
The results in Table 10. show the rate of sensitivity,
specificity, false positives and false negatives of Intel at the
optimal threshold levels for the year 2001. Table 11. shows
these results for the year 2000. None of the leading indicators
had an acceptable rate of sensitivity and specificity to be
useful.
VI. CONCLUSION
A better strategy might compare multiple companies
together rather than comparing each company individually.
Comparing Intel at one threshold level and its customers and
competitors at another threshold level might also improve the
reliability.
The strategy studied is not a viable one. Although the
specificity is quite good, the sensitivity is very low. Hence,
statistical analysis using hypothesis testing cannot be used to
predict Intels daily stock price with respect to its customers
and competitors using the closing stock price from the
previous day as the leading indicator.
VII. ACKNOWLEDGEMENT
I, Vandana Gariney take this opportunity to thank Prof.
James McNames for providing me with the opportunity to
work on this project and for supporting me through out with
his valuable suggestions and comments. Words fail to express
my indebtedness to him for his moral support as I completed
the project.
VIII. REFERENCES
[1] Article in CNN.com, Review: Dell tops list of best 15
notebook PCs, Dec 3, 2001.
[2] Article in CBS MarketWatch HP marches PC stocks
higher, Feb 18, 2002.
[3] Article in CNN.com, Europe ends lower, DEC 7, 2002.
[4] Article in CNN.com Wall St. holds back, Jan 10, 2002.
[5] Mark J. Kiemele, Stephen R. Schmidt, Ronald J. Berdine,
Basic Statistics Tools for Continuous improvement
Fourth edition.
[6] Richard Johnson, Gouri Bhattacharyya, Statistics
Principles and Methods
[7] Andreas S. Weigend, Neil A. Gershenfeld, Time Series
Prediction: Forecasting the Future and Understandig the Past
Vol. XV.

Das könnte Ihnen auch gefallen