Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AYUSHI-SHA committed Oct 7, 2024
2 parents fd013b1 + 41328e5 commit 1a780ec
Show file tree
Hide file tree
Showing 6 changed files with 971 additions and 42 deletions.
358 changes: 358 additions & 0 deletions .ipynb_checkpoints/More_Charts.ipynb

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions .ipynb_checkpoints/candlestick_chart.html

Large diffs are not rendered by default.

Binary file added InvestWise - Stock Prediction Model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
248 changes: 245 additions & 3 deletions Python File/Stock_Price_Prediction_REMOTE_20502.ipynb

Large diffs are not rendered by default.

104 changes: 65 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,81 @@
# Stock Price Prediction Project
<div align="center">

## Overview
## 📈 Stock Price Prediction

This project focuses on predicting the stock prices of "The State Bank Of India" using machine learning Regression algorithms. The dataset was collected from Yahoo Finance and contains historical stock data.
![Stock Prediction Model](https://raw.githubusercontent.com/alo7lika/Stock-Price-Prediction/refs/heads/main/InvestWise%20-%20Stock%20Prediction%20Model.png)

## Features
</div>


## 🌟 Overview

This project focuses on predicting the stock prices of **The State Bank Of India** using machine learning regression algorithms. The dataset was collected from Yahoo Finance and contains historical stock data.

## 🛠️ Features

- Utilizes various regression algorithms for stock price prediction.
- Dataset collected from Yahoo Finance for "The State Bank Of India."
- Dataset collected from Yahoo Finance for **The State Bank Of India**.

## 🔍 Algorithms Used

We implemented the following regression algorithms for stock price prediction:

## Algorithms Used
| 🤖 Algorithm | 📜 Description |
|-------------------------------------------|----------------------------------------------------|
| Linear Regression | A basic regression algorithm. |
| Support Vector Regression (SVR) | Effective for non-linear relationships. |
| Random Forest | Ensemble learning method using decision trees. |
| Gradient Boosting Models (GBM) | Sequentially builds models to improve predictions. |
| Extreme Gradient Boosting (XGBoost) | Advanced boosting technique with regularization. |
| AdaBoostRegressor | Combines multiple weak learners. |
| Decision Tree | Simple yet effective model based on tree structure. |
| KNeighborsRegressor (KNN) | Predicts based on nearest neighbors' average. |
| Artificial Neural Networks (ANN) | Mimics human brain for complex data patterns. |
| Long Short Term Memory (LSTM) | Suitable for time-series prediction. |

- Linear Regression
- SVR
- Random Forest
- Gradient Boosting Models (GBM)
- Extreme Gradient Boosting (XGBoost)
- AdaBoostRegressor
- Decision Tree
- KNeighborsRegressor(KNN)
- Artificial Neural Networks (ANN)
- LSTM(Long Short term Memory)
## 📊 Dataset

## Dataset
The dataset used in this project is sourced from Yahoo Finance and includes historical stock data for **The State Bank Of India**. It comprises relevant features such as:

The dataset used in this project is sourced from Yahoo Finance and includes historical stock data for "The State Bank Of India." It comprises relevant features such as Open, High, Low, Close prices, and volume.
- 📈 Open prices
- 📉 High prices
- 📉 Low prices
- 💵 Close prices
- 📦 Volume

## Project Structure
## 📁 Project Structure

- `data/`: Contains the dataset files.
- `notebooks/`: Jupyter notebooks with the code for data exploration, preprocessing, and model training.
- `src/`: Python source code for the project.
- `requirements.txt`: List of dependencies needed to run the project.
📂 data/ # Contains the dataset files.
📓 notebooks/ # Jupyter notebooks with the code for data exploration, preprocessing, and model training.
🐍 src/ # Python source code for the project.
📋 requirements.txt # List of dependencies needed to run the project.

## How to Run

1. Install dependencies using `pip install -r requirements.txt`.
## 🚀 How to Run

1. Install dependencies using:
```bash
pip install -r requirements.txt
```
2. Execute the notebooks in the `notebooks/` folder in the given order.
3. Run the scripts in the `src/` folder for further analysis or model training.

## Results
## 📈 Results

The sequence of all the algorithms used is as follows:

1. Linear Regression
2. SVR
3. Random Forest
4. Gradient Boosting Models (GBM)
5. Extreme Gradient Boosting (XGBoost)
6. AdaBoostRegressor
7. Decision Tree
8. KNeighborsRegressor(KNN)
8. KNeighborsRegressor (KNN)
9. Artificial Neural Networks (ANN)
10. LSTM(Long Short term Memory)
10. Long Short Term Memory (LSTM)

## 📊 Performance Metrics

The **Root Mean Square Error (RMSE)** of all the following 10 Regression Algorithms is provided below:
![image](images\f23e9194-72de-438d-bd69-744667680d3e.jpeg)
Expand All @@ -65,30 +89,32 @@ The **Mean Absolute Percentage Error (MAPE)** of all the following 10 Regression
![image](images\6c9ebb5b-a8ed-44de-8842-bf8f5c25990f.jpeg)


## 🔮 Future Work

## Future Work
- Combine this data with stock sentiment data to enhance prediction accuracy.
- Utilize clustering algorithms to develop a buy/sell recommendation system.

- We can further combine this data with that of stock sentiment data in order to achieve even better conclusion
- Also we can possibly use Clustering algorithms to develop a buy/sell recommendation system
## 🏆 Conclusion

## Conclusion
Among the models assessed, **AdaBoostRegressor** and **LSTM** emerged as the top performers, showcasing low RMSE, MAE, and MAPE values. These metrics suggest that these algorithms effectively capture the underlying trends and patterns in the stock price data, making them reliable for prediction tasks.

- Among the models assessed, AdaBoostRegressor and LSTM emerged as the top performers, showcasing low RMSE, MAE, and MAPE values. These metrics suggest that these algorithms effectively capture the underlying trends and patterns in the stock price data, making them reliable for prediction tasks.
- While some models demonstrated solid predictive capabilities, others, such as Support Vector Regression (SVR) and KNeighborsRegressor, recorded higher RMSE and MAE values. This suggests that these algorithms may produce acceptable predictions on average but are susceptible to significant errors in certain scenarios. Consequently, their reliability in real-world applications could be compromised, highlighting the need for careful consideration when selecting models for stock price predictions.
While some models demonstrated solid predictive capabilities, others, such as **Support Vector Regression (SVR)** and **KNeighborsRegressor**, recorded higher RMSE and MAE values. This indicates that these algorithms may yield acceptable predictions on average but are susceptible to significant errors in certain scenarios, emphasizing the need for careful model selection for stock price predictions.

## Author
## ✍️ Author

Rohit Dubey
**Rohit Dubey** 👨‍💻

## Contributing
## 🤝 Contributing

We welcome contributions to this project! Please see our [Contributing.md](./CONTRIBUTING.md) file for guidelines on how to get involved.

## Our Valuable Contributors
## 🌍 Our Valuable Contributors

[![Contributors](https://contrib.rocks/image?repo=rohitinu6/Stock-Price-Prediction)](https://github.com/rohitinu6/Stock-Price-Prediction/graphs/contributors)

## License
## 📝 License

This project is licensed under the [MIT License](LICENSE).



289 changes: 289 additions & 0 deletions reduced_redundancy_stock_price_prediction.ipynb

Large diffs are not rendered by default.

0 comments on commit 1a780ec

Please sign in to comment.