Inspiration

I've been fascinated with the stock market ever since my dad introduced me to investing in middle school. Since then, I've wondered what forces drive the trends that make the stock market so volatile. This volatility prevents the most seasoned of investors from beating the market consistently, year after year. Recently, I've been diving deeper and deeper into the field of machine learning and wondered if AI could help predict trends that humans can't.

What it does

Forecast allows the user to select a stock they want to analyze. Then, it downloads the required data for the stock and displays a table containing things like date, closing price, and other various values. Beneath that, there is a graph containing the actual closing prices for the stock, along with what my LSTM model predicts the closing prices will be. Underneath that lies a graph of the predicted closing price values for n years into the future of the selected stock.

How I built it

I used TensorFlow and Keras to create a 6-layer LSTM (Long Short Term Memory) neural network. It was trained on stock closing prices from the last 7 years downloaded from Yahoo Finance for 100 epochs. For the frontend, I utilized Streamlit. To visualize the data, I used Matplotlib. I used Twilio to allow users to contact me with any feedback.

Challenges I ran into

Inputting all of the data was definitely challenging for me. This was also my first time utilizing TensorFlow and Keras to create a model.

Accomplishments that I'm proud of

I'm proud of the accuracy of my first LSTM model given the amount of time I had to create it. This was also my first time creating a model with TensorFlow and Keras, as well as my first time actually implementing a model created in Python.

What I learned

I learned how to develop a ML model using TensorFlow and Keras. I also learned how to utilize Streamlit to create a UI on a local site, and how to use Twilio to implement messaging into an app.

What's next for Forecast

I will increase the accuracy of my model and make changes to the UI. Once I complete these things among other small changes, I will make Forecast publicly available in the form of a website.

Built With

Share this project:

Updates