• Không có kết quả nào được tìm thấy

EXPERIMENTAL RESULTS AND DISCUSSION

STOCK PRICE FORECAST IN VIETNAM

4. EXPERIMENTAL RESULTS AND DISCUSSION

100 200 300 400 500 600 700 800

60 80 100 120 140 160 180 200 220

Data points (Jan 2015 - Dec 2017)

Daily closing price (1000 VN dong)

Learning data Test data

100 200 300 400 500 600 700 800

20 25 30 35 40 45 50 55

Data points (Jan 2015 - Dec 2017)

Daily closing price (1000 VN dong)

Learning data Test data

Fig. 3. Daily closing prices of VNM. Fig. 4. Daily closing prices of VCB.

In this section, the performances of the ARIMA, LSSVR, and FA-LSSVR models are compared with each other using the VNM and VCB datasets. The initial settings of the proposed FA-LSSVR is presented in Table 2. Two hyperparameters of the LSSVR model are set to their default values (i.e., C = 10 and ơ = 0.1).

Table 2. Parameter settings of the FA-LSSVR.

Components Name Settings

Learning data Training data 70%

Validation data 30%

LSSVR’s parameters C [10-3; 1012]

ơ [10-3; 1012]

FA’s parameters Number of fireflies 60

Max. of generation 30

As mentioned in Section 2.3, the embedding dimension or lag must be defined before the prediction is made. In this study, the optimal lag is determined by a sensitivity analysis. In each dataset, a subset in the year 2017 is used to validate the FA-LSSVR model when lag ranges from 3 to 10 days. The result indicates that the optimal lag of VNM dataset and VCB dataset is 3 days and 4 days, respectively. The performance of predictive models are then compared by adopting the optimal lag. Table 3 and 4 respectively compare the performance of predictive models in forecasting daily closing stock prices of VNM and VCB. The average performance measures and improvement rates are showed in Table 5.

Table 3. Performance measures of predictive models using the VNM dataset.

ARIMA LSSVR FA-LSSVR

RMSE MAE MAPE RMSE MAE MAPE RMSE MAE MAPE

1000 VN

dong 1000 VN

dong (%) 1000 VN

dong 1000 VN

dong (%) 1000 VN

dong

1000

dongVN (%)

2015 6.552 4.952 4.60 23.399 23.117 21.87 2.081 1.552 1.46

2016 11.877 9.927 7.64 3.162 2.424 1.84 2.193 1.747 1.32

2017 38.252 35.101 18.17 45.462 41.578 21.50 4.395 3.292 1.75

Table 4. Performance measures of predictive models using the VCB dataset.

ARIMA LSSVR FA-LSSVR

RMSE MAE MAPE RMSE MAE MAPE RMSE MAE MAPE

1000 VN dong

1000

VN dong (%) 1000 VN

dong

1000

dongVN (%) 1000 VN dong

1000

dongVN (%)

2015 2.193 1.858 5.81 0.972 0.720 2.23 0.653 0.423 1.31

2016 0.872 0.741 2.11 0.436 0.348 0.98 0.357 0.263 0.74

2017 7.560 6.613 13.69 9.176 8.574 17.96 1.116 0.856 1.80

Table 5. Average performance measures and error rates improvement by the FA-LSSVR.

Average performance measures Improved by the FA-LSSVR

RMSE MAE MAPE RMSE MAE MAPE

1000 VN dong 1000 VN dong (%) (%) (%) (%)

VNM dataset

ARIMA 18.894 16.660 10.14 84.71 86.81 85.11

LSSVR 24.008 22.373 15.07 87.96 90.18 89.98

FA-LSSVR 2.890 2.197 1.51 - -

-196 HỘI THẢO KHOA HỌC QUỐC TẾ KHỞI NGHIỆP ĐỔI MỚI SÁNG TẠO QUỐC GIA VCB dataset

ARIMA 3.542 3.071 7.20 79.99 83.26 82.18

LSSVR 3.528 3.214 7.06 79.91 84.01 81.81

FA-LSSVR 0.709 0.514 1.28 - -

-Table 3 shows that the FA-LSSVR outperformed the LSSVR and ARIMA models in predicting the daily closing price of the VNM. The FA-LSSVR obtained the significant lower values of RMSE, MAE, and MAPE over a period of 3 years compared to the ARIMA and the LSSVR. The lowest MAPE obtained by the proposed MFA-LSSVR was 1.32% while those of the ARIMA and the LSSVR were 4.6% (in 2015) and 1.84% (in 2016), respectively. In addition, the ARIMA showed a better predictive ability than the LSSVR.

Table 5 shows that the error rates of the proposed model were 84.71-86.81% and 87.96-90.18% lower than those of the ARIMA and the LSSVR, respectively.

Table 4 and 5 indicates that performance measures of the FA-LSSVR were superior to those of other models when using VCB dataset. The average MAE value yielded by the FA-LSSVR was 514 VND which was significantly lower than that yielded by the ARIMA (3,071 VND) and the LSSVR (3,214 VND). Similar to the VNM dataset, prediction errors obtained by all models in 2017 were higher than those obtained in 2015 and in 2016. This confirmed a strong fluctuation of Vietnam stock market in 2017. Comparing to the ARIMA, the LSSVR had lower values of RMSE, MAE, and MAPE, indicating its better predictive ability. The overall percentage improvement in error rates for the FA-LSSVR were 79.99-83.26% and 79.91-84.01% better than those of the ARIMA and the LSSVR, respectively.

10 20 30 40 45

80 85 90 95 100 105 110 115 120

Number of observations

Daily closing price (1000 VND)

Actual value Predicted value by ARIMA Predicted value by LSSVR Predicted value by FA-LSSVR

10 20 30 40 45

29 30 31 32 33 34 35 36 37

Number of observations

Daily closing price (1000 VND)

Actual value Predicted value by ARIMA Predicted value by LSSVR Predicted value by FA-LSSVR

(a) VNM dataset - 2015 (d) VCB dataset - 2015

10 20 30 40 45

120 125 130 135 140 145 150

Number of observations

Daily closing price (1000 VND)

Actual value Predicted value by ARIMA Predicted value by LSSVR Predicted value by FA-LSSVR

10 20 30 40 45

34 34.5 35 35.5 36 36.5 37

Number of observations

Daily closing price (1000 VND)

Actual value Predicted value by ARIMA Predicted value by LSSVR Predicted value by FA-LSSVR

(b) VNM dataset - 2016 (e) VCB dataset - 2016

10 20 30 40 45 140

150 160 170 180 190 200 210

Number of observations

Daily closing price (1000 VND)

Actual value Predicted value by ARIMA Predicted value by LSSVR Predicted value by FA-LSSVR

10 20 30 40 45

38 40 42 44 46 48 50 52 54 56

Number of observations

Daily closing price (1000 VND)

Actual value Predicted value by ARIMA Predicted value by LSSVR Predicted value by FA-LSSVR

(c) VNM - 2017 (f) VCB dataset - 2017

Fig. 5. The comparison of actual values and predicted values of the VNM and VCB datasets.

Fig. 5 displays actual values and predicted values when using VNM dataset and VCB dataset, respectively. It is clear that predicted values achieved by the FA-LSSVR model were closer to actual values than those achieved by the ARIMA and the LSSVR models. This confirmed the efficiency of the proposed model in predicting stock prices.

CONCLUSIONS

This study proposes a hybrid model of least squares support vector regression and a firefly algorithm to forecast financial time series data. The FA was utilized to automatically optimize the LSSVR’s parameters, which is aimed to improve the forecast accuracy. The proposed FA-LSSVR model was validated using two daily stock price datasets namely VNM and VCB.

The performance of the FA-LSSVR was compared with that of ARIMA and the LSSVR. Experimental results show that the predictive ability of the FA-LSSVR was superior to that of the ARIMA and the LSSVR in both datasets.

In practice, the stock price is affected by some factors like rates, political events that were not considered in this study. Thus, a novel model which predicts multivariate time series data should be developed. In addition, the proposed model needs to be confirmed by using other financial datasets like exchange rates.

REFERENCES

H.N. Nhu, S. Nitsuwat, M. Sodanil, Prediction of Stock Price Using An Adaptive Neuro-Fuzzy Inference System Trained by Firefly Algorithm International Computer Science and Engineering Conference, IEEE, 2013.

George Box, G. Jenkins, Time series analysis, forecasting and control, CA:Holden-Day, San Francisco, 1970.

H. Ince, T.B. Trafalis, A hybrid model for exchange rate prediction, Decision Support Systems 42 (2006) 1054–1062.

S. Haykin, Neural networks: a comprehensive foundation, Englewood CliKs, NJ: Prentice Hall, 1999.

C. Panda, V. Narasimhan, Forecasting exchange rate better with artificial neural network, Journal of Policy Modeling 29(2) (2007) 227-236.

F. Shen, J. Chao, J. Zhao, Forecasting exchange rate using deep belief networks and conjugate gradient method, Neurocomputing 167 (2015) 243-253.

M. Rehman, G.M. Khan, S.A. Mahmud, Foreign Currency Exchange Rates Prediction Using CGP and Recurrent Neural Network, IERI Procedia 10 (2014) 239-244.

V.N. Vapnik, The nature of statistical learning theory, Springer-Verlag, New York, 1995.

P.-F. Pai, C.-S. Lin, A hybrid ARIMA and support vector machines model in stock price forecasting, Omega 33(6) (2005) 497-505.

198 HỘI THẢO KHOA HỌC QUỐC TẾ KHỞI NGHIỆP ĐỔI MỚI SÁNG TẠO QUỐC GIA K.-j. Kim, Financial time series forecasting using support vector machines, Neurocomputing 55(1–2) (2003) 307-319.

J.A.K. Suykens, T.V. Gestel, J.D. Brabanter, Least squares support vector machines, Singapore: World Scientific2002.

O. Chapelle, V. Vapnik, O. Bousquet, S. Mukherjee, Choosing Multiple Parameters for Support Vector Machines, Machine Learning 46(1-3) (2002) 131–159.

C.-Y. Yeh, C.-W. Huang, S.-J. Lee, A multiple-kernel support vector regression approach for stock market price forecasting, Expert Systems with Applications 38(3) (2011) 2177-2186.

T. Xiong, Y. Bao, Z. Hu, Multiple-output support vector regression with a firefly algorithm for interval-valued stock price index forecasting, Knowledge-Based Systems 55 (2014) 87-100.

X.-S. Yang, Firefly algorithm, Luniver Press, Bristol, U.K, 2008.

I. Fister, I. Fister Jr, X.-S. Yang, J. Brest, A comprehensive review of firefly algorithms, Swarm and Evolutionary Computation 13 (2013) 34-46.

S.K. Pal, C.S. Rai, A.P. Singh, Comparative Study of Firefly Algorithm and Particle Swarm Optimization for Noisy Non-Linear Optimization Problems, International Journal of Intelligent Systems and Applications 4 (2012).

H. Banati, M. Bajaj, Fire Fly Based Feature Selection Approach, International Journal of Computer Science Issues 8(4) (2011).

M. Hanh, Top 10 Giants in Vietnam Stock Exchange, 2017. https://e.theleader.vn/top-10-giants-in-vietnam-stock-exchange-20170823164608368.htm. (Accessed August 2018).

W.-C. Hong, Hybrid evolutionary algorithms in a SVR-based electric load forecasting model, International Journal of Electrical Power & Energy Systems 31(7–8) (2009) 409-417.

H. Wang, D. Hu, Comparison of SVM and LS-SVM for regression, International Conference on Neural Networks and Brain, IEEE, 2005, pp. 279-283.

L.d.S. Coelho, V.C. Mariani, Improved firefly algorithm approach applied to chiller loading for energy conservation, Energy and Buildings 59 (2013) 273-278.

Z. Min, T. Huanq, Short Term Load Forecasting with Least Square Support Vector Regression and PSO, in: J.

Zhang (Ed.), Communications in Computer and Information Science, Springer Heidelberg Dordrecht London NewYork2011, pp. 124-132.

N.-T. Ngo, T.T.H. Truong, Time Series Analysis for Improving Accuracy of Stock Price Forecasts Using Least Squares Support Vector Regression, International Conference for Young Researchers in Economics and Business, Da Nang, Vietnam, 2017, pp. 637-643.

C.t.T.F. Media, https://vn.investing.com/. 2018).