Skip to content

Data visualizer and trading simulator for a machine learning model to predict stock market prices 30 trading days in the future

License

Notifications You must be signed in to change notification settings

SamiaAnwar/stock-market-predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stock-market-predictor

Objective

The objective of this project is to create a tool which can aid in demystifying the statistical element of stock market prices to make trading more accessible to the average earner.

About

This tool leverages historical data from 21 different tickers and simulates trading actions over a one-month period based on a machine learning model. It allows the user to choose the tickers on which they want to trade and visualizes the profits made from these trades over the course of the subsequent month, using real daily closing values from the yfinance library. It also visualizes the model accuracy of the model’s 30-day projections vs. the actual price 30 trading days in the future.

Tools

This application uses create-react-app, TailwindCSS with react-chart-js2 for its data visualisation. The API endpoints to query the data and obtain the stock market data and trading simulation were written in Flask and Python. The model was generated using Python scripts, using a Random Forest Regressor from scikit-learn and processed using Pandas dataframes.

All the stock market data for training and testing the model and for visualising results are from the yfinance library.

Demo

StockPredictorDemo.mov

Installation

$ cd frontend && npm i

How to Run

$ cd frontend 

Then, in two different terminals

$ npm run start 
$ npm run start-flask

Next Steps

In the future, I plan on building a site to display live performance of this model on a simulated stock portfolio using the same business logic implemented for backtesting. I also hope to create an API for other programmers to be able to use this model.

About

Data visualizer and trading simulator for a machine learning model to predict stock market prices 30 trading days in the future

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published