0% found this document useful (0 votes)
39 views17 pages

Closing Stock Prices

This document contains stock price data for four companies (IBM, INTC, CSCO, GE) from September 3, 2010 to October 1, 2010. It includes the daily closing stock prices for each company over this time period. It also shows forecasting data for IBM using a 2 period moving average model and exponential smoothing with alpha=0.3, including the forecast values, errors, mean absolute deviation (MAD) and other error metrics for each method.

Uploaded by

Hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views17 pages

Closing Stock Prices

This document contains stock price data for four companies (IBM, INTC, CSCO, GE) from September 3, 2010 to October 1, 2010. It includes the daily closing stock prices for each company over this time period. It also shows forecasting data for IBM using a 2 period moving average model and exponential smoothing with alpha=0.3, including the forecast values, errors, mean absolute deviation (MAD) and other error metrics for each method.

Uploaded by

Hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Problem # 9.

Closing Stock Prices

Date(t) Date IBM INTC CSCO GE


1 9/3/2010 $127.58 $18.43 $21.04 $15.39
2 9/7/2010 $125.95 $18.12 $20.58 $15.44
3 9/8/2010 $126.08 $17.90 $20.64 $15.70
4 9/9/2010 $126.36 $18.00 $20.61 $15.91
5 9/10/2010 $127.99 $17.97 $20.62 $15.98
6 9/13/2010 $129.61 $18.56 $21.26 $16.25
7 9/14/2010 $128.85 $18.74 $21.45 $16.16
8 9/15/2010 $129.43 $18.72 $21.59 $16.34
9 9/16/2010 $129.67 $18.97 $21.93 $16.23
10 9/17/2010 $130.19 $18.81 $21.86 $16.29
11 9/20/2010 $131.79 $18.93 $21.75 $16.55
12 9/21/2010 $131.98 $19.14 $21.64 $16.52
13 9/22/2010 $132.57 $19.01 $21.67 $16.50
14 9/23/2010 $131.67 $18.98 $21.53 $16.14
15 9/24/2010 $134.11 $19.42 $22.09 $16.66
16 9/27/2010 $134.65 $19.24 $22.11 $16.43
17 9/28/2010 $134.89 $19.51 $21.86 $16.44
18 9/29/2010 $135.48 $19.24 $21.87 $16.36
19 9/30/2010 $134.14 $19.20 $21.90 $16.25
20 10/1/2010 $135.64 $19.32 $21.91 $16.36
DJ Industrials
Index
10447.93
10340.69
10387.01
10415.24
10462.77
10544.13
10526.49
10572.73
10594.83
10607.85
10753.62
10761.03
10739.31
10662.42
10860.26
10812.04
10858.14
10835.28
10788.05
10829.68
Problem # 9
Spreadsheet for Forecasting Data for the IBM
2 Period MA Forecasting Data
Date(t) Stock Price S(t) Forecast F(t) |Error|= Abs (S(t)- F(t))
1 $127.58
2 $125.95
3 $126.08 126.77 0.69
4 $126.36 126.02 0.34
5 $127.99 126.22 1.77
6 $129.61 127.18 2.44
7 $128.85 128.8 0.05
8 $129.43 129.23 0.2
9 $129.67 129.14 0.53
10 $130.19 129.55 0.64
11 $131.79 129.93 1.86
12 $131.98 130.99 0.99
13 $132.57 131.89 0.69
14 $131.67 132.28 0.6
15 $134.11 132.12 1.99
16 $134.65 132.89 1.76
17 $134.89 134.38 0.51
18 $135.48 134.77 0.71
19 $134.14 135.19 1.05
20 $135.64 134.81 0.83
Average 0.980555555555556
MAD
Note: A smoothing constant of 0.5 yield the better result because of the Value of MAD, MSE and MAP depends upon the a
Formulas
a) |Error| = Absolute Value (S(t) - f(t))
b) MAD = Average |Error|
c) MSE = Average |Error|^2
d) MAPE = Average |Error|/ (S(t)/100
e) 2 Period MA Forecast Formulas : Forecast for Period (t) = Average (Sales(t-1), Sales (t-2))
f) Exponential Forecast Formulas : Forecast for Period (t) = Forecase (t-1) +Alpha *(Sales(t-1) - Forecast (t-1))

References
Nicolas Vandeput (2019). Forecast KPIs: RMSE, MAE, MAPE & Bias. Towards Data Science
https://towardsdatascience.com/forecast-kpi-rmse-mae-mape-bias-cdc5703d242d

BYJUS (2022). Exponential Smoothing


https://byjus.com/maths/exponential-smoothing/
Exponential Smoothing with Alpha = 0.3
|Error|^2 (|Error|/S(t))*100 Forecast F(t) |Error|= Abs (S(t) -F(t)-F(t
127.58
127.58 1.63
0.47 0.54 127.09 1.01
0.12 0.27 126.79 0.43
3.13 1.38 126.66 1.33
5.93 1.88 127.06 2.55
0 0.04 127.82 1.03
0.04 0.15 128.13 1.3
0.28 0.41 128.52 1.15
0.41 0.49 128.87 1.32
3.46 1.41 129.26 2.53
0.98 0.75 130.02 1.96
0.47 0.52 130.61 1.96
0.37 0.46 131.2 0.47
3.96 1.48 131.34 2.77
3.1 1.31 132.17 2.48
0.26 0.38 132.91 1.98
0.5 0.52 133.51 1.97
1.09 0.78 134.1 0.04
0.69 0.61 134.11 1.53
1.40333333333333 0.743333333333334 129.7665 1.54947368421053
MSE MAPE MAD
E and MAP depends upon the absolute value of forecast and stock values.

) - Forecast (t-1))
|Error|^2 (|Error|/S(t))*100

2.66 1.29
1.02 0.8
0.18 0.34
1.77 1.04
6.51 1.97
1.05 0.8
1.69 1
1.32 0.89
1.75 1.02
6.39 1.92
3.84 1.48
3.85 1.48
0.22 0.36
7.68 2.07
6.15 1.84
3.9 1.46
3.89 1.46
0 0.03
2.34 1.13
2.95842105263158 1.17789473684211
MSE MAP
Problem # 9
Spreadsheet for Forecasting Data for the INTC
2 Period MA Forecasting Data
Date(t) Stock Price S(t) Forecast F(t) |Error|= Abs (S(t)- F(t))
1 $18.43
2 $18.12
3 $17.90 18.28 0.38
4 $18.00 18.01 0.01
5 $17.97 17.95 0.02
6 $18.56 17.99 0.57
7 $18.74 18.27 0.47
8 $18.72 18.65 0.07
9 $18.97 18.73 0.24
10 $18.81 18.85 0.04
11 $18.93 18.89 0.04
12 $19.14 18.87 0.27
13 $19.01 19.04 0.02
14 $18.98 19.08 0.1
15 $19.42 19 0.43
16 $19.24 19.2 0.04
17 $19.51 19.33 0.18
18 $19.24 19.38 0.14
19 $19.20 19.38 0.18
20 $19.32 0.1
0.183333333333333
Note: A smoothing constant of 0.5 yield the better result because of the Value of MAD, MSE and MAP depends upon the a
Formulas
a) |Error| = Absolute Value (S(t) - f(t))
b) MAD = Average |Error|
c) MSE = Average |Error|^2
d) MAPE = Average |Error|/ (S(t)/100
e) 2 Period MA Forecast Formulas : Forecast for Period (t) = Average (Sales(t-1), Sales (t-2))
f) Exponential Forecast Formulas : Forecast for Period (t) = Forecase (t-1) +Alpha *(Sales(t-1) - Forecast (t-1))
References

Nicolas Vandeput (2019). Forecast KPIs: RMSE, MAE, MAPE & Bias. Towards Data Science
https://towardsdatascience.com/forecast-kpi-rmse-mae-mape-bias-cdc5703d242d

BYJUS (2022). Exponential Smoothing


https://byjus.com/maths/exponential-smoothing/
Exponential Smoothing with Alpha = 0.3
|Error|^2 (|Error|/S(t))*100 Forecast F(t) |Error|= Abs (S(t) -F(t)-F(t
18.43
18.43 0.31
0.14 2.09 18.34 0.44
0 0.06 18.21 0.21
0 0.11 18.14 0.17
0.33 3.1 18.09 0.47
0.23 2.53 18.23 0.51
0 0.37 18.38 0.34
0.06 1.27 18.49 0.48
0 0.19 18.63 0.18
0 0.21 18.68 0.25
0.07 1.41 18.76 0.38
0 0.13 18.87 0.14
0.01 0.5 18.91 0.07
0.18 2.19 18.93 0.49
0 0.21 19.08 0.16
0.03 0.92 19.13 0.38
0.02 0.7 19.24 0
0.03 0.91 19.24 0.04
0.01 0.52 19.23 0.09
0.0616666666666667 0.967777777777778 18.672 0.268947368421053
E and MAP depends upon the absolute value of forecast and stock values. MAD

) - Forecast (t-1))
|Error|^2 (|Error|/S(t))*100

0.1 1.71
0.19 2.44
0.04 1.14
0.03 0.97
0.22 2.52
0.26 2.71
0.11 1.79
0.23 2.56
0.03 0.95
0.06 1.3
0.15 2
0.02 0.72
0 0.35
0.24 2.5
0.03 0.83
0.15 1.96
0 0.01
0 0.22
0.01 0.47
0.0984210526315789 1.42894736842105
MSE MAP
Problem # 9
Spreadsheet for Forecasting Data for the CSCO
2 Period MA Forecasting Data
Date(t) Stock Price S(t) Forecast F(t) |Error|= Abs (S(t)- F(t))
1 $21.04
2 $20.58
3 $20.64 20.81 0.17
4 $20.61 20.61 0
5 $20.62 20.63 0
6 $21.26 20.62 0.65
7 $21.45 20.94 0.51
8 $21.59 21.36 0.23
9 $21.93 21.52 0.41
10 $21.86 21.76 0.1
11 $21.75 21.9 0.15
12 $21.64 21.81 0.16
13 $21.67 21.7 0.02
14 $21.53 21.66 0.13
15 $22.09 21.6 0.49
16 $22.11 21.81 0.3
17 $21.86 22.1 0.24
18 $21.87 21.99 0.11
19 $21.90 21.87 0.03
20 $21.91 21.89 0.03
0.207222222222222
MAD
Note: A smoothing constant of 0.5 yield the better result because of the Value of MAD, MSE and MAP depends upon the a
Formulas
a) |Error| = Absolute Value (S(t) - f(t))
b) MAD = Average |Error|
c) MSE = Average |Error|^2
d) MAPE = Average |Error|/ (S(t)/100
e) 2 Period MA Forecast Formulas : Forecast for Period (t) = Average (Sales(t-1), Sales (t-2))
f) Exponential Forecast Formulas : Forecast for Period (t) = Forecase (t-1) +Alpha *(Sales(t-1) - Forecast (t-1))

References
Nicolas Vandeput (2019). Forecast KPIs: RMSE, MAE, MAPE & Bias. Towards Data Science
https://towardsdatascience.com/forecast-kpi-rmse-mae-mape-bias-cdc5703d242d

BYJUS (2022). Exponential Smoothing


https://byjus.com/maths/exponential-smoothing/
Exponential Smoothing with Alpha = 0.3
|Error|^2 (|Error|/S(t))*100 Forecast F(t) |Error|= Abs (S(t) -F(t)-F(t
21.04
21.04 0.46
0.03 0.82 20.9 0.26
0 0 20.82 0.21
0 0.02 20.76 0.14
0.42 3.03 20.72 0.54
0.26 2.38 20.88 0.57
0.06 1.09 21.05 0.54
0.17 1.87 21.21 0.72
0.01 0.46 21.43 0.43
0.02 0.67 21.56 0.19
0.03 0.76 21.62 0.02
0 0.12 21.62 0.05
0.02 0.58 21.64 0.11
0.24 2.22 21.6 0.49
0.09 1.36 21.75 0.36
0.06 1.1 21.86 0
0.01 0.53 21.86 0.01
0 0.16 21.86 0.04
0 0.11 21.87 0.04
0.0788888888888889 0.96 21.3545 0.272631578947368
MSE MAPE MAD
E and MAP depends upon the absolute value of forecast and stock values.

) - Forecast (t-1))
|Error|^2 (|Error|/S(t))*100

0.21 2.24
0.07 1.27
0.05 1.04
0.02 0.68
0.29 2.55
0.32 2.66
0.29 2.5
0.51 3.27
0.19 1.98
0.04 0.88
0 0.11
0 0.22
0.01 0.5
0.24 2.2
0.13 1.63
0 0.01
0 0.05
0 0.17
0 0.17
0.124736842105263 1.27
MSE MAP
Problem # 9
Spreadsheet for Forecasting Data for the GE
2 Period MA Forecasting Data
Date(t) Stock Price S(t) Forecast F(t) |Error|= Abs (S(t)- F(t))
1 $15.39
2 $15.44
3 $15.70 15.42 0.29
4 $15.91 15.57 0.34
5 $15.98 15.81 0.18
6 $16.25 15.95 0.31
7 $16.16 16.12 0.04
8 $16.34 16.21 0.14
9 $16.23 16.25 0.02
10 $16.29 16.29 0
11 $16.55 16.26 0.29
12 $16.52 16.42 0.1
13 $16.50 16.54 0.04
14 $16.14 16.51 0.37
15 $16.66 16.32 0.34
16 $16.43 16.4 0.03
17 $16.44 16.55 0.11
18 $16.36 16.44 0.08
19 $16.25 16.4 0.15
20 $16.36 16.31 0.05
0.16
MAD
Note: A smoothing constant of 0.5 yield the better result because of the Value of MAD, MSE and MAP depends upon the a
Formulas
a) |Error| = Absolute Value (S(t) - f(t))
b) MAD = Average |Error|
c) MSE = Average |Error|^2
d) MAPE = Average |Error|/ (S(t)/100
e) 2 Period MA Forecast Formulas : Forecast for Period (t) = Average (Sales(t-1), Sales (t-2))
f) Exponential Forecast Formulas : Forecast for Period (t) = Forecase (t-1) +Alpha *(Sales(t-1) - Forecast (t-1))

References
Nicolas Vandeput (2019). Forecast KPIs: RMSE, MAE, MAPE & Bias. Towards Data Science
https://towardsdatascience.com/forecast-kpi-rmse-mae-mape-bias-cdc5703d242d

BYJUS (2022). Exponential Smoothing


https://byjus.com/maths/exponential-smoothing/
Exponential Smoothing with Alpha = 0.3
|Error|^2 (|Error|/S(t))*100 Forecast F(t) |Error|= Abs (S(t) -F(t)-F(t
15.39
15.39 0.05
0.08 1.82 15.41 0.29
0.12 2.14 15.49 0.42
0.03 1.1 15.62 0.36
0.09 1.88 15.73 0.52
0 0.28 15.88 0.28
0.02 0.83 15.97 0.37
0 0.12 16.08 0.15
0 0.03 16.12 0.17
0.08 1.75 16.17 0.38
0.01 0.61 16.29 0.23
0 0.21 16.36 0.14
0.14 2.29 16.4 0.26
0.12 2.04 16.32 0.34
0 0.18 16.42 0.01
0.01 0.64 16.43 0.01
0.01 0.46 16.43 0.07
0.02 0.92 16.41 0.16
0.04 0.34 16.36 0
0.0427777777777778 0.98 16.0335 0.221578947368421
MSE MAPE MAD
E and MAP depends upon the absolute value of forecast and stock values.

) - Forecast (t-1))
|Error|^2 (|Error|/S(t))*100

0 0.32
0.09 1.88
0.17 2.62
0.13 2.26
0.27 3.22
0.08 1.71
0.14 2.28
0.02 0.93
0.03 1.02
0.14 2.27
0.05 1.41
0.02 0.87
0.07 1.61
0.11 2.03
0 0.04
0 0.09
0 0.43
0.03 0.98
0 0.01
0.0710526315789474 1.36736842105263
MSE MAP
Problem 13.
Closing Stock Prices - Linear Regression

DJ Industrials
Index Period By taking the coefficient from the o
10447.93 1 Regression equation :
10340.69 2
10387.01 3 INDEX = 10335.38 + 28.60977 Perio
10415.24 4
10462.77 5 Hence for the next three-period, th
10544.13 6
10526.49 7 Period = 21
10572.73 8 INDEX = 10335.38 + 28.60977 Perio
10594.83 9 INDEX = 10335.38 + 28.60977*(21)
10607.85 10
10753.62 11 Period = 22
10761.03 12 INDEX = 10335.38 + 28.60977 Perio
10739.31 13 INDEX = 10335.38 + 28.60977*(22)
10662.42 14
10860.26 15 Period = 23
10812.04 16 INDEX = 10335.38 + 28.60977 Perio
10858.14 17 INDEX = 10335.38 + 28.60977*(23)
10835.28 18
10788.05 19
10829.68 20

References

Flori Needle (2022). How to Use Regression Analysis to Forecast Sales: A Step-by-Step Guide. Hubspot
https://blog.hubspot.com/sales/regression-analysis-to-forecast-sales
the coefficient from the output of regression analysis , regression equation can be developed as follows,
n equation :

0335.38 + 28.60977 Period

the next three-period, the forecast is

0335.38 + 28.60977 Period


0335.38 + 28.60977*(21) = 10936.18

0335.38 + 28.60977 Period


0335.38 + 28.60977*(22) = 10964.794

0335.38 + 28.60977 Period


0335.38 + 28.60977*(23) = 10993.40
SUMMARY OUTPUT

Regression Statistics
Multiple R 0.944576
R Square 0.892225
Adjusted R 0.885885
Standard E 57.57711
Observatio 19

ANOVA
df SS MS F Significance F
Regression 1 466555.9 466555.9 140.7356 1.199E-09
Residual 17 56357.11 3315.124
Total 18 522913

Coefficients
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 10335.38 29.63473 348.7589 3.279E-34 10272.85 10397.9 10272.85 10397.9
1 28.60977 2.41164 11.8632 1.199E-09 23.52166 33.69789 23.52166 33.69789

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy