The Stock Price Prediction with Python is a program that uses machine learning, specifically TensorFlow and scikit-learn, to predict stock prices. It retrieves historical stock data from Yahoo Finance using pandas, trains a neural network on this data, and then makes predictions for the next day's stock value. It also outputs the graphs of the real and prediction model generated.
Before you begin, ensure you have the following requirements:
-
Python: Make sure you have Python installed on your system. You can download it from python.org.
-
TensorFlow, scikit-learn, pandas: Install these libraries using the following command:
pip install tensorflow scikit-learn pandas
Follow these steps to set up the Stock Price Prediction program:
git clone https://github.com/AJDevCode/stock-price-prediction.git
Install all the libraries needed
Either use the same company value selected or change the company stock and date of time to what is required.
To run the Stock Price Prediction program, execute the following command:
python predict_stock_prices.py
Or run this in Pycharm/Visual Studio Code alternative
The program will retrieve historical stock data, train a neural network, and output a prediction for the next day's stock value.
The Stock Price Prediction program offers the following key features:
-
Retrieves historical stock data from Yahoo Finance.
-
Uses TensorFlow and scikit-learn to train a neural network.
-
Predicts the stock value for the next day based on historical data.
Example Provided:
- Python
- TensorFlow
- Scikit-learn
- Yahoo Finance API
- Pandas