Stock Trend Prediction Using Deep Learning Approach on Technical Indicator and Industrial Specific Information
Abstract
:1. Introduction
2. Literature Review
2.1. Efficient Market Hypothesis (EMH)
2.2. Stock Market Prediction Using Only Textual Information
2.3. Stock Market Prediction Using Numerical and Textual Information
3. Methodology
3.1. Data Preprocessing
3.1.1. Textual Data Preprocessing
3.1.2. Numerical Data Preprocessing
3.1.3. Data Normalization
3.2. Proposed Model
3.2.1. Model Architecture
3.2.2. Training Process
4. Experiment Settings
4.1. Datasets
4.1.1. Numerical Statistic
4.1.2. Textual Statistic
4.2. Baseline Model
4.3. Evaluation Metrics
4.3.1. Performance Evaluation
4.3.2. Trading Profit
4.4. Training and Hyperparameters
5. Results and Discussion
5.1. Effects of Transfer Learning
5.2. Effects of Numerical and Textual Features
5.3. Effects of Industry-Specific News Headlines (Sector)
5.4. Annualized Return Based on Trading Simulation
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Fama, E.F. Efficient Market Hypothesis. Ph.D. Thesis, University of Chicago, Ellis Ave, IL, USA, 1960. [Google Scholar]
- Banz, R.W. The relationship between return and market value of common stocks. J. Financ. Econ. 1981, 9, 3–18. [Google Scholar] [CrossRef] [Green Version]
- Basu, S. Investment performance of common stocks in relation to their price-earnings ratios: A test of the efficient market hypothesis. J. Financ. 1977, 32, 663–682. [Google Scholar] [CrossRef]
- Jegadeesh, N.; Titman, S. Returns to buying winners and selling losers: Implications for stock market efficiency. J. Financ. 1933, 48, 65–91. [Google Scholar] [CrossRef]
- Amihud, Y.; Mendelson, H. Liquidity and stock returns. Financ. Anal. J. 1986, 42, 43–48. [Google Scholar] [CrossRef]
- Leigh, W.; Purvis, R.; Ragusa, J.M. Forecasting the nyse composite index with technical analysis, pattern recognizer, neural network, and genetic algorithm: A case study in romantic decision support. Decis. Support Syst. 2002, 32, 361–377. [Google Scholar] [CrossRef]
- Mizuno, H.; Kosaka, M.; Yajima, H.; Komoda, N. Application of neural network to technical analysis of stock market prediction. Stud. Inform. Control 1998, 7, 111–120. [Google Scholar]
- Gidofalvi, G.; Elkan, C. Using news articles to predict stock price movements. In Department of Computer Science and Engineering; University of California: San Diego, CA, USA, 2001. [Google Scholar]
- Gunduz, H.; Cataltepe, Z. Borsa istanbul (bist) daily prediction using financial news and balanced feature selection. Expert Syst. Appl. 2015, 42, 9001–9011. [Google Scholar] [CrossRef]
- Schumaker, R.P.; Chen, H. Textual analysis of stock market prediction using breaking financial news: The azfin text system. ACM Trans. Inf. Syst. (TOIS) 2009, 27, 1–19. [Google Scholar] [CrossRef]
- Wang, B.; Huang, H.; Wang, X. A novel text mining approach to financial time series forecasting. Neurocomputing 2012, 83, 136–145. [Google Scholar] [CrossRef]
- Ding, X.; Zhang, Y.; Liu, T.; Duan, J. Deep learning for event-driven stock prediction. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, Buenos Aires, Argentina, 25–31 July 2015. [Google Scholar]
- Akita, R.; Yoshihara, A.; Matsubara, T.; Uehara, K. Deep learning for stock prediction using numerical and textual information. In Proceedings of the 2016 IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS), Okayama, Japan, 26–29 June 2016. [Google Scholar]
- Vargas, M.R.; De Lima, B.S.; Evsukoff, A.G. Deep learning for stock market prediction from financial news articles. In Proceedings of the 2017 IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA), Annecy, France, 26–28 June 2017. [Google Scholar]
- Oncharoen, P.; Vateekul, P. Deep learning for stock market prediction using event embedding and technical indicators. In Proceedings of the 2018 5th International Conference on Advanced Informatics: Concept Theory and Applications (ICAICTA), Krabi, Thailand, 14–17 August 2018. [Google Scholar]
- Chiewhawan, T.; Vateekul, P. Explainable deep learning for thai stock market prediction using textual representation and technical indicators. In Proceedings of the 8th International Conference on Computer and Communications Management, Singapore, 17–19 July 2020; pp. 19–23. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Sun, C.; Qiu, X.; Xu, Y.; Huang, X. How to fine-tune bert for text classification? In China National Conference on Chinese Computational Linguistics; Springer: Berlin, Germany, 2019; pp. 194–206. [Google Scholar]
- Hiew, J.Z.G.; Huang, X.; Mou, H.; Li, D.; Wu, Q.; Xu, Y. Bert-based financial sentiment index and lstm-based stock return predictability. arXiv 2019, arXiv:1906.09024. [Google Scholar]
- Malkiel, B.G. The efficient market hypothesis and its critics. J. Econ. Perspect. 2003, 17, 59–82. [Google Scholar] [CrossRef] [Green Version]
- Wu, D.; Fung, G.P.C.; Yu, J.X.; Pan, Q. Stock prediction: An event-driven approach based on bursty keywords. Front. Comput. Sci. China 2009, 3, 145–157. [Google Scholar] [CrossRef]
- Xie, B.; Passonneau, R.; Wu, L.; Creamer, G.G. Semantic frames to predict stock price movement. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics, Sofia, Bulgaria, 4–9 August 2013; pp. 873–883. [Google Scholar]
- Ding, X.; Zhang, Y.; Liu, T.; Duan, J. Using structured events to predict stock price movement: An empirical investigation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014; pp. 1415–1425. [Google Scholar]
- Ding, X.; Zhang, Y.; Liu, T.; Duan, J. Knowledge-driven event embedding for stock prediction. In Proceedings of the Coling 2016, the 26th International Conference on Computational Linguistics: Technical Papers, Osaka, Japan, 11–16 December 2016; pp. 2133–2142. [Google Scholar]
- Chang, C.Y.; Zhang, Y.; Teng, Z.; Bozanic, Z.; Ke, B. Measuring the information content of financial news. In Proceedings of the Coling 2016, the 26th International Conference on Computational Linguistics: Technical Papers, Osaka, Japan, 11–16 December 2016; pp. 3216–3225. [Google Scholar]
- Peng, Y.; Jiang, H. Leverage financial news to predict stock price movements using word embeddings and deep neural networks. arXiv 2015, arXiv:1506.07220. [Google Scholar]
- Luss, R.; d’Aspremont, A. Predicting abnormal returns from news using text classification. Quant. Financ. 2015, 15, 999–1012. [Google Scholar] [CrossRef]
- Skuza, M.; Romanowski, A. Sentiment analysis of twitter data within big data distributed environment for stock prediction. In Proceedings of the 2015 Federated Conference on Computer Science and Information Systems (FedCSIS), Lodz, Poland, 13–16 September 2015; pp. 1349–1354. [Google Scholar]
- Sehgal, V.; Song, C. Sops: Stock prediction using web sentiment. In Proceedings of the Seventh IEEE International Conference on Data Mining Workshops (ICDMW 2007), Omaha, NE, USA, 28–31 October 2007; pp. 21–26. [Google Scholar]
- Lavrenko, V.; Schmill, M.; Lawrie, D.; Ogilvie, P.; Jensen, D.; Allan, J. Mining of concurrent text and time series. In KDD-2000 Workshop on Text Mining; Citeseer: University Park, PA, USA, 2000; Volume 2000, pp. 37–44. [Google Scholar]
- Xiong, G.; Bharadwaj, S. Asymmetric roles of advertising and marketing capability in financial returns to news: Turning bad into good and good into great. J. Mark. Res. 2013, 50, 706–724. [Google Scholar] [CrossRef]
- Shi, L.; Teng, Z.; Wang, L.; Zhang, Y.; Binder, A. Deepclue: Visual interpretation of text-based deep stock prediction. IEEE Trans. Knowl. Data Eng. 2018, 31, 1094–1108. [Google Scholar] [CrossRef]
- Pennington, J.; Socher, R.; Manning, C.D. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014; pp. 1532–1543. [Google Scholar]
- Bojanowski, P.; Grave, E.; Joulin, A.; Mikolov, T. Enriching word vectors with subword information. Trans. Assoc. Comput. Linguist. 2017, 5, 135–146. [Google Scholar] [CrossRef] [Green Version]
- Ling, W.; Luís, T.; Marujo, L.; Astudillo, R.F.; Amir, S.; Dyer, C.; Black, A.W.; Trancoso, I. Finding function in form: Compositional character models for open vocabulary word representation. arXiv 2015, arXiv:1508.02096. [Google Scholar]
- Kim, Y.; Jernite, Y.; Sontag, D.; Rush, A. Character-aware neural language models. In Proceedings of the AAAI Conference on Artificial Intelligence, Phoenix, AZ, USA, 12–17 February 2016; Volume 30. [Google Scholar]
- Wehrmann, J.; Becker, W.; Cagnini, H.E.; Barros, R.C. A character-based convolutional neural network for language-agnostic twitter sentiment analysis. In Proceedings of the 2017 International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA, 14–19 May 2017; pp. 2384–2391. [Google Scholar]
- Othan, D.; Kilimci, Z.H.; Uysal, M. Financial sentiment analysis for predicting direction of stocks using bidirectional encoder representations from transformers (bert) and deep learning models. In Proceedings of the International Conference on “Innovative & Intelligent Technologies”, Istanbul, Turkey, 5–6 December 2019; pp. 30–35. [Google Scholar]
- Tantisantiwong, N.; Komenkul, K.; Channuntapipat, C.; Jeamwatthanachai, W. Capturing investor sentiment from big data: The effects of online social media on set50 index. CM Res. Innov. 2020, 2020, 1–42. [Google Scholar]
- Hu, Z.; Liu, W.; Bian, I.; Liu, X.; Liu, T.-Y. Listening to chaotic whispers: A deep learning framework for news-oriented stock trend prediction. In Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining, Marina Del Rey, CA, USA, 5–9 February 2018; pp. 261–269. [Google Scholar]
- Zhai, Y.; Hsu, A.; Halgamuge, S.K. Combining news and technical indicators in daily stock price trends prediction. In International Symposium on Neural Networks; Springer: Berlin, Germany, 2007; pp. 1087–1096. [Google Scholar]
- Sezer, O.B.; Ozbayoglu, A.M. Algorithmic financial trading with deep convolutional neural networks: Time series to image conversion approach. Appl. Soft Comput. 2018, 70, 525–538. [Google Scholar] [CrossRef]
- Sutheebanjard, P.; Premchaiswadi, W. Determining the time period and amount of training data for stock exchange of thailand index prediction. In Proceedings of the 2010 2nd IEEE International Conference on Information and Financial Engineering, Chongqing, China, 17–19 September 2010; pp. 359–363. [Google Scholar]
- Gupta, B.B.; Sheng, Q.Z. Machine Learning for Computer and Cyber Security: Principle, Algorithms, and Practices; CRC Press: Boca Raton, FL, USA, 2019. [Google Scholar]
- Tzimas, M.; Michopoulos, J.; Po, G.; Reid, A.C.; Papanikolaou, S. Inference and prediction of nanoindentation response in fcc crystals: Methods and discrete dislocation simulation examples. arXiv 2019, arXiv:1910.07587. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Ioffe, S.; Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the International Conference on Machine Learning, Lille, France, 6–11 July 2015; pp. 448–456. [Google Scholar]
Feature | Explanation |
---|---|
Open Price | The first share price at the start of daily trading |
Close Price | The final share price at the end of daily trading |
High Price | The highest share price during daily trading |
Low Price | The lowest share price during daily trading |
RSI | CMO | WMA | PRO | Williamś %R |
EMA | ROC | SMA | HMA | TripleEMA |
DMI | PSI | CCI | CMFI | MACD |
No. | Data Period | Numerical Information | ||
---|---|---|---|---|
Training | Validating | Testing | ||
#1 | Jan.-2014 to Apr.-2018 | 1117 | 109 | 351 |
#2 | May-2014 to Mar.-2019 | 1093 | 351 | 314 |
#3 | Jun.-2015 to Feb.-2020 | 1115 | 261 | 344 |
No. | Data Period | Textual Information | ||
---|---|---|---|---|
Training | Validating | Testing | ||
#1 | Jan.-2014 to Apr.-2018 | 101,916 | 14,727 | 13,662 |
#2 | May-2014 to Mar.-2019 | 101,875 | 14,802 | 14,398 |
#3 | Jun.-2015 to Feb.-2020 | 101,860 | 13,722 | 14,228 |
Industry Symbols | Industry Group | Stock Symbols |
---|---|---|
INDUS | Petrochemicals and Chemicals, Packaging | IVL, PTTGC, SCGP |
TECH | Information and Communication, Electronic components, Technology | ADVANC, DTAC, INTUCH, TRUE, THCOM, JAS, KCE |
PROPCON | Property Development, Construction services, Construction materials | AWC, CPN, LH, SCC, TOA, WHA, CK, ITD, PS, SCCC, TPIPL, TASCO |
SERVICE | Tourism and Leisure, Commerce, Transportation and Logistics, Health Care Services | AOT, BEM, BTS, CPALL, BH, HMPRO, CRC, BDMS, BJC, GLOBAL, VGI |
FINCIAL | Banking, Finance and Securities | BBL, KBANK, KTB, SCB, MTC, TMB, TISCO, KTC, SAWAD, TCAP BLA MTLS |
RESOURC | Energy and Utilities | EGCO, GULF, GPSC, IRPC, PTTEP, RATCH, TOP, BGRIM, BPP, EA, PTT, TTW |
AGRO | Food and Beverage | CBG, CPF, MINT, TU, OSP |
No. | Data Period | Sectors | Textual Information | ||
---|---|---|---|---|---|
Training | Validating | Testing | |||
#1 | Jan.-2014 to Apr.-2018 | FINCIAL | 27,662 | 4067 | 4030 |
SERVICE | 24,689 | 3553 | 2977 | ||
RESOURC | 16,176 | 2215 | 2236 | ||
PROPCON | 14,858 | 2420 | 2165 | ||
AGRO | 11,480 | 1723 | 1598 | ||
TECH | 4808 | 569 | 440 | ||
INDUS | 2070 | 349 | 458 | ||
#2 | May-2014 to Mar.-2019 | FINCIAL | 27,666 | 4030 | 4298 |
SERVICE | 24,595 | 3625 | 3132 | ||
RESOURC | 16,226 | 2195 | 1378 | ||
PROPCON | 14,884 | 2408 | 2341 | ||
AGRO | 11,477 | 1756 | 1655 | ||
TECH | 4784 | 564 | 399 | ||
INDUS | 2091 | 348 | 470 | ||
#3 | Jun.-2015 to Feb.-2020 | FINCIAL | 27,760 | 3731 | 4245 |
SERVICE | 24,490 | 3413 | 3097 | ||
RESOURC | 16,195 | 2034 | 2299 | ||
PROPCON | 14,919 | 2222 | 2298 | ||
AGRO | 11,453 | 1670 | 1609 | ||
TECH | 4768 | 515 | 469 | ||
INDUS | 2089 | 348 | 466 |
Metrics | Formula | Explanation |
---|---|---|
Accuracy | Specifying the percentage of correct forecasts in all samples. | |
Recall | Specifying the proportions of positive samples is classified as a positive sample. | |
Precision | Identifying the proportion of real positive samples in the class that was classified as positive. | |
F1 | F1 is the precision and recall weighted harmonic mean. |
Group | Model | Accuracy (%) | |||
---|---|---|---|---|---|
#1 | #2 | #3 | Avg | ||
Baseline | LSTM (NUM) | 54.28 | 45.71 | 42.86 | 47.62 |
FastText | 54.50 | 58.33 | 52.83 | 55.22 | |
FastText + NUM | 60.17 | 58.67 | 54.17 | 57.67 | |
Ours | BERT | 62.67 | 61.17 | 58.33 | 60.72 |
BERT + NUM | 62.17 | 64.50 | 55.67 | 60.78 | |
BERT_SEC + NUM | 63.67 | 61.50 | 58.67 | 61.28 |
Group | Model | F1-Score (%) | |||
---|---|---|---|---|---|
#1 | #2 | #3 | Avg | ||
Baseline | LSTM (NUM) | 54.63 | 43.75 | 40.44 | 46.27 |
FastText | 42.54 | 54.51 | 47.50 | 48.15 | |
FastText + NUM | 58.69 | 56.34 | 54.91 | 56.65 | |
Ours | BERT | 56.09 | 58.47 | 56.36 | 56.97 |
BERT + NUM | 56.64 | 60.13 | 56.05 | 57.61 | |
BERT_SEC + NUM | 62.30 | 60.10 | 56.34 | 59.58 |
Group | Model | Annualized Return (%) | |||
---|---|---|---|---|---|
#1 | #2 | #3 | Avg | ||
Baseline | SET50 | 18.55 | −7.17 | −17.76 | −2.13 |
LSTM (NUM) | 8.40 | 11.10 | −12.10 | 2.47 | |
FastText | 6.90 | 8.60 | −12.10 | 1.13 | |
FastText + NUM | 15.30 | −4.50 | 5.20 | 5.33 | |
Ours | BERT | 7.70 | 12.00 | −11.90 | 2.60 |
BERT + NUM | 15.80 | −3.90 | 6.30 | 6.06 | |
BERT_SEC + NUM | 17.50 | −3.30 | 11.20 | 8.47 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Prachyachuwong, K.; Vateekul, P. Stock Trend Prediction Using Deep Learning Approach on Technical Indicator and Industrial Specific Information. Information 2021, 12, 250. https://doi.org/10.3390/info12060250
Prachyachuwong K, Vateekul P. Stock Trend Prediction Using Deep Learning Approach on Technical Indicator and Industrial Specific Information. Information. 2021; 12(6):250. https://doi.org/10.3390/info12060250
Chicago/Turabian StylePrachyachuwong, Kittisak, and Peerapon Vateekul. 2021. "Stock Trend Prediction Using Deep Learning Approach on Technical Indicator and Industrial Specific Information" Information 12, no. 6: 250. https://doi.org/10.3390/info12060250
APA StylePrachyachuwong, K., & Vateekul, P. (2021). Stock Trend Prediction Using Deep Learning Approach on Technical Indicator and Industrial Specific Information. Information, 12(6), 250. https://doi.org/10.3390/info12060250