Market Trading Strategy Learner

Python
Machine Learning
Predictive Modeling
Finance
A project for my CS 7646: Machine Learning for Trading course where I built and evaluated an algorithmic trading strategy using a custom-implemented bagged random forest model.
Author

Christopher Hynes

Published

April 14, 2024

Read the Paper (PDF)

Project Overview

This was the final project for my CS 7646: Machine Learning for Trading course at Georgia Tech. It develops and evaluates algorithmic trading strategies using technical indicators and machine learning. The primary goal was to build a “strategy learner” that could be trained on historical market data to generate profitable trading signals. The result was a fantastic learning experience and a stark reminder that I shouldn’t become a day trader just yet. The project involved implementing core components from scratch, including a market simulator and a bagged random tree learning algorithm.


Key Implementations

  • Custom Algorithm Development: Implemented a decision tree and a bagged random tree learning algorithm from scratch in Python.
  • Market Simulator: Created a basic market simulator to process stock trade orders (buy/sell) and track the value of a portfolio over time.
  • Technical Indicator Engine: Implemented several technical indicators to generate trading signals from historical price data, including Bollinger Bands (%B), Relative Strength Index (RSI), and a custom-designed volatility indicator (%ATR).
  • Strategy Learner: Used the technical indicators as features to train the bagged random tree model, optimizing it to maximize risk-adjusted returns.
  • Comparative Analysis: Conducted a thorough performance comparison between the machine-learning-driven strategy, a manually tuned strategy, and a benchmark buy-and-hold strategy on out-of-sample data.

Tech Stack & Methodology

  • Core Language & Libraries: Python, NumPy, Pandas
  • Machine Learning: Custom-built Bagged Random Forest
  • Financial Analysis: Technical indicators including %B, RSI, and a custom %ATR indicator.