Computer Science ›› 2020, Vol. 47 ›› Issue (6A): 467-473.doi: 10.11896/JsJkx.190900128

• Database & Big Data & Data Science • Previous Articles     Next Articles

Model for Stock Price Trend Prediction Based on LSTM and GA

BAO Zhen-shan1, GUO Jun-nan1, XIE Yuan2 and ZHANG Wen-bo1   

  1. 1 Faulty of Information Technology,BeiJing University of Technology,BeiJing 100124,China
    2 Commando Capital Company,BeiJing 100600,China
  • Published:2020-07-07
  • About author:BAO Zhen-shan, born in 1965, is a mem-ber of China Computer Federation.His main research interests include machine learning and Financial technology.
    ZHANG Wen-bo, born in 1980, Ph.D, lecturer, is a member of China Compu-ter Federation.Her main research inte-rests include heterogeneous computing and trust computing.
  • Supported by:
    This work was supported by the National Key R&D Program of China (2017YFC0803300).

Abstract: How to make an accurate financial time series prediction is one of the important quantitative financial problems.Long and short term memory neural network (LSTM) has solved the complex serialized data learning problems such as stock prediction much better.However,the results of previous studies show that there are still some problems such as unbalanced prediction and local minimum value,which lead to poor prediction ability.Based on the above problems,the genetic algorithm (GA) is used to solve the parameter adJustment problem to ensure the balance of model prediction,and a new stock prediction model is constructed.First,LSTM neural network is used to predict closing price.Then,the prediction results are calculated to the Judgment method based on genetic algorithm.Finally,the predicted stock’s ups and downs signals are gained as the output.This model is different from the previous state-of-the-art and is mainly improved for the output module of the LSTM model.High-frequency trading data of Index China are used for verification.The results show that the improved model is better than the LSTM model.

Key words: Long short-term memory, Genetic Algorithm, Machine learning, Stock prediction

CLC Number: 

  • TP183
[1] GANDHMAL D P,KUMAR K.Systematic analysis and review of stock market prediction techni-ques.Computer Science Review,2019,34:100-190.
[2] CHAKRAVARTY S,DASH P K.A PSO based integrated functional link net and interval type-2 fuzzy logic system for predicting stock market indices.Applied Soft Computing,2012,12(2):931-941.
[3] NI L,NI Z,GAO Y,et al.Stock trend prediction based on fractal feature selection and support vector machine.Expert Systems with Applications,2011,38(5):5569-5576.
[4] KRAUSS C,DO X A,HUCK N,et al.Deep neural networks,gradient-boosted trees,random forests:Statistical arbitrage on the S&P 500.European Journal of Operational Research,2017,259(2):689-702.
[5] FISCHER T,KRAUSS C.Deep learning with long short-term memory networks for financial market predictions.European Journal of Operational Research,2018,270(2):654-669
[6] HENRIQUE B M,SOBREIRO V A,KIMURA H,et al.Literature review:Machine learning techniques applied to financial market prediction.Expert Systems with Applications,2019,124(JUN):226-251.
[7] HOCHREITER S,SCHMIDHUBER J.Long short-term memory.Neural Computation,1997,9(8):1735-1780.
[8] GERS F A,SCHMIDHUBER,JRGEN,et al.Learning to Forget:Continual Prediction with LSTM.Neural Computation,2000,12(10):2451-2471.
[9] GRAVES A.Supervised Sequence Labelling with Recurrent Neural Networks.Springer,2012.
[10] QIN H M,SUN X.Classifying Bug Reports into Bugs and Nonbugs Using LSTM//The Tenth Asia-Pacifc Symposium on Internet-ware.2018.
[11] HUANG Y M,JIANG Y,HASAN T,et al.A Topic BiLSTM Model for Sentiment Classification//Innovation in Artificial Intelligence (ICIAI).2018.
[12] NELSON D M Q , PEREIRA A C M , OLIVEIRA R A D.Stock market’s price movement prediction with LSTM neural networks//International Joint Conference on Neural Networks (IJCNN).2017.
[13] LIN M,CHEN C X.Short-term prediction of stock market price based on GA optimization LSTM neurons//International Conference on Deep Learning Technologies (ICDLT).2018.
[14] SHIU J N,ZOU J Z,ZHANG J,et al.Research of stock price prediction based on dmd-lstm model .Application Research of Computers.
[15] CHEN J,LIU D X,WU D S.Stock index forecasting method based on feature selection and LSTM model.Computer Engineering and Applications,2019,55(6):108-112.
[16] HO T K.Random decision forests//International Conference on Document Analysis and Recognition.1995:278-282.
[17] CHOLLET F.Keras.,2016.
[18] Keras Documentation.
[19] GRANGER C W J.Strategies for Modelling Nonlinear Time‐Series Relationships.Economic Record,2010,69(3):233-238.
[1] GAO Ji-xu, WANG Jun. Multi-edge Collaborative Computing Unloading Scheme Based on Genetic Algorithm [J]. Computer Science, 2021, 48(1): 72-80.
[2] ZHAO Jia-qi, WANG Han-zheng, ZHOU Yong, ZHANG Di, ZHOU Zi-yuan. Remote Sensing Image Description Generation Method Based on Attention and Multi-scale Feature Enhancement [J]. Computer Science, 2021, 48(1): 190-196.
[3] ZHANG Yu-shuai, ZHAO Huan, LI Bo. Semantic Slot Filling Based on BERT and BiLSTM [J]. Computer Science, 2021, 48(1): 247-252.
[4] LI Yin, LI Bi-xin. Memory Leak Test Acceleration Based on Script Prediction and Reconstruction [J]. Computer Science, 2020, 47(9): 31-39.
[5] JI Shun-hui, ZHANG Peng-cheng. Test Case Generation Approach for Data Flow Based on Dominance Relations [J]. Computer Science, 2020, 47(9): 40-46.
[6] DING Yu, WEI Hao, PAN Zhi-song, LIU Xin. Survey of Network Representation Learning [J]. Computer Science, 2020, 47(9): 52-59.
[7] CUI Tong-tong, WANG Gui-ling, GAO Jing. Ship Trajectory Classification Method Based on 1DCNN-LSTM [J]. Computer Science, 2020, 47(9): 175-184.
[8] SU Chang, ZHANG Ding-quan, XIE Xian-zhong, TAN Ya. NFV Memory Resource Management in 5G Communication Network [J]. Computer Science, 2020, 47(9): 246-251.
[9] HU Peng-cheng, DIAO Li-li, YE Hua, YANG Yan-lan. DGA Domains Detection Based on Artificial and Depth Features [J]. Computer Science, 2020, 47(9): 311-317.
[10] DONG Ming-gang, HUANG Yu-yang, JING Chao. K-Nearest Neighbor Classification Training Set Optimization Method Based on Genetic Instance and Feature Selection [J]. Computer Science, 2020, 47(8): 178-184.
[11] LIANG Zheng-you, HE Jing-lin, SUN Yu. Three-dimensional Convolutional Neural Network Evolution Method for Facial Micro-expression Auto-recognition [J]. Computer Science, 2020, 47(8): 227-232.
[12] YANG De-cheng, LI Feng-qi, WANG Yi, WANG Sheng-fa, YIN Hui-shu. Intelligent 3D Printing Path Planning Algorithm [J]. Computer Science, 2020, 47(8): 267-271.
[13] WANG Hui, LE Zi-chun, GONG Xuan, WU Yu-kun, ZUO Hao. Review of Link Prediction Methods Based on Feature Classification [J]. Computer Science, 2020, 47(8): 302-312.
[14] YUAN Ye, HE Xiao-ge, ZHU Ding-kun, WANG Fu-lee, XIE Hao-ran, WANG Jun, WEI Ming-qiang, GUO Yan-wen. Survey of Visual Image Saliency Detection [J]. Computer Science, 2020, 47(7): 84-91.
[15] YU Yi-lin, TIAN Hong-tao, GAO Jian-wei and WAN Huai-yu. Relation Extraction Method Combining Encyclopedia Knowledge and Sentence Semantic Features [J]. Computer Science, 2020, 47(6A): 40-44.
Full text



[1] LEI Li-hui and WANG Jing. Parallelization of LTL Model Checking Based on Possibility Measure[J]. Computer Science, 2018, 45(4): 71 -75 .
[2] SUN Qi, JIN Yan, HE Kun and XU Ling-xuan. Hybrid Evolutionary Algorithm for Solving Mixed Capacitated General Routing Problem[J]. Computer Science, 2018, 45(4): 76 -82 .
[3] ZHANG Jia-nan and XIAO Ming-yu. Approximation Algorithm for Weighted Mixed Domination Problem[J]. Computer Science, 2018, 45(4): 83 -88 .
[4] WU Jian-hui, HUANG Zhong-xiang, LI Wu, WU Jian-hui, PENG Xin and ZHANG Sheng. Robustness Optimization of Sequence Decision in Urban Road Construction[J]. Computer Science, 2018, 45(4): 89 -93 .
[5] SHI Wen-jun, WU Ji-gang and LUO Yu-chun. Fast and Efficient Scheduling Algorithms for Mobile Cloud Offloading[J]. Computer Science, 2018, 45(4): 94 -99 .
[6] ZHOU Yan-ping and YE Qiao-lin. L1-norm Distance Based Least Squares Twin Support Vector Machine[J]. Computer Science, 2018, 45(4): 100 -105 .
[7] LIU Bo-yi, TANG Xiang-yan and CHENG Jie-ren. Recognition Method for Corn Borer Based on Templates Matching in Muliple Growth Periods[J]. Computer Science, 2018, 45(4): 106 -111 .
[8] GENG Hai-jun, SHI Xin-gang, WANG Zhi-liang, YIN Xia and YIN Shao-ping. Energy-efficient Intra-domain Routing Algorithm Based on Directed Acyclic Graph[J]. Computer Science, 2018, 45(4): 112 -116 .
[9] CUI Qiong, LI Jian-hua, WANG Hong and NAN Ming-li. Resilience Analysis Model of Networked Command Information System Based on Node Repairability[J]. Computer Science, 2018, 45(4): 117 -121 .
[10] WANG Zhen-chao, HOU Huan-huan and LIAN Rui. Path Optimization Scheme for Restraining Degree of Disorder in CMT[J]. Computer Science, 2018, 45(4): 122 -125 .