Bayesian-Optimized Ensemble Learning for Multi-Class Trading Signal Classification
Abstract
<jats:p xml:lang="en">This study tests a practical machine-learning pipeline to predict daily Buy/Hold/Sell trading signals for Apple (AAPL) and to assess whether “good classification” also yields good trading returns after costs. The dataset is built from synchronized daily market series and AAPL-based technical indicators. The target signal is generated by a transparent rule using MACD relative to its signal line and an RSI filter, so the task is a supervised three-class classification problem. Four tree-based ensemble models are compared: Random Forest, LightGBM, XGBoost, and AdaBoost. To avoid fragile, hand-picked settings, each model is tuned with a systematic search procedure. Because the raw labels are strongly imbalanced, SMOTE is applied for training, while all performance and economic tests are run on the original time-ordered test period to keep the evaluation realistic. The results show a clear ranking. XGBoost delivers the best overall classification quality (Accuracy 0.974, Precision 0.975, Recall 0.974, F1 0.974). LightGBM and Random Forest follow at similarly high levels, while AdaBoost is much weaker (Accuracy 0.668, F1 0.536) despite relatively higher precision (0.779), meaning its predictions are not well balanced across classes. Confusion-matrix evidence supports this: the strong models classify Buy and Sell almost perfectly, and most remaining errors come from the Hold class. AdaBoost, however, fails to detect Hold and instead generates many Buy/Sell signals on Hold days. Economic backtests confirm the same story under realistic transaction costs and initial capital. Trading on predicted signals yields +49.1% for XGBoost, +46.1% for LightGBM, and +44.9% for Random Forest. AdaBoost loses money (−11.3%), with worse risk outcomes (Sharpe −0.10, max drawdown 29.0%) and heavier trading (about 68 trades, higher total costs). Overall, modern gradient-boosting ensembles are both statistically strong and economically more credible for this signal design.</jats:p>
Meet DeepDyve
Get unlimited, instant access to over 150 million full-text scientific articles for less than the price of buying a single PDF.