NBIStockForecast

Inspiration

Stock price forecasting is a challenging and intriguing problem, especially in short-term scenarios where volatility is high and decisions must be made quickly. Our goal was to build a robust, user-friendly solution to empower individuals and investors with short-term stock trend predictions.

What it does

Our LSTM model is trained on financial data to predict short-term stock price trends (under a 10-minute timeframe). The application includes an intuitive visualizer displaying live stock prices, predicted trends, and indicators, enabling users to make informed decisions with ease.

How we built it

We trained the LSTM model using PyTorch on datasets provided by the National Bank of Canada. These datasets included columns such as stock price, volume, bid/ask prices, and timestamps with microsecond precision. The frontend was developed with Dash, combining interactivity with clean visualizations powered by pandas, numpy, and plotly.

Challenges we ran into

One of the key challenges was handling the high-frequency data provided, especially with timestamps at the microsecond level. Preprocessing this data to remove noise and align it effectively for training required significant effort. Indeed, we spent most of our time on the preprocessing of the dataset. Additionally, optimizing the LSTM model to avoid overfitting while maintaining real-time prediction capabilities presented another layer of complexity.

Accomplishments that we're proud of

We are proud of having developed the whole interface for data visualization, using Dash and Plotly. This allows us to inspect all the different metrics, as well as visualizing the labels.

We also are happy with our LSTM results, giving us an AUROC above 0.63 for the unseen Test Data. That being said, because of time constraints, we did not have time to directly integrate into a live graph viewer for our model.

What we learned

Through this project, we deepened our understanding of time-series forecasting using LSTMs and the challenges of working with high-frequency financial data. We also gained valuable experience in building a full-stack application that integrates machine learning and interactive dashboards.

What's next for NBIStockForecast

  • LSTM live forecast viewer: Properly integrate the predictions in an easy-to-use application .
  • User-Friendly Features: Add notifications, strategy recommendations, and portfolio management tools to enhance user engagement.
Share this project:

Updates