Figure 1.
Time plot of the raw data.
Figure 1.
Time plot of the raw data.
Figure 2.
Sample autocorrelation plot.
Figure 2.
Sample autocorrelation plot.
Figure 3.
Window plot of the second differenced log transformed stock price.
Figure 3.
Window plot of the second differenced log transformed stock price.
Figure 4.
ACF and PACF of the second differenced log transformed stock price.
Figure 4.
ACF and PACF of the second differenced log transformed stock price.
Figure 5.
Artificial neural network architecture.
Figure 5.
Artificial neural network architecture.
Figure 6.
ARIMA (0,2,1) model prediction.
Figure 6.
ARIMA (0,2,1) model prediction.
Figure 7.
ARIMA(0,2,1) model residual analysis.
Figure 7.
ARIMA(0,2,1) model residual analysis.
Figure 8.
Stochastic model geometric Brownian motion prediction.
Figure 8.
Stochastic model geometric Brownian motion prediction.
Figure 9.
GBM model diagnostics.
Figure 9.
GBM model diagnostics.
Figure 10.
ANN(7-15-1) prediction.
Figure 10.
ANN(7-15-1) prediction.
Figure 11.
ANN(7-15-1) model diagnostics.
Figure 11.
ANN(7-15-1) model diagnostics.
Figure 12.
Prediction by all three models against the actual stock price.
Figure 12.
Prediction by all three models against the actual stock price.
Table 1.
ARIMA (p,d,q) model comparison.
Table 1.
ARIMA (p,d,q) model comparison.
Model | AIC | BIC | AICc |
---|
ARIMA(0,2,0) | | | |
ARIMA(0,2,1) | | | |
ARIMA(0,2,2) | | | |
ARIMA(0,2,3) | | | |
ARIMA(0,2,4) | | | |
ARIMA(1,2,0) | | | |
ARIMA(1,2,1) | | | |
ARIMA(1,2,2) | | | |
ARIMA(1,2,3) | | | |
ARIMA(1,2,4) | | | |
ARIMA(2,2,0) | | | |
ARIMA(2,2,1) | | | |
ARIMA(2,2,2) | | | |
ARIMA(2,2,3) | | | |
ARIMA(2,2,4) | | | |
ARIMA(3,2,0) | | | |
ARIMA(3,2,1) | | | |
ARIMA(3,2,2) | | | |
ARIMA(3,2,3) | | | |
ARIMA(3,2,4) | | | |
ARIMA(4,2,0) | | | |
ARIMA(4,2,1) | | | |
ARIMA(4,2,2) | | | |
ARIMA(4,2,3) | | | |
ARIMA(4,2,4) | | | |
Table 2.
ARIMA(0,2,1) model summary.
Table 2.
ARIMA(0,2,1) model summary.
| Model | Arima(x = tr.stock, order = c(0, 2, 1)) |
---|
MA(1) Coefficient | −1.00 | | | | | | |
Standard Error | 0.0027 | | | | | | |
Sigma-squared estimated as | 0.0000718 | | | | | | |
Log likelihood | 3992.74 | | | | | | |
AIC | −7981.48 | | | | | | |
AICc | −7981.47 | | | | | | |
BIC | −7971.31 | | | | | | |
Training set error measures | ME | RMSE | MAE | MPE | MAPE | MASE | ACF1 |
0.00013 | 0.00846 | 0.00573 | 0.00220 | 0.10561 | 0.99516 | −0.01682 |
Table 3.
Error measures for different network structures.
Table 3.
Error measures for different network structures.
MODEL | | APE | AAE | ARPE | RMSE |
---|
7-2-1 | 0.3137 | 0.0231 | 7.0435 | 0.1118 | 0.3344 |
7-3-1 | 0.4158 | 0.0211 | 6.412 | 0.1018 | 0.319 |
7-4-1 | 0.0422 | 0.028 | 8.5128 | 0.1351 | 0.3676 |
7-5-1 | 0.0368 | 0.0292 | 8.8796 | 0.1409 | 0.3754 |
7-6-1 | 0.3716 | 0.0215 | 6.5496 | 0.104 | 0.3224 |
7-7-1 | 0.3431 | 0.0226 | 6.8687 | 0.109 | 0.3302 |
7-8-1 | 0.3907 | 0.0219 | 6.6781 | 0.106 | 0.3256 |
7-9-1 | 0.4036 | 0.0212 | 6.4713 | 0.1027 | 0.3205 |
7-10-1 | 0.4108 | 0.0214 | 6.5237 | 0.1036 | 0.3218 |
7-11-1 | 0.5155 | 0.0195 | 5.9284 | 0.0941 | 0.3068 |
7-12-1 | 0.5392 | 0.0187 | 5.6802 | 0.0902 | 0.3003 |
7-13-1 | 0.4777 | 0.0194 | 5.8945 | 0.0936 | 0.3059 |
7-14-1 | 0.4676 | 0.0196 | 5.9702 | 0.0948 | 0.3078 |
7-15-1 | 0.6216 | 0.0167 | 5.0928 | 0.0808 | 0.2843 |
7-16-1 | 0.5701 | 0.0182 | 5.5382 | 0.0879 | 0.2965 |
Table 4.
Prediction by ARIMA(0,2,1) model.
Table 4.
Prediction by ARIMA(0,2,1) model.
Date | Actual | Predicted | Error |
---|
11-12-2019 | 305.69 | 305.17 | 0.17 |
11-13-2019 | 305.79 | 305.81 | 0.01 |
11-14-2019 | 306.23 | 305.91 | 0.10 |
11-15-2019 | 308.45 | 306.35 | 0.68 |
11-18-2019 | 308.68 | 308.57 | 0.04 |
11-19-2019 | 308.59 | 308.80 | 0.07 |
11-20-2019 | 307.44 | 308.71 | 0.41 |
11-21-2019 | 306.95 | 307.56 | 0.20 |
11-22-2019 | 307.63 | 307.07 | 0.18 |
11-25-2019 | 310.01 | 307.75 | 0.73 |
11-26-2019 | 310.72 | 310.14 | 0.19 |
11-27-2019 | 312.10 | 310.85 | 0.40 |
11-29-2019 | 310.94 | 312.23 | 0.41 |
12-2-2019 | 308.30 | 311.07 | 0.90 |
12-3-2019 | 306.23 | 308.43 | 0.72 |
12-4-2019 | 308.12 | 306.36 | 0.57 |
12-5-2019 | 308.68 | 308.25 | 0.14 |
12-6-2019 | 311.50 | 308.81 | 0.86 |
12-9-2019 | 310.52 | 311.64 | 0.36 |
12-10-2019 | 310.17 | 310.65 | 0.15 |
12-11-2019 | 311.05 | 310.30 | 0.24 |
12-12-2019 | 313.73 | 311.18 | 0.81 |
12-13-2019 | 313.92 | 313.86 | 0.02 |
12-16-2019 | 316.08 | 314.05 | 0.64 |
12-17-2019 | 316.15 | 316.21 | 0.02 |
12-18-2019 | 316.17 | 316.29 | 0.04 |
12-19-2019 | 317.46 | 316.31 | 0.36 |
12-20-2019 | 318.86 | 317.60 | 0.40 |
12-23-2019 | 319.34 | 319.00 | 0.11 |
12-24-2019 | 319.35 | 319.48 | 0.04 |
12-26-2019 | 321.05 | 319.49 | 0.49 |
12-27-2019 | 320.97 | 321.20 | 0.07 |
12-30-2019 | 319.20 | 321.12 | 0.60 |
Table 5.
Prediction error by ARIMA(0,2,1) model.
Table 5.
Prediction error by ARIMA(0,2,1) model.
MODEL | APE | AAE | ARPE | RMSE |
---|
ARIMA(0,2,1) | 0.0044 | 1.3651 | 0.0217 | 0.1472 |
Table 6.
Prediction by geometric Brownian motion.
Table 6.
Prediction by geometric Brownian motion.
Date | Actual | Predicted | Error |
---|
11-12-2019 | 305.69 | 305.17 | 0.17 |
11-13-2019 | 305.79 | 305.81 | 0.01 |
11-14-2019 | 306.23 | 305.91 | 0.10 |
11-15-2019 | 308.45 | 306.35 | 0.68 |
11-18-2019 | 308.68 | 308.59 | 0.03 |
11-19-2019 | 308.59 | 308.80 | 0.07 |
11-20-2019 | 307.44 | 308.71 | 0.41 |
11-21-2019 | 306.95 | 307.58 | 0.21 |
11-22-2019 | 307.63 | 307.06 | 0.19 |
11-25-2019 | 310.01 | 307.74 | 0.73 |
11-26-2019 | 310.72 | 310.15 | 0.18 |
11-27-2019 | 312.10 | 310.86 | 0.40 |
11-29-2019 | 310.94 | 312.23 | 0.41 |
12-2-2019 | 308.30 | 311.09 | 0.90 |
12-3-2019 | 306.23 | 308.43 | 0.72 |
12-4-2019 | 308.12 | 306.36 | 0.57 |
12-5-2019 | 308.68 | 308.25 | 0.14 |
12-6-2019 | 311.50 | 308.82 | 0.86 |
12-9-2019 | 310.52 | 311.63 | 0.36 |
12-10-2019 | 310.17 | 310.64 | 0.15 |
12-11-2019 | 311.05 | 310.30 | 0.24 |
12-12-2019 | 313.73 | 311.21 | 0.80 |
12-13-2019 | 313.92 | 313.88 | 0.01 |
12-16-2019 | 316.08 | 314.06 | 0.64 |
12-17-2019 | 316.15 | 316.21 | 0.02 |
12-18-2019 | 316.17 | 316.27 | 0.03 |
12-19-2019 | 317.46 | 316.31 | 0.36 |
12-20-2019 | 318.86 | 317.59 | 0.40 |
12-23-2019 | 319.34 | 319.00 | 0.11 |
12-24-2019 | 319.35 | 319.47 | 0.04 |
12-26-2019 | 321.05 | 319.51 | 0.48 |
12-27-2019 | 320.97 | 321.20 | 0.07 |
12-30-2019 | 319.20 | 321.11 | 0.60 |
Table 7.
Prediction error by geometric Brownian motion.
Table 7.
Prediction error by geometric Brownian motion.
MODEL | APE | AAE | ARPE | RMSE |
---|
GBM | 0.0044 | 1.3341 | 0.0212 | 0.1455 |
Table 8.
Prediction by ANN (7-15-1) model.
Table 8.
Prediction by ANN (7-15-1) model.
Date | Actual | Predicted | Error |
---|
11-12-2019 | 305.69 | 302.13 | 1.17 |
11-13-2019 | 305.79 | 302.52 | 1.07 |
11-14-2019 | 306.23 | 302.26 | 1.30 |
11-15-2019 | 308.45 | 302.39 | 1.97 |
11-18-2019 | 308.68 | 303.56 | 1.66 |
11-19-2019 | 308.59 | 304.19 | 1.43 |
11-20-2019 | 307.44 | 303.54 | 1.27 |
11-21-2019 | 306.95 | 302.52 | 1.44 |
11-22-2019 | 307.63 | 302.86 | 1.55 |
11-25-2019 | 310.72 | 305.06 | 1.82 |
11-27-2019 | 312.10 | 305.81 | 2.02 |
11-29-2019 | 310.94 | 306.38 | 1.47 |
12-2-2019 | 308.30 | 306.02 | 0.74 |
12-3-2019 | 306.23 | 303.59 | 0.86 |
12-4-2019 | 308.12 | 301.63 | 2.11 |
12-5-2019 | 308.68 | 304.03 | 1.51 |
12-6-2019 | 311.50 | 304.28 | 2.32 |
12-9-2019 | 310.52 | 306.05 | 1.44 |
12-10-2019 | 310.17 | 306.07 | 1.33 |
12-11-2019 | 311.05 | 305.23 | 1.87 |
12-12-2019 | 313.73 | 305.55 | 2.61 |
12-13-2019 | 313.92 | 306.48 | 2.37 |
12-16-2019 | 316.08 | 306.73 | 2.96 |
12-17-2019 | 316.15 | 307.56 | 2.72 |
12-18-2019 | 316.17 | 308.05 | 2.57 |
12-19-2019 | 317.46 | 308.40 | 2.85 |
12-20-2019 | 318.86 | 308.04 | 3.39 |
12-23-2019 | 319.34 | 306.20 | 4.11 |
12-24-2019 | 319.35 | 308.94 | 3.26 |
12-26-2019 | 321.05 | 309.71 | 3.53 |
12-27-2019 | 320.97 | 310.31 | 3.32 |
12-30-2019 | 319.20 | 309.93 | 2.90 |
Table 9.
Prediction error by ANN(7-5-1) model.
Table 9.
Prediction error by ANN(7-5-1) model.
MODEL | APE | AAE | ARPE | RMSE |
---|
ANN(7-15-1) | 0.0167 | 5.09279 | 0.08084 | 0.28432 |
Table 10.
Sample results from the models—ARIMA(0,2,1), , and ANN(7-15-1).
Table 10.
Sample results from the models—ARIMA(0,2,1), , and ANN(7-15-1).
Date | Actual | ARIMA | GBM | ANN |
---|
11-12-2019 | 305.69 | 305.17 | 305.17 | 302.13 |
11-13-2019 | 305.79 | 305.81 | 305.81 | 302.52 |
11-14-2019 | 306.23 | 305.91 | 305.91 | 302.26 |
11-15-2019 | 308.45 | 306.35 | 306.35 | 302.39 |
11-18-2019 | 308.68 | 308.57 | 308.59 | 303.56 |
11-19-2019 | 308.59 | 308.80 | 308.80 | 304.19 |
11-20-2019 | 307.44 | 308.71 | 308.71 | 303.54 |
11-21-2019 | 306.95 | 307.56 | 307.58 | 302.52 |
11-22-2019 | 307.63 | 307.07 | 307.06 | 302.86 |
11-25-2019 | 310.01 | 307.75 | 307.74 | 303.50 |
11-26-2019 | 310.72 | 310.14 | 310.15 | 305.06 |
11-27-2019 | 312.10 | 310.85 | 310.86 | 305.81 |
11-29-2019 | 310.94 | 312.23 | 312.23 | 306.38 |
12-2-2019 | 308.30 | 311.07 | 311.09 | 306.02 |
12-3-2019 | 306.23 | 308.43 | 308.43 | 303.59 |
12-4-2019 | 308.12 | 306.36 | 306.36 | 301.63 |
12-5-2019 | 308.68 | 308.25 | 308.25 | 304.03 |
12-6-2019 | 311.50 | 308.81 | 308.82 | 304.28 |
12-9-2019 | 310.52 | 311.64 | 311.63 | 306.05 |
12-10-2019 | 310.17 | 310.65 | 310.64 | 306.04 |
12-11-2019 | 311.05 | 310.30 | 310.30 | 305.23 |
12-12-2019 | 313.73 | 311.18 | 311.21 | 305.55 |
12-13-2019 | 313.92 | 313.86 | 313.88 | 306.48 |
12-16-2019 | 316.08 | 314.05 | 314.06 | 306.73 |
12-17-2019 | 316.15 | 316.21 | 316.21 | 307.56 |
12-18-2019 | 316.17 | 316.29 | 316.27 | 308.05 |
12-19-2019 | 317.46 | 316.31 | 316.31 | 308.40 |
12-20-2019 | 318.86 | 317.60 | 317.59 | 308.04 |
12-23-2019 | 319.34 | 319.00 | 319.00 | 306.20 |
12-24-2019 | 319.35 | 319.48 | 319.47 | 308.94 |
12-26-2019 | 321.05 | 319.49 | 319.51 | 309.71 |
12-27-2019 | 320.97 | 321.20 | 321.20 | 310.31 |
12-30-2019 | 319.20 | 321.12 | 321.11 | 309.93 |
Table 11.
Error measures comparison from the three models.
Table 11.
Error measures comparison from the three models.
MODEL | APE | AAE | ARPE | RMSE |
---|
ARIMA(0,2,1) | 0.00438 | 1.33476 | 0.02119 | 0.14556 |
GBM | 0.00438 | 1.33426 | 0.02118 | 0.14553 |
ANN(7-15-1) | 0.01672 | 5.09279 | 0.08084 | 0.28432 |