Algorithmic Trading using LSTM
Algorithmic stock trading involves using automated strategies that are usually impossible for human traders. This project involves 1. Technical Strategies, where rule based processes are triggered based on meeting certain conditions including but not limited to trend breakouts, overbought/oversold, support/resistances, and target percent gain, and 2. Machine Learning Strategy, where the model learns the latent trend and patterns from interaction between technical indicators, macro economic indicators, and text vectors of public and publisher sentiment around the Symbol of interest. Due to the competitive nature of Algo trading, source code is hidden from the public to protect its viability. However, the diagram below should illustrate the high level architecture. Source code may be temporarily shared upon applicable request.
Tools Used
Python, SkLearn, PyTorch
Category
Deep Learning / Automation
Date
May 31, 2024
Challenge
As an 8+ year hobby stock trader, I've achieved small but consistent successes. However, time constraints have limited my gains, especially as my career and personal life progressed. To overcome this, I aim to automate my strategies and enhance them using my data science skills.
Solution
I used an ensemble of off-the-shelf encoder-only transformer model and Long Short-Term Memory (LSTM) model to discover patterns in the sequential nature of stock data. Combined with other rule based technical triggers, the final strategy was back-tested and is currently being forward-tested on a paper trading platform. The trading bot is planned to be deployed on a cloud virtual machine.