Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 2.91 KB

README.md

File metadata and controls

51 lines (35 loc) · 2.91 KB

Summary

An algorithm that combine the output of a neural network and a text analytics analysis to trade stocks. This work is part of our course "Algorithmic trading with Python" at Hult University with Professor Micheal Rolleigh.

Our team had around 4 days to dedicate to this project, during this time we had to:

  1. Get to know each other
  2. Come up with a trading strategy
  3. Find a way to implement it in Python
  4. Backtest it and compare results with a benchmark strategy

Findings

We decided to implement an LSTM model and combine its recommendation with the sentiment analysis on the tweets. In particular we decided to follow the recommendation provided by the LTSM only when the sentiment analysis was recommending the same (either buy or sell). If the 2 models did not agree with each other we would just close all the current positions and take any other position until they agreed with each other again.

At the end, our model had an outstanding performance on the traning data (due to overfitting) and a poor performance in the testing data (compared to benchmark strategy of buying and holding the assets). However, combining the LSTM model with the sentiment analysis allowed us to achieve a better performance than either of the models taken alone.

Team

Felipe Domingues
Manuel Echazarra
Nicola Bini
Tri Dung Dinh

Stocks traded

Screenshot 2021-06-17 at 3 53 46 PM

LSTM model

Screenshot 2021-06-17 at 3 54 34 PM

Performance of the LSTM model on training data

Screen Shot 2021-09-19 at 9 29 27 PM )

Performance of the LSTM model on testing data

Screenshot 2021-06-17 at 3 58 18 PM

Performance of all the tested models on testing data

Screenshot 2021-06-21 at 12 59 35 PM

Presentation pictures

35e8e755-f1d6-4658-963f-cfd78b286cf1 210ba7ac-1c24-4402-baea-463737e1d4dd da9632a0-3693-47b9-b3bb-78b522afb3fb 5c7709e1-dafe-41d0-ae42-b250d1a2a03e