How I used a Random Forest Classifier to Day Trade for 2 Months — Part 1

An end-to-end machine learning project.

Michael
Analytics Vidhya

--

Photo by Erik Mclean on Unsplash

Part 1 — Model Summary
Part 2 — Model Deployment & Trading Results (Article)

tl;dr: I fit a random forest classifier on minute-level stock price data to predict profitable day trading positions. With some promising test results, I used the model’s predictions to day trade for 2 months.

Disclaimer: This is not financial advice.

Can money grow on (decision) trees?

Introduction

The time was April 2020. The stock market was in the midst of recovery, after the pandemic-related crash. In this tumultuous climate, hordes of retail investors came onto the scene (including me), hoping to cash in on some market speculation (see: gambling).

I thought this would be the perfect opportunity to work on a fun little Machine Learning (ML) side project; creating and deploying an ML model that predicts profitable day-trading positions. Even if the project did not succeed, it would at least be a nice project for my portfolio.

During my initial research, I found other articles on stock market prediction using complex methods such as time series…

--

--

Michael
Analytics Vidhya

Professional Data Analyst, not so professional Data Scientist — based in SG. linkedin.com/in/michael-ow