Using Machine Learning on Macroeconomic, Technical, and Sentiment Indicators for Stock Market Forecasting

Financial forecasting is a research and practical challenge, providing meaningful economic and strategic insights. While Machine Learning (ML) models are employed in various studies to examine the impact of technical and sentiment factors on financial markets forecasting, in this work, macroeconomic...

Full description

Saved in:
Bibliographic Details
Main Authors: Michalis Patsiarikas, George Papageorgiou, Christos Tjortjis
Format: Article
Language:English
Published: MDPI AG 2025-07-01
Series:Information
Subjects:
Online Access:https://www.mdpi.com/2078-2489/16/7/584
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850078059434082304
author Michalis Patsiarikas
George Papageorgiou
Christos Tjortjis
author_facet Michalis Patsiarikas
George Papageorgiou
Christos Tjortjis
author_sort Michalis Patsiarikas
collection DOAJ
description Financial forecasting is a research and practical challenge, providing meaningful economic and strategic insights. While Machine Learning (ML) models are employed in various studies to examine the impact of technical and sentiment factors on financial markets forecasting, in this work, macroeconomic indicators are also combined to forecast the Standard & Poor’s (S&P) 500 index. Initially, contextual data are scored using TextBlob and pre-trained DistilBERT-base-uncased models, and then a combined dataset is formed. Followed by preprocessing, feature engineering and selection techniques, three corresponding datasets are generated and their impact on future prices is examined, by employing ML models, such as Linear Regression (LR), Random Forest (RF), Gradient Boosting (GB), XGBoost, and Multi-Layer Perceptron (MLP). LR and MLP show robust results with high R<sup>2</sup> scores, close to 0.998, and low error MSE and MAE rates, averaging at 350 and 13 points, respectively, across both training and test datasets, with technical indicators contributing the most to the prediction. While other models also perform very well under different dataset combinations, overfitting challenges are evident in the results, even after additional hyperparameter tuning. Potential limitations are highlighted, motivating further exploration and adaptation techniques in financial modeling that enhance predictive capabilities.
format Article
id doaj-art-d0bb624674e545afa065ffedaaa6fc32
institution DOAJ
issn 2078-2489
language English
publishDate 2025-07-01
publisher MDPI AG
record_format Article
series Information
spelling doaj-art-d0bb624674e545afa065ffedaaa6fc322025-08-20T02:45:38ZengMDPI AGInformation2078-24892025-07-0116758410.3390/info16070584Using Machine Learning on Macroeconomic, Technical, and Sentiment Indicators for Stock Market ForecastingMichalis Patsiarikas0George Papageorgiou1Christos Tjortjis2School of Science and Technology, International Hellenic University, 57001 Thessaloniki, GreeceSchool of Science and Technology, International Hellenic University, 57001 Thessaloniki, GreeceSchool of Science and Technology, International Hellenic University, 57001 Thessaloniki, GreeceFinancial forecasting is a research and practical challenge, providing meaningful economic and strategic insights. While Machine Learning (ML) models are employed in various studies to examine the impact of technical and sentiment factors on financial markets forecasting, in this work, macroeconomic indicators are also combined to forecast the Standard & Poor’s (S&P) 500 index. Initially, contextual data are scored using TextBlob and pre-trained DistilBERT-base-uncased models, and then a combined dataset is formed. Followed by preprocessing, feature engineering and selection techniques, three corresponding datasets are generated and their impact on future prices is examined, by employing ML models, such as Linear Regression (LR), Random Forest (RF), Gradient Boosting (GB), XGBoost, and Multi-Layer Perceptron (MLP). LR and MLP show robust results with high R<sup>2</sup> scores, close to 0.998, and low error MSE and MAE rates, averaging at 350 and 13 points, respectively, across both training and test datasets, with technical indicators contributing the most to the prediction. While other models also perform very well under different dataset combinations, overfitting challenges are evident in the results, even after additional hyperparameter tuning. Potential limitations are highlighted, motivating further exploration and adaptation techniques in financial modeling that enhance predictive capabilities.https://www.mdpi.com/2078-2489/16/7/584machine learningstock marketmacroeconomic indicatorsstock forecastingtechnical analysis
spellingShingle Michalis Patsiarikas
George Papageorgiou
Christos Tjortjis
Using Machine Learning on Macroeconomic, Technical, and Sentiment Indicators for Stock Market Forecasting
Information
machine learning
stock market
macroeconomic indicators
stock forecasting
technical analysis
title Using Machine Learning on Macroeconomic, Technical, and Sentiment Indicators for Stock Market Forecasting
title_full Using Machine Learning on Macroeconomic, Technical, and Sentiment Indicators for Stock Market Forecasting
title_fullStr Using Machine Learning on Macroeconomic, Technical, and Sentiment Indicators for Stock Market Forecasting
title_full_unstemmed Using Machine Learning on Macroeconomic, Technical, and Sentiment Indicators for Stock Market Forecasting
title_short Using Machine Learning on Macroeconomic, Technical, and Sentiment Indicators for Stock Market Forecasting
title_sort using machine learning on macroeconomic technical and sentiment indicators for stock market forecasting
topic machine learning
stock market
macroeconomic indicators
stock forecasting
technical analysis
url https://www.mdpi.com/2078-2489/16/7/584
work_keys_str_mv AT michalispatsiarikas usingmachinelearningonmacroeconomictechnicalandsentimentindicatorsforstockmarketforecasting
AT georgepapageorgiou usingmachinelearningonmacroeconomictechnicalandsentimentindicatorsforstockmarketforecasting
AT christostjortjis usingmachinelearningonmacroeconomictechnicalandsentimentindicatorsforstockmarketforecasting