Diaz-Rodriguez, JairoFernandez Mendez, Blanca Elvira2025-11-112025-11-112025-08-052025-11-11https://hdl.handle.net/10315/43278Stock price prediction is a common and complex problem due to the high volatility of financial markets. This master’s thesis presents a new approach to stock price forecasting by reformulating the problem as a multiclass classification task. The main objective is to predict which stock will yield the highest return the next day within a given set of features. To this end, various statistical and machine learning models are analyzed, with special emphasis on the Transformer model due to its relevance and alignment with the structure of this work. The present study proposes a novel idea to address the problem. Its contributions stand out in an initial exploratory analysis of model performance, as well as in risk minimization in investments, enabling portfolio diversification thanks to the Transformer model.Author owns copyright, except where explicitly noted. Please contact the author directly with licensing requests.Applied mathematicsForecasting the Next Winning Stock: A Comparative Analysis of Machine Learning ModelsElectronic Thesis or Dissertation2025-11-11Forecasting stocksNASDAQMachine learningLSTMTransformersTransformer models