While searching for projects to work on, we considered creating a budget app, a checksum app, a clothing app, and a stock predictor app. We initially agreed to work on a checksum app. Upon realizing we didn't have enough experience to work on it, we subsequently agreed to work on the stock predictor web app. The project seemed feasible within our experience and our three-week timeline.

What it does

The web app takes the historical price of a stock and predicts the stock price one day ahead of the end date. For example, a user can select the dataset from 2011-07-08 and end on 2016-03-04. The web app will predict the stock price for 2016-03-05 and will display the actual price of that date. It visualizes a similar LSTM prediction model we built.

How we built it

To build the stock predictor web app, we first had to rely on a stock prediction machine learning model. We built the base of our model on Google Colab by following a video tutorial and modified it to make it more accurate. The current version on Google Colab is our modified version.

After building the model, we began to work on the front end of our web app. We created a basic UI with Figma. To built the web app, we decided to build the front end with Flask by following this tutorial. We decided on Flask since we built our model with Python. A Replit of our Flask progress can be found here. After facing some challenges with Flask, we turned to Streamlit to create our web app. Although not as customizable as Flask, Streamlit allowed us to create an effective web app with minimal code and time.

Challenges we ran into

We initially had some challenges with time zones. Some team members were overseas, so we set up a when2meet to decide on team meetings. We further created a Discord group chat for instant message communication.

When following the tutorial to create the machine learning mode, we could not use the API the tutorial used. To circumvent this, we looked for alternative APIs and eventually landed on the yfinance API.

When working with Flask on Replit, we could not get the HTML form to connect with our model. In addition, we became short on time with creating the correct UI we initially planned. We resolved this by switching development to Streamlit.

While working with Streamlit, we had to run the model locally on our machines. Since the model runs with Tensorflow, we had to install it on our machines. However, some of us had issues installing TensorFlow. One of us circumvented this issue by downgrading python versions and creating a new virtual environment whilst importing a newer version of TensorFlow.

Built With

  • colab
  • figma
  • python
  • replit
  • streamlit
  • tensorflow
  • vscode
  • yfinance
Share this project: