Skip to content

jenil-prajapati/project-stock-sp500

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Stock Market Predictor using scikit-learn ML model in Python

In this project, I have predicted the price of the S&P500 stock market index using the dataset from Yahoo Finance Package.

Project Steps

  1. Download data using the yfinance package.
  2. Create an initial machine learning model and estimate accuracy.
  3. Build a backtesting engine to more accurately measure accuracy.
  4. Improve the accuracy of the model.

About

File Overview

  • StockMarketPredictionS&P.ipynb: Jupyter notebook that contains all of the code.
  • sp500.csv: CSV File with large dataset spanning nearly a century to present.

Local Setup

Tools Used:

  • JupyterLab
  • Python 3.8+
  • Python packages
    • pandas
    • yfinance
    • scikit-learn

Usage of model

Based on the notebook content, to get the prediction daily, you need to run the following steps:

  1. Load the Latest Data: This step ensures that your data is up to date.
  2. Train the Model: This step involves training the model on the latest data.
  3. Make Predictions: This step generates the prediction for the next trading day.

About

Stock Market Prediction ML Model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published