
In this project, I have predicted the price of the S&P500 stock market index using the dataset from Yahoo Finance Package.
Project Steps
- Download data using the yfinance package.
- Create an initial machine learning model and estimate accuracy.
- Build a backtesting engine to more accurately measure accuracy.
- Improve the accuracy of the model.
- StockMarketPredictionS&P.ipynb: Jupyter notebook that contains all of the code.
- sp500.csv: CSV File with large dataset spanning nearly a century to present.
Tools Used:
- JupyterLab
- Python 3.8+
- Python packages
- pandas
- yfinance
- scikit-learn
Based on the notebook content, to get the prediction daily, you need to run the following steps:
- Load the Latest Data: This step ensures that your data is up to date.
- Train the Model: This step involves training the model on the latest data.
- Make Predictions: This step generates the prediction for the next trading day.