Master's Thesis

Dynamic Ensemble of Specialized Models for Multi-Timeframe Stock Market Trend Prediction

João Miguel Pipa Ferreira Caldeira2024

Key information

Authors:

João Miguel Pipa Ferreira Caldeira (João Miguel Pipa Ferreira Caldeira)

Supervisors:

Rui Fuentecilla Maia Ferreira Neves (Rui Fuentecilla Maia Ferreira Neves)

Published in

10/31/2024

Abstract

This thesis addresses the challenge of using machine learning to predict stock market trends, by developing a novel dual-model architecture, DTE-2SVM, which separates long-term and short-term trends, utilizing specialized SVMs for each to predict the S&P 500 index. The system aims to handle the stock market’s inherent volatility, and complexity by decomposing the market behavior using different scopes of observation, creating distinct strategies enhancing responsiveness and predictive capacity in both bullish and bearish market conditions. To further refine the dual-model approach, a hyperparameter tuning process is employed separately, for each trend model. Additionally, an enhanced data labeling method based on an N-Period Min-Max algorithm is introduced, which captures the markets fluctuations through the identification of critical points, local maxima and minima. The DTE-2SVM system is evaluated through case studies, addressing the key aspects of the proposed solution. Findings reveal that DTE-2SVM significantly outperforms both traditional machine learning models and the benchmark buy-and-hold strategy, achieving a 204.31% return on investment, above the buy-and-hold’s 132.11%, on the S&P 500 index between 2015 and 2023. Additionally, the system demonstrates consistent returns and effective risk management, highlighting its robustness in diverse market conditions. Moreover, the research highlights the significance of hyperparameter tuning in enhancing the model’s performance and profitability results.

Publication details

Authors in the community:

Supervisors of this institution:

Fields of Science and Technology (FOS)

electrical-engineering-electronic-engineering-information-engineering - Electrical engineering, electronic engineering, information engineering

Publication language (ISO code)

eng - English

Rights type:

Embargo lifted

Date available:

09/06/2025

Institution name

Instituto Superior Técnico