Integrating Machine Learning Methods for the Prediction in Online Portfolio Selection Problems

Zhonglin Liu, Yichuan Zhao, Benmeng Lyu, Wai‐Ki ChingThe Proceedings of the International Conference on Applied Research in Business, Management and Economics 2025 · DOI

TL;DR

This paper explores how advanced machine learning techniques, specifically LSTM and XGBoost, can improve online portfolio selection (OLPS) by enhancing asset price prediction. By integrating these ML models with traditional optimization strategies, the researchers demonstrate significant gains in cumulative wealth and risk-adjusted returns compared to conventional methods, with LSTM-based approaches generally showing superior performance.

What Problem Does This Paper Address?

Online Portfolio Selection (OLPS) is a crucial problem in computational finance. It involves dynamically adjusting investment allocations over time as new market information becomes available, with the ultimate goal of maximizing final cumulative returns. A key challenge in OLPS is accurately predicting future asset prices to inform these allocation decisions. Traditional methods often struggle with the inherent non-linearity and complexity of financial data. This paper aims to bridge this gap by investigating whether integrating sophisticated machine learning models, known for their ability to capture complex patterns, can lead to more effective OLPS strategies than existing approaches.

Methods

The core of this research lies in combining advanced prediction models with established portfolio optimization techniques.

Prediction Models: * Long Short-Term Memory Networks (LSTM): A type of recurrent neural network specifically designed to handle sequential data and long-term dependencies, making it well-suited for time-series forecasting of asset prices. * Extreme Gradient Boosting (XGBoost): A gradient boosted regression tree algorithm known for its efficiency and ability to model complex relationships in data, also applied to asset price prediction. * Exponential Moving Average (EMA): A traditional time-series forecasting method used as a baseline for comparison.

Optimization Models: * Mean-Variance (MV): A classic model that balances maximizing expected returns with minimizing risk (variance). * Max-Return (MaxRet): A simpler model that focuses solely on maximizing expected returns, effectively setting the risk-aversion parameter to zero. * On-Line Moving Average Reversion (OLMAR): An approach that leverages mean reversion principles to adjust portfolios, aiming to maximize returns while keeping adjustments to the original allocation minimal.

The researchers combine each prediction model (LSTM, XGBoost, EMA) with each optimization model (MV, MaxRet, OLMAR), resulting in nine distinct OLPS models.

Datasets

The study utilizes three publicly available financial datasets:

  • NYSE-O': A subset of the NYSE-O dataset, comprising 36 American stocks.
  • NYSE-N': A subset of the NYSE-N dataset, comprising 23 American stocks.
  • TSE': A subset of the TSE dataset, comprising 88 Canadian stocks.

Each dataset consists of 504 consecutive daily trading data points. The latest 252 trading days are used for training the prediction models.

Key Insights and Ideas

  • ML models offer a significant advantage: The integration of machine learning models, particularly LSTM, demonstrably improves OLPS performance over traditional EMA methods.
  • LSTM shines in sequential data: LSTM's architecture is highly effective at capturing the temporal dependencies in financial time series, leading to consistently strong results across various optimization strategies and datasets.
  • XGBoost's performance is context-dependent: While XGBoost can outperform EMA, its effectiveness with OLPS varies significantly based on the chosen optimization model and the specific dataset. It can be a strong contender, especially when additional features are incorporated.
  • Complementary strengths: The study suggests that LSTM and XGBoost might capture different aspects of market dynamics, hinting at potential benefits from combining them or using them in ensemble approaches.
  • OLMAR + LSTM is a powerful combination: The OLMAR optimization model, when paired with LSTM for prediction, consistently yields the best results across all evaluation metrics, highlighting the synergy between advanced prediction and a mean-reversion-based strategy.

Key Results

The performance of the nine OLPS models was evaluated using final cumulative wealth, Sharpe ratio (risk-adjusted return), and Calmar ratio (return per unit of drawdown).

  • Final Cumulative Wealth: LSTM-based models generally achieved higher cumulative wealth. For instance, the LSTM+MV model on the TSE' dataset increased initial wealth by nearly five times.
  • Sharpe Ratio: LSTM-based models consistently delivered superior risk-adjusted returns. The OLMAR (LSTM) model showed the best performance across all datasets. XGBoost+MaxRet performed exceptionally well on NYSE-O', while XGBoost+MV led on NYSE-N'.
  • Calmar Ratio: Similar to the Sharpe ratio, LSTM-based models, especially OLMAR (LSTM), dominated, showcasing their ability to provide stable and superior risk-adjusted returns even under volatile conditions. The highest Calmar ratio was achieved by LSTM+MV on the TSE' dataset.

Limitations and Future Work

The authors acknowledge several limitations:

  • No transaction costs or price impact: The study does not account for real-world trading frictions like transaction fees or the impact of large trades on market prices.
  • Focus on prediction stage: While the study integrates ML into the prediction stage, the impact of these models on the optimization process itself was not deeply explored.

Future research directions suggested include:

  • Incorporating transaction costs and price impact: Evaluating OLPS models under more realistic market conditions.
  • Exploring feature engineering for XGBoost: Investigating alternative or additional features to enhance XGBoost's predictive power.
  • Investigating ML impact on optimization: Further research into how ML techniques can directly influence or improve the optimization algorithms within OLPS.
  • Ensemble methods: Developing more sophisticated integrated models that combine the strengths of LSTM and XGBoost.

Summary updated

Abstract

Online portfolio selection (OLPS) is a critical issue in computational finance. It sequentially updates portfolio allocations across multiple investment periods as new information becomes available. The main objective of OLPS is to maximize the final cumulative return, typically achieved through asset price prediction and portfolio optimization steps in each investment period. The properties of financial data, such as non-linearity, make certain machine learning methods applicable to the problem with potential benefits. To explore the effectiveness of integrating machine learning methods on OLPS, this work employs two machine learning models, the Long Short-Term Memory Networks (LSTM) and Extreme Gradient Boosting (XGBoost), on the asset price forecasting stage. These models are integrated with three optimization models: Mean-Variance, Max-Return, and On-Line Moving Average Reversion (OLMAR) to facilitate the decision-making process. For comparison purpose, a traditional price forecasting approach, the Exponential Moving Average (EMA) model, is utilized with the same optimization models as control groups. Numerical experiments are conducted using three commonly used public datasets, and the performance of the OLPS models is evaluated in terms of both final cumulative wealth and risk-adjusted return. The results indicate the advantages of incorporating machine learning models in various circumstances. Among the nine OLPS models, LSTM-based models outperform others in most scenarios. However, the effectiveness of XGBoost-based models varies depending on the optimization models and datasets used.
BibTeX
@inproceedings{liu2025integrating,
  author = {Zhonglin Liu and Yichuan Zhao and Benmeng Lyu and Wai‐Ki Ching},
  title = {{Integrating Machine Learning Methods for the Prediction in Online Portfolio Selection Problems}},
  booktitle = {The Proceedings of the International Conference on Applied Research in Business, Management and Economics},
  year = {2025},
  doi = {10.33422/bmeconf.v2i1.1015},
}
Figure