Inspiration

With COVID-19 and the restriction of not being able to leave our houses and visit our friends as much, some of us needed a job, lost a previous job, were interested in the stock market, and just generally bored out of our minds. We all started investing in the stock market, and with our backgrounds in Machine Learning, HTML, and Python we realized we could integrate our coding knowledge with our knowledge of the stock market, and maybe make some money while having fun!

What it does

Our model is an LSTM Model, a subset of neural networks, and when a specific stock ticker is inputted into the website, the model uses this stock's entire price history to make highly accurate predictions for the stock's price in the next 30 days. The sentiment analysis model uses finviz to find news about a stock, then uses BeautifulSoup to scrape information about the stock. The scraped information is summed up for every news article for a specific stock and then averaged, which gives us an idea about whether the stock will trend upward or downward based on news about it.

How we built it

We built the LSTM Model by using a data reader and yahoo finance. We created a testing and training split and then trained the Sequential LSTM model on the training data and then tested it through the testing data. This LSTM Model creates predictions for the stock prices 30 days into the future. The sentiment analysis model uses finviz to find news about a stock, then uses BeautifulSoup to scrape information about the stock. The scraped information is summed up for every news article for a specific stock and then averaged, giving us an idea about whether the stock will trend upward or downward based on news about it.

Challenges we ran into

We first had to choose which Deep Learning Model to use, and another issue was our chosen collaborative IDE, Repl.it, couldn't run TensorFlow properly. We had to find an alternative collaborative IDE, which was DeepNote. After we came to the conclusion of using LSTM, we had to adjust our model to predict for the next 30 days rather than just the next day. Then, we had to readjust the model to change the RMSE, by manipulating epochs and batch sizes. The biggest issue was that we were not able to get the website running properly mainly due to an error in repl.it that prevented Flask from running properly. We also couldn't integrate our front-end and back-end coding.

Accomplishments that we're proud of

We were able to successfully deploy an LSTM model into a multiplayer server, and make accurate predictions for stock prices, as demonstrated by our RMSE value and our matplotlib graphs. We also successfully created a sentiment analysis model.

What we learned

We learned about methods, syntax, and efficient ways of accomplishing certain tasks for css for web development, html, and also the python matplotlib package. We learned a lot about Neural Networks and how they worked, and we also learned a lot about RNNs and GRUs and about how to create a sentiment analysis model.

What's next for Stock Market Analysis

The biggest priority moving forward would be fixing the website so that it can run anywhere, not just on that specific local machine, and also integrating our front-end and back-end coding so that the submit button on the website works. Additionally, we would like to make our model stronger.

Built With

Share this project:

Updates