This study predicts daily returns of the Nigerian Stock Exchange (NSE) using Nigerian daily news headline. The Vanguard newspaper is used as the source of information, to collate 11 years (2February 2, 2012 to September 29, 2023) of daily news headlines and data on the daily returns All-Shares Index (ASI) of the Nigerian Stock Exchange NSE was collared from the website https://ng.investing.com/indices/nse-all-share-historical-data. Text mining techniques such as Term Frequency-Inverse Document Frequency (TF-IDF) are applied to pre-determine important words and sentences and their influences on daily market returns. N-gram sentences are used to build bigrams and trigrams, which helps us determine their positive and negative returns. The result shows that when words such arabia, crypto, renewal, paris, and tradermoni appear in news headlines, there is negative returns in the stock market, but when words such as lawmakers, multinationals, ebonyi, constraints and double appear in the news headline, there is positive return. For bi-gram sentences when sentences such as price dip, earning rise, tax compliance, and econbank partners appear, there is often negative return, on the other hand when sentences such as trustfunds pensions, inter agency, business insurance, index rise and forex supply appear in the news headline, there is often positive return. And for tri-gram sentences, when sentences such as profit taking NSE, government private sector, cross boarder trade, cargo tracking note, and capital market sec, there is often negative return in NSE, on the other hand, when sentence such as poor purchasing power, naira watch cbn, mtn google empower, google empower smes and external reserve hit appear in the news headlines, there is often a positive returns in the stock market. Three machine-learning models were used to build the predictive models. The models were logistic regression with a prediction accuracy of 0.52, Support Vector Machine (SVM) with an accuracy of 0.51, and K-nearest Neighbour (KNN) with an accuracy of 0.99, indicating higher prediction evidence of news headlines by the KNN model for the NSE index over the alternative models. We limited fitting the models using only unigrams and left fitting models using bigrams and trigram sentences for future research.
Published in | Science Journal of Applied Mathematics and Statistics (Volume 12, Issue 6) |
DOI | 10.11648/j.sjams.20241206.11 |
Page(s) | 90-98 |
Creative Commons |
This is an Open Access article, distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution and reproduction in any medium or format, provided the original work is properly cited. |
Copyright |
Copyright © The Author(s), 2024. Published by Science Publishing Group |
Nigerian Stock Market, News Headlines, Machine Learning Models, Term Frequency-Inverse Document Frequency
[1] | Abe, M., & Nakayama, H. (2018). Deep learning for forecasting stock returns in the cross-section. In Advances in Knowledge Discovery and Data Mining: 22nd Pacific-Asia Conference, PAKDD 2018, Melbourne, VIC, Australia, June 3-6, 2018, Proceedings, Part I 22 (pp. 273-284). Springer International Publishing. |
[2] | Afego, P. N. (2017). Effects of changes in stock index compositions: A literature survey. International Review of Financial Analysis, 52, 228-239. |
[3] | Atoi, N. V. (2014): Testing Volatility in Nigeria Stock Market using GARCH Models. CBN Journal of Applied Statistics Vol. 5 No. 2. |
[4] | Chenglin, X., Weili, X. & Jijiao, J. (2020). Stock price forecast based on combined model of ARI-MA-LS-SVM. Neural Computing and Applications |
[5] | Feldman, R., & Sanger, J. (2007). The text mining handbook: advanced approaches in analyzing unstructured data. Cambridge university press. |
[6] | Ibrahim, O. Sikiru (2017). Forecasting the Volatilities of the Nigeria Stock Market Prices. CBN Journal of Applied Statistics 8(2); 23-45. |
[7] | Isenah, M. G. and Olubusoye O. E. (2014). Forecasting Nigerian Stock Market Returns using ARIMA and Artificial Neural Network Models. CBN Journal of Applied Statistics 5(2); 25-48. |
[8] | Kohara K, Ishikawa T, Fukuhara Y, Nakamura Y. Stock price prediction using prior knowledge and neural networks. Intelligent Systems in Accounting, Finance & Management. 1997; 6(1): 11–22. |
[9] | Kuiken, J., Schuth, A., Spitters, M., & Marx, M. (2017). Effective headlines of newspaper articles in a digital environment. Digital Journalism, 5(10), 1300-1314. |
[10] | Kwartler, T. (2017). Text mining in practice with R. John Wiley & Sons. |
[11] | Li, B., Chan, K. C., Ou, C., & Ruifeng, S. (2017). Discovering public sentiment in social media for predicting stock movement of publicly listed companies. Information Systems, 69, 81-92. |
[12] | Moh, M., Gajjala, A., Gangireddy, S. C. R., & Moh, T. S. (2015, December). On multi-tier sentiment analysis using supervised machine learning. In 2015 IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology (WI-IAT) (Vol. 1, pp. 341-344). IEEE. |
[13] | Mittermayer, M. A. (2004, January). Forecasting intraday stock price trends with text mining techniques. In 37th Annual Hawaii International Conference on System Sciences, 2004. Proceedings of the (pp. 10-pp). IEEE. |
[14] | Nwabueze, C., Okafor, I., & Obiakor, C. Exposure to Economic News on News Tickers and its Influence on Perception of Nigeria Economy by Television Audience in Awka. |
[15] | Olley, O. W. (2015). Readers' perception of Nigerian newspapers on the internet. In Journal of Philosophy, Culture and Religion (Vol. 4, pp. 26-34). |
[16] | Osisanwo, B. G., & Atanda, A. A. (2012). Determinants of stock market returns in Nigeria: a time series analysis. African Journal of Scientific Research, 9(1). |
[17] | Shahi TB, Shrestha A, Neupane A, Guo W. Stock price forecasting with deep learning: A comparative study. Mathematics. 2020; 8(9): 1441. |
[18] | Srivastava, A. N., & Sahami, M. (2009). Text mining: Classification, clustering, and applications. Chapman and Hall/CRC. |
[19] | Uzuke, C. A., & Daniel, J. (2016). Timeseries Analysis of All Shares Index of Nigerian Stock Exchange: A Box-Jenkins Approach. International Journal of Sciences, 5(06), 23-38. |
[20] | Yaya, O. S. (2013). Nigerian Stock Index: A Search for Optimal GARCH Model using High Frequency Data. CBN Journal of Applied Statistics, 4(2): 69-85. |
[21] | Yaya, O. S., Bada, A. S. and Atoi, N. V. (2016). Volatility in the Nigerian Stock Market: Empirical Application of Beta-t-GARCH Variants. CBN Journal of Applied Statistics, 7(2): 27-48. |
APA Style
Ayantse, C., Yaya, O. S., Joseph, O. U., Arawomo, D. F. (2024). Predicting Nigerian Stock Market Returns Based on Daily Business News Headlines. Science Journal of Applied Mathematics and Statistics, 12(6), 90-98. https://doi.org/10.11648/j.sjams.20241206.11
ACS Style
Ayantse, C.; Yaya, O. S.; Joseph, O. U.; Arawomo, D. F. Predicting Nigerian Stock Market Returns Based on Daily Business News Headlines. Sci. J. Appl. Math. Stat. 2024, 12(6), 90-98. doi: 10.11648/j.sjams.20241206.11
@article{10.11648/j.sjams.20241206.11, author = {Cornelius Ayantse and OlaOluwa Simon Yaya and Okeke Uchenna Joseph and Damilola Felix Arawomo}, title = {Predicting Nigerian Stock Market Returns Based on Daily Business News Headlines }, journal = {Science Journal of Applied Mathematics and Statistics}, volume = {12}, number = {6}, pages = {90-98}, doi = {10.11648/j.sjams.20241206.11}, url = {https://doi.org/10.11648/j.sjams.20241206.11}, eprint = {https://article.sciencepublishinggroup.com/pdf/10.11648.j.sjams.20241206.11}, abstract = {This study predicts daily returns of the Nigerian Stock Exchange (NSE) using Nigerian daily news headline. The Vanguard newspaper is used as the source of information, to collate 11 years (2February 2, 2012 to September 29, 2023) of daily news headlines and data on the daily returns All-Shares Index (ASI) of the Nigerian Stock Exchange NSE was collared from the website https://ng.investing.com/indices/nse-all-share-historical-data. Text mining techniques such as Term Frequency-Inverse Document Frequency (TF-IDF) are applied to pre-determine important words and sentences and their influences on daily market returns. N-gram sentences are used to build bigrams and trigrams, which helps us determine their positive and negative returns. The result shows that when words such arabia, crypto, renewal, paris, and tradermoni appear in news headlines, there is negative returns in the stock market, but when words such as lawmakers, multinationals, ebonyi, constraints and double appear in the news headline, there is positive return. For bi-gram sentences when sentences such as price dip, earning rise, tax compliance, and econbank partners appear, there is often negative return, on the other hand when sentences such as trustfunds pensions, inter agency, business insurance, index rise and forex supply appear in the news headline, there is often positive return. And for tri-gram sentences, when sentences such as profit taking NSE, government private sector, cross boarder trade, cargo tracking note, and capital market sec, there is often negative return in NSE, on the other hand, when sentence such as poor purchasing power, naira watch cbn, mtn google empower, google empower smes and external reserve hit appear in the news headlines, there is often a positive returns in the stock market. Three machine-learning models were used to build the predictive models. The models were logistic regression with a prediction accuracy of 0.52, Support Vector Machine (SVM) with an accuracy of 0.51, and K-nearest Neighbour (KNN) with an accuracy of 0.99, indicating higher prediction evidence of news headlines by the KNN model for the NSE index over the alternative models. We limited fitting the models using only unigrams and left fitting models using bigrams and trigram sentences for future research. }, year = {2024} }
TY - JOUR T1 - Predicting Nigerian Stock Market Returns Based on Daily Business News Headlines AU - Cornelius Ayantse AU - OlaOluwa Simon Yaya AU - Okeke Uchenna Joseph AU - Damilola Felix Arawomo Y1 - 2024/11/22 PY - 2024 N1 - https://doi.org/10.11648/j.sjams.20241206.11 DO - 10.11648/j.sjams.20241206.11 T2 - Science Journal of Applied Mathematics and Statistics JF - Science Journal of Applied Mathematics and Statistics JO - Science Journal of Applied Mathematics and Statistics SP - 90 EP - 98 PB - Science Publishing Group SN - 2376-9513 UR - https://doi.org/10.11648/j.sjams.20241206.11 AB - This study predicts daily returns of the Nigerian Stock Exchange (NSE) using Nigerian daily news headline. The Vanguard newspaper is used as the source of information, to collate 11 years (2February 2, 2012 to September 29, 2023) of daily news headlines and data on the daily returns All-Shares Index (ASI) of the Nigerian Stock Exchange NSE was collared from the website https://ng.investing.com/indices/nse-all-share-historical-data. Text mining techniques such as Term Frequency-Inverse Document Frequency (TF-IDF) are applied to pre-determine important words and sentences and their influences on daily market returns. N-gram sentences are used to build bigrams and trigrams, which helps us determine their positive and negative returns. The result shows that when words such arabia, crypto, renewal, paris, and tradermoni appear in news headlines, there is negative returns in the stock market, but when words such as lawmakers, multinationals, ebonyi, constraints and double appear in the news headline, there is positive return. For bi-gram sentences when sentences such as price dip, earning rise, tax compliance, and econbank partners appear, there is often negative return, on the other hand when sentences such as trustfunds pensions, inter agency, business insurance, index rise and forex supply appear in the news headline, there is often positive return. And for tri-gram sentences, when sentences such as profit taking NSE, government private sector, cross boarder trade, cargo tracking note, and capital market sec, there is often negative return in NSE, on the other hand, when sentence such as poor purchasing power, naira watch cbn, mtn google empower, google empower smes and external reserve hit appear in the news headlines, there is often a positive returns in the stock market. Three machine-learning models were used to build the predictive models. The models were logistic regression with a prediction accuracy of 0.52, Support Vector Machine (SVM) with an accuracy of 0.51, and K-nearest Neighbour (KNN) with an accuracy of 0.99, indicating higher prediction evidence of news headlines by the KNN model for the NSE index over the alternative models. We limited fitting the models using only unigrams and left fitting models using bigrams and trigram sentences for future research. VL - 12 IS - 6 ER -