Abstract
Recently, artificial intelligence technologies have received considerable attention because of their practical applications in various fields. The key factor in this prosperity is deep learning which is inspired by the information processing in biological brains. In this study, we apply one of the representative deep learning techniques multi-channel convolutional neural networks (CNNs) to predict the fluctuation of the stock index. Furthermore, we optimize the network topology of CNN to improve the model performance. CNN has many hyper-parameters that need to be adjusted for constructing an optimal model that can learn the data patterns efficiently. In particular, we focus on the optimization of feature extraction part of CNN, because this is the most important part of the computational procedure of CNN. This study proposes a method to systematically optimize the parameters for the CNN model by using genetic algorithm (GA). To verify the effectiveness of our model, we compare the prediction result with standard artificial neural networks (ANNs) and CNN models. The experimental results show that the GA-CNN outperforms the comparative models and demonstrate the effectiveness of the hybrid approach of GA and CNN.
Similar content being viewed by others
Abbreviations
- \( C_{t} \) :
-
Closing price at time t
- \( L_{t} \) :
-
Low price at time t
- \( H_{t} \) :
-
High price at time t
- \( {\text{LL}}_{t} \) :
-
The lowest low in the last t days
- \( {\text{HH}}_{t} \) :
-
Highest high in the last t days
- \( {\text{Up}}_{t} \) :
-
Upward price change at time t
- \( {\text{Dw}}_{t} \) :
-
Downward price change at time t
- \( {\text{EMA}}_{t} \) :
-
Exponential moving average for t days
- M :
-
Typical price which is calculated using \( (H_{t} + L_{t} + C_{t} )/3 \)
- m :
-
Simple moving average which is calculated using \( \left( {\sum\nolimits_{i = 1}^{n} {M_{t - i + 1} } } \right)/n \)
- d :
-
Mean absolute deviation which is calculated using \( \left( {\sum\nolimits_{i = 1}^{n} {\left| {M_{t - i + 1} - m_{t} } \right|} } \right)/n \))
- AI:
-
Artificial intelligence
- CNN:
-
Convolutional neural network
- RNN:
-
Recurrent neural network
- ANN:
-
Artificial neural network
- ILSVRC:
-
ImageNet large-scale visual recognition challenge
- GA:
-
Genetic algorithm
- SVM:
-
Support vector machine
- CBR:
-
Case-based reasoning
- EMH:
-
Efficient market hypothesis
- ES:
-
Exponential smoothing
- ARIMA:
-
Autoregressive integrated moving average
- ARCH:
-
Autoregressive conditional heteroscedasticity
- GARCH:
-
Generalized autoregressive conditional heteroscedasticity
- TOPIX:
-
Tokyo stock exchange price indexes
- PNN:
-
Probabilistic neural network
- TDNN:
-
Time-delay neural network
- LDA:
-
Linear discriminant analysis
- QDA:
-
Quadratic discriminant analysis
- EBNN:
-
Elman back-propagation neural network
- PCA:
-
Principal component analysis
- KOSPI:
-
Korea composite stock price index 200
- MV:
-
Majority vote
- WMV:
-
Weighted majority vote
- BC:
-
Borda count
- WBC:
-
Weighted Borda count
- BKS:
-
Behavior-knowledge space
- IBB:
-
NASDAQ biotechnology index
- RBM:
-
Restricted Boltzmann machine
- NMSE:
-
Normalized mean squared error
- RMSE:
-
Root-mean-squared error
- MAE:
-
Mean absolute error
- MI:
-
Mutual information
- LSTM:
-
Long short-term memory
- MNIST:
-
Mixed national institute of standards and technology
- k-NN:
-
k-nearest neighbor
- DTW:
-
Dynamic time warping
- CIFAR10:
-
Canadian institute for advanced research
- PSO:
-
Particle swarm optimization
- SVR:
-
Support vector regression
- RSI:
-
Relative strength index
- MACD:
-
Moving average convergence divergence
- CCI:
-
Commodity channel index
- ReLU:
-
Rectified linear unit
- Adam:
-
Adaptive moment estimation
References
Goodfellow I, Bengio Y, Courville A (2016) Deep learning. MIT press, Cambridge
Krizhevsky A, Sutskever I, Hinton GE (2012) Imagenet classification with deep convolutional neural networks. In: Proceedings of the 26th conference on neural information processing systems (NIPS), pp 1097–1105
Kim Y (2014) Convolutional neural networks for sentence classification. In: Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp 1746–1751
Zheng Y, Liu Q, Chen E, Ge Y, Zhao JL (2016) Exploiting multi-channels deep convolutional neural networks for multivariate time series classification. Front Comput Sci 10(1):96–112. https://doi.org/10.1007/11704-015-4478-2
Abd-Elazim SM, Ali ES (2016) Load frequency controller design via BAT algorithm for nonlinear interconnected power system. Int J Electr Power Energy Syst 77:166–177. https://doi.org/10.1016/j.ijepes.2015.11.029
Abd-Elazim SM, Ali ES (2016) Imperialist competitive algorithm for optimal STATCOM design in a multimachine power system. Int J Electr Power Energy Syst 76:136–146. https://doi.org/10.1016/j.ijepes.2015.09.004
Abd-Elazim SM, Ali ES (2018) Load frequency controller design of a two-area system composing of PV grid and thermal generator via firefly algorithm. Neural Comput Appl 30(2):607–616. https://doi.org/10.1007/s00521-016-2668-y
LeCun Y, Bengio Y, Hinton G (2015) Deep learning. Nature 521(7553):436–444. https://doi.org/10.1038/nature14539
Amin AE (2013) A novel classification model for cotton yarn quality based on trained neural network using genetic algorithm. Knowl Based Syst 39:124–132. https://doi.org/10.1016/j.knosys.2012.10.008
Donate JP, Li X, Sánchez GG, de Miguel AS (2013) Time series forecasting by evolving artificial neural networks with genetic algorithms, differential evolution and estimation of distribution algorithm. Neural Comput Appl 22(1):11–20. https://doi.org/10.1007/s00521-011-0741-0
Azadeh A, Mianaei HS, Asadzadeh SM, Saberi M, Sheikhalishahi M (2015) A flexible ANN-GA-multivariate algorithm for assessment and optimization of machinery productivity in complex production units. J Manuf Syst 35:46–75. https://doi.org/10.1016/j.jmsy.2014.11.007
Braun MA, Seijo S, Echanobe J, Shukla PK, del Campo I, Garcia-Sedano J, Schmeck H (2016) A neuro-genetic approach for modeling and optimizing a complex cogeneration process. Appl Soft Comput 48:347–358. https://doi.org/10.1016/j.asoc.2016.07.026
Armaghani DJ, Hasanipanah M, Mahdiyar A, Majid MZA, Amnieh HB, Tahir MM (2018) Airblast prediction through a hybrid genetic algorithm-ANN model. Neural Comput Appl 29(9):619–629. https://doi.org/10.1007/s00521-016-2598-8
Zhao M, Ren J, Ji L, Fu C, Li J, Zhou M (2012) Parameter selection of support vector machines and genetic algorithm based on change area search. Neural Comput Appl 21(1):1–8. https://doi.org/10.1007/s00521-011-0603-9
Ahmad I, Hussain M, Alghamdi A, Alelaiwi A (2014) Enhancing SVM performance in intrusion detection using optimal feature subset selection based on genetic principal components. Neural Comput Appl 24(7–8):1671–1682. https://doi.org/10.1007/s00521-013-1370-6
Raman MG, Somu N, Kirthivasan K, Liscano R, Sriram VS (2017) An efficient intrusion detection system based on hypergraph-Genetic algorithm for parameter optimization and feature selection in support vector machine. Knowl Based Syst 134:1–12. https://doi.org/10.1016/j.knosys.2017.07.005
Tao Z, Huiling L, Wenwen W, Xia Y (2019) GA-SVM based feature selection and parameter optimization in hospitalization expense modeling. Appl Soft Comput 75:323–332. https://doi.org/10.1016/j.asoc.2018.11.001
Shin KS, Han I (1999) Case-based reasoning supported by genetic algorithms for corporate bond rating. Expert Syst Appl 16(2):85–95. https://doi.org/10.1016/S0957-4174(98)00063-3
Ahn H, Kim KJ (2009) Bankruptcy prediction modeling with hybrid case-based reasoning and genetic algorithms approach. Appl Soft Comput 9(2):599–607. https://doi.org/10.1016/j.asoc.2008.08.002
Abu-Mostafa YS, Atiya AF (1996) Introduction to financial forecasting. Appl Intell 6(3):205–213. https://doi.org/10.1007/BF00126626
Fama EF (1970) Efficient capital markets: a review of theory and empirical work. J Finance 25(2):383–417. https://doi.org/10.2307/2325486
Huang W, Nakamori Y, Wang SY (2005) Forecasting stock market movement direction with support vector machine. Comput Oper Res 32(10):2513–2522. https://doi.org/10.1016/j.cor.2004.03.016
De Faria EL, Albuquerque MP, Gonzalez JL, Cavalcante JTP, Albuquerque MP (2009) Predicting the Brazilian stock market through neural networks and adaptive exponential smoothing methods. Expert Syst Appl 36(10):12506–12509. https://doi.org/10.1016/j.eswa.2009.04.032
Babu CN, Reddy BE (2015) Prediction of selected Indian stock using a partitioning–interpolation based ARIMA–GARCH model. Appl Comput Inform 11(2):130–143. https://doi.org/10.1016/j.aci.2014.09.002
Cavalcante RC, Brasileiro RC, Souza VL, Nobrega JP, Oliveira AL (2016) Computational intelligence and financial markets: a survey and future directions. Expert Syst Appl 55:194–211. https://doi.org/10.1016/j.eswa.2016.02.006
Kim KJ, Han I (2000) Genetic algorithms approach to feature discretization in artificial neural networks for the prediction of stock price index. Expert Syst Appl 19(2):125–132. https://doi.org/10.1016/s0957-4174(00)00027-0
Armano G, Marchesi M, Murru A (2005) A hybrid genetic-neural architecture for stock indexes forecasting. Inf Sci 170(1):3–33. https://doi.org/10.1016/j.ins.2003.03.023
Kara Y, Boyacioglu MA, Baykan ÖK (2011) Predicting direction of stock price index movement using artificial neural networks and support vector machines: the sample of the Istanbul Stock Exchange. Expert Syst Appl 38(5):5311–5319. https://doi.org/10.1016/j.eswa.2010.10.027
Chong E, Han C, Park FC (2017) Deep learning networks for stock market analysis and prediction: methodology, data representations, and case studies. Expert Syst Appl 83:187–205. https://doi.org/10.1016/j.eswa.2017.04.030
Box GE, Jenkins GM (1976) Time series analysis: forecasting and control, revised edn. Holden-Day, Oakland
Engle RF (1982) Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica 50(4):987–1007. https://doi.org/10.2307/1912773
Schwaiger WS (1995) A note on GARCH predictable variances and stock market efficiency. J Bank Finance 19(5):949–953. https://doi.org/10.1016/0378-4266(94)00081-d
Wang JJ, Wang JZ, Zhang ZG, Guo SP (2012) Stock index forecasting based on a hybrid model. Omega 40(6):758–766. https://doi.org/10.1016/j.omega.2011.07.008
Wei LY, Chen TL, Ho TH (2011) A hybrid model based on adaptive-network-based fuzzy inference system to forecast Taiwan stock market. Expert Syst Appl 38(11):13625–13631. https://doi.org/10.1016/j.eswa.2011.04.127
Atsalakis GS, Valavanis KP (2009) Surveying stock market forecasting techniques–part II: soft computing methods. Expert Syst Appl 36(3):5932–5941. https://doi.org/10.1016/j.eswa.2008.07.006
Fernandez-Rodrıguez F, Gonzalez-Martel C, Sosvilla-Rivero S (2000) On the profitability of technical trading rules based on artificial neural networks: evidence from the Madrid stock market. Econ Lett 69(1):89–94. https://doi.org/10.1016/s0165-1765(00)00270-6
Tay FE, Cao L (2001) Application of support vector machines in financial time series forecasting. Omega 29(4):309–317. https://doi.org/10.1016/s0305-0483(01)00026-3
Lee MC (2009) Using support vector machine with a hybrid feature selection method to the stock trend prediction. Expert Syst Appl 36(8):10896–10904. https://doi.org/10.1016/j.eswa.2009.02.038
Adebiyi AA, Adewumi AO, Ayo CK (2014) Comparison of ARIMA and artificial neural networks models for stock price prediction. J Appl Math 2014:1–7. https://doi.org/10.1155/2014/614342
Saad EW, Prokhorov DV, Wunsch DC (1998) Comparative study of stock trend prediction using time delay, recurrent and probabilistic neural networks. IEEE Trans Neural Netw 9(6):1456–1470. https://doi.org/10.1109/72.728395
Yu H, Chen R, Zhang G (2014) A SVM stock selection model within PCA. Procedia Comput Sci 31:406–412. https://doi.org/10.1016/j.procs.2014.05.284
Kim KJ, Lee WB (2004) Stock market prediction using artificial neural networks with optimal feature transformation. Neural Comput Appl 13(3):255–260. https://doi.org/10.1007/s00521-004-0428-x
Lu CJ (2013) Hybridizing nonlinear independent component analysis and support vector regression with particle swarm optimization for stock index forecasting. Neural Comput Appl 23(7–8):2417–2427. https://doi.org/10.1007/s00521-012-1198-5
Kim MJ, Min SH, Han I (2006) An evolutionary approach to the combination of multiple classifiers to predict a stock price index. Expert Syst Appl 31(2):241–247. https://doi.org/10.1016/j.eswa.2005.09.020
Heaton JB, Polson NG, Witte JH (2017) Deep learning for finance: deep portfolios. Appl Stoch Models Bus Ind 33(1):19–21. https://doi.org/10.1002/asmb.2230
Fischer T, Krauss C (2018) Deep learning with long short-term memory networks for financial market predictions. Eur J Oper Res 270(2):654–669. https://doi.org/10.1016/j.ejor.2017.11.054
LeCun Y, Bottou L, Bengio Y, Haffner P (1998) Gradient-based learning applied to document recognition. Proc IEEE 86(11):2278–2324. https://doi.org/10.1109/5.726791
Simonyan K, Zisserman A (2014) Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556
Szegedy C, Liu W, Jia Y, Sermanet P, Reed S, Anguelov D, Erhan D, Vanhoucke, Rabinovich A (2015) Going deeper with convolutions. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp 1–9
Zeiler MD, Fergus R (2014) Visualizing and understanding convolutional networks. In: Proceedings of the European conference on computer vision. Springer, pp 818–833
He F, Zhou J, Feng Z, Liu G, Yang Y (2019) A hybrid short-term load forecasting model based on variational mode decomposition and long short-term memory networks considering relevant factors with Bayesian optimization algorithm. Appl Energy 237:103–116. https://doi.org/10.1016/j.apenergy.2019.01.055
Bengio Y (2000) Gradient-based optimization of hyperparameters. Neural Comput 12(8):1889–1900. https://doi.org/10.1162/089976600300015187
Bergstra J, Bengio Y (2012) Random search for hyper-parameter optimization. J Mach Learn Res 13(1):281–305
Jaddi NS, Abdullah S, Hamdan AR (2016) A solution representation of genetic algorithm for neural network weights and structure. Inf Process Lett 116(1):22–25. https://doi.org/10.1016/j.ipl.2015.08.001
Tian D, Deng J, Vinod G, Santhosh TV, Tawfik H (2018) A constraint-based genetic algorithm for optimizing neural network architectures for detection of loss of coolant accidents of nuclear power plants. Neurocomputing 322:102–119. https://doi.org/10.1016/j.neucom.2018.09.014
Ciancio C, Ambrogio G, Gagliardi F, Musmanno R (2015) Heuristic techniques to optimize neural network architecture in manufacturing applications. Neural Comput Appl 27(7):2001–2015. https://doi.org/10.1007/s00521-015-1994-9
LeCun Y, Bengio Y (1995) Convolutional networks for images, speech, and time series. In: Arbib MA (ed) The handbook of brain theory and neural networks. MIT Press, Cambridge
Liu W, Wang Z, Liu X, Zeng N, Liu Y, Alsaadi FE (2017) A survey of deep neural network architectures and their applications. Neurocomputing 234:11–26. https://doi.org/10.1016/j.neucom.2016.12.038
Holland J (1975) Adaptation in natural and artificial systems. The University of Michigan Press, Ann Arbor
Kim HJ, Shin KS (2007) A hybrid approach based on neural networks and genetic algorithms for detecting temporal patterns in stock markets. Appl Soft Comput 7(2):569–576. https://doi.org/10.1016/j.asoc.2006.03.004
Pal SK, Wang PP (1996) Genetic algorithms for pattern recognition. CRC Press, Boca Raton
Boureau YL, Ponce J, LeCun Y (2010) A theoretical analysis of feature pooling in visual recognition. In: Proceedings of the 27th international conference on machine learning (ICML-10), pp 111–118
Ali ES, Elazim SA (2018) Mine blast algorithm for environmental economic load dispatch with valve loading effect. Neural Comput Appl 30(1):261–270. https://doi.org/10.1007/s00521-016-2650-8
Simpson AR, Dandy GC, Murphy LJ (1994) Genetic algorithms compared to other techniques for pipe optimization. J Water Resour Plan Manag 120(4):423–443. https://doi.org/10.1061/(ASCE)0733-9496(1994)120:4(423)
Vanstone B, Finnie G (2009) An empirical methodology for developing stock market trading systems using artificial neural networks. Expert Syst Appl 36(3):6668–6680. https://doi.org/10.1016/j.eswa.2008.08.019
Kingma DP, Ba JL (2014) Adam: a method for stochastic optimization. In: Proceedings of the 3rd international conference on learning representation (ICLR)
Acknowledgements
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Chung, H., Shin, Ks. Genetic algorithm-optimized multi-channel convolutional neural network for stock market prediction. Neural Comput & Applic 32, 7897–7914 (2020). https://doi.org/10.1007/s00521-019-04236-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00521-019-04236-3