This project implements a Long Short-Term Memory (LSTM) model for stock price prediction using historical data of Tata Motors, a company listed in the Nifty 50 index. The model takes a time window of 60 days as input and predicts the stock price for the next day using time series analysis and shifting techniques.
The dataset used for this project is historical stock price data for Tata Motors. The data consists of daily stock prices for multiple features such as Open, High, Low, Close, and Volume. It covers a significant period of historical data to train and test the LSTM model effectively.
Make sure you have the following libraries installed:
- numpy
- pandas
- matplotlib
- scikit-learn
- TensorFlow (or any other deep learning framework of your choice)
pip install numpy pandas matplotlib scikit-learn tensorflow
- Clone the repository to your local machine:
git clone https://github.com/your-username/stock-price-prediction.git
- Change the working directory to the project folder:
cd stock-price-prediction
-
Run the prediction.ipynb notebook using Jupyter Notebook or Jupyter Lab.
-
The notebook contains step-by-step instructions on data preprocessing, model implementation, training, and prediction. Follow the instructions to execute the code.
The performance of the LSTM model can be evaluated using various metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), etc. Additionally, visual inspection of the predicted vs. actual stock prices can provide insights into the model's performance.
Stock price prediction is inherently uncertain and involves various risk factors. This project is purely educational and should not be used for making financial decisions.