This study explores the comparative performance of cutting-edge AI models, i.e., Finaance Bidirectional Encoder representations from Transsformers (FinBERT), Generatice Pre-trained Transformer GPT-4, and Logistic Regression, for sentiment analysis and stock index prediction using financial news and the NGX All-Share Index data label. By leveraging advanced natural language processing models like GPT-4 and FinBERT, alongside a traditional machine learning model, Logistic Regression, we aim to classify market sentiment, generate sentiment scores, and predict market price movements. This research highlights global AI advancements in stock markets, showcasing how state-of-the-art language models can contribute to understanding complex financial data. The models were assessed using metrics such as accuracy, precision, recall, F1 score, and ROC AUC. Results indicate that Logistic Regression outperformed the more computationally intensive FinBERT and predefined approach of versatile GPT-4, with an accuracy of 81.83% and a ROC AUC of 89.76%. The GPT-4 predefined approach exhibited a lower accuracy of 54.19% but demonstrated strong potential in handling complex data. FinBERT, while offering more sophisticated analysis, was resource-demanding and yielded a moderate performance. Hyperparameter optimization using Optuna and cross-validation techniques ensured the robustness of the models. This study highlights the strengths and limitations of the practical applications of AI approaches in stock market prediction and presents Logistic Regression as the most efficient model for this task, with FinBERT and GPT-4 representing emerging tools with potential for future exploration and innovation in AI-driven financial analytics
翻译:本研究探讨了前沿人工智能模型——金融领域双向编码器表示(FinBERT)、生成式预训练Transformer GPT-4以及逻辑回归——在利用金融新闻与NGX全股指数数据标签进行情感分析与股指预测中的比较性能。通过整合GPT-4、FinBERT等先进自然语言处理模型与传统机器学习模型逻辑回归,本研究旨在对市场情绪进行分类、生成情感评分并预测市场价格走势。此项研究凸显了人工智能在全球股票市场中的进展,展示了前沿语言模型如何促进对复杂金融数据的理解。模型评估采用了准确率、精确率、召回率、F1分数及ROC AUC等指标。结果表明,逻辑回归在计算效率上优于计算密集型的FinBERT与预设配置的通用GPT-4模型,其准确率达81.83%,ROC AUC为89.76%。GPT-4预设配置的准确率较低(54.19%),但在处理复杂数据方面展现出强大潜力。FinBERT虽能提供更精细的分析,但资源消耗较大且性能表现中等。通过Optuna超参数优化与交叉验证技术确保了模型的稳健性。本研究揭示了人工智能方法在股市预测实际应用中的优势与局限,并提出逻辑回归是本任务中最有效的模型,而FinBERT与GPT-4则代表了人工智能驱动金融分析领域具有未来探索与创新潜力的新兴工具。