← Back to Home

Trading Strategy Evaluation

ML-based trading system using ensemble methods (BagLearner with Random Trees) to predict stock movements, with full backtesting simulation including transaction costs.

View on GitHub
Trading Strategy Evaluation

Overview

A comprehensive machine learning project for developing and evaluating automated trading strategies. The project implements ensemble learning using bagging with random decision trees, calculates technical indicators, and simulates market conditions with realistic transaction costs to develop profitable trading strategies.

Technologies

PythonMachine LearningEnsemble Methods (Bagging)Random TreesPandasNumPyTechnical Analysis

Key Features

  • BagLearner ensemble implementation from scratch
  • RTLearner (Random Tree) for trading signals
  • Technical indicators (SMA, Bollinger Bands, RSI, MACD)
  • Market simulation with transaction costs and slippage
  • Strategy backtesting with walk-forward analysis
  • Performance metrics (Sharpe ratio, cumulative returns, max drawdown)

Challenges

Designing effective feature engineering pipelines for financial data, implementing ensemble learning methods without external ML libraries, handling look-ahead bias in backtesting, and optimizing strategy parameters for out-of-sample performance.

Results

Bagged-Random-Tree learner (BagLearner over RTLearner) trained on 4 technical indicators (SMA, Bollinger Bands, RSI, MACD) materially outperformed a buy-and-hold benchmark in walk-forward backtests with realistic transaction costs and slippage.

Book a 15-min call

© 2026 Maxwell Vaglica. All rights reserved.

Maxwell Vaglica — Data & AI/ML Engineer