Portfolio Optimization with Machine Learning: Predicting Market Returns and Portfolio Weights
2025 (English)Independent thesis Advanced level (professional degree), 20 credits / 30 HE credits
Student thesis
Abstract [en]
Portfolio optimization is a central problem in finance, with traditional approaches often relying on forecasts of expected returns and covariances. With the growing adoption of machine learning in finance, return forecasting using ML techniques has become increasingly common. More recently, an alternative approach has been proposed where the portfolio weights are learned directly, bypassing the need to predict returns explicitly. Despite growing interest, there exists limited empirical work comparing these two methods, using different models and hyperparameter settings.
This thesis investigates and compares two machine learning-based approaches to portfolio optimization for futures contracts: a benchmark method that predicts future market returns, and a direct method that estimates portfolio weights without explicit return forecasts. Both methods are implemented using linear regression, multilayer perceptrons (MLPs), and extreme gradient boosting (XGBoost), with systematic hyperparameter tuning. The models are evaluated on both in-sample and out-of-sample periods, using risk-adjusted performance metrics such as Sharpe ratio, NCVaR, and maximum drawdown.
The results show that short return windows and moderate regularization improve generalization, and that simpler model architectures often yield better out-of-sample performance. Neither the benchmark nor the direct method was a clear winner in terms of cumulative risk-adjusted returns; the performances heavily depend on the machine learning model used, as well as the hyperparameters. One of the best results in terms of Sharpe, was achieved by combining predictions from both the benchmark and direct method with several machine learning models.This illustrates the value of ensemble approaches in financial modeling and suggests that rather than competing, return-based and direct methods can complement each other to improve portfolio performance.
Place, publisher, year, edition, pages
2025. , p. 61
Series
UPTEC F, ISSN 1401-5757 ; 25063
Keywords [en]
machine learning, optimization, quantitative finance, hedge fund, futures, trading
National Category
Probability Theory and Statistics Artificial Intelligence Other Computer and Information Science
Identifiers
URN: urn:nbn:se:uu:diva-562774OAI: oai:DiVA.org:uu-562774DiVA, id: diva2:1979736
External cooperation
Lynx Asset Management AB
Educational program
Master Programme in Engineering Physics
Supervisors
Examiners
2025-07-012025-06-302025-07-01Bibliographically approved