https://github.com/devmuniz02/stock-prediction-lstm-sentiment-analysis-python
Project to predict stock prices of next day data using a LSTM model in python and sentiment analysis of news related to the stock market in general and the news of the stock to predict.
https://github.com/devmuniz02/stock-prediction-lstm-sentiment-analysis-python
Last synced: over 1 year ago
JSON representation
Project to predict stock prices of next day data using a LSTM model in python and sentiment analysis of news related to the stock market in general and the news of the stock to predict.
- Host: GitHub
- URL: https://github.com/devmuniz02/stock-prediction-lstm-sentiment-analysis-python
- Owner: devMuniz02
- Created: 2023-10-31T15:11:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-22T00:10:49.000Z (over 1 year ago)
- Last Synced: 2025-01-29T13:14:05.482Z (over 1 year ago)
- Language: Jupyter Notebook
- Size: 646 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stock Prediction with LSTM and Sentiment Analysis
This project aims to predict stock prices for the next day using a Long Short-Term Memory (LSTM) model in Python, supplemented by sentiment analysis of news. The approach combines:
- **Deep Learning**: Using LSTM for time-series stock price prediction.
- **Natural Language Processing**: Analyzing market-related news sentiment.
---
## Project Overview
### Files in the Repository
1. **`LSTM.ipynb`**
- Contains the main workflow for training and testing the LSTM model with stock price data.
- Below are sample results from the notebook:
**Full Data Prediction**

**Test Predictions**

2. **`SaveSentiment.ipynb`**
- Saves the sentiment data extracted from news articles using sentiment analysis techniques.
- This notebook gathers news sentiments relevant to specific stocks or markets.
3. **`LSTMdef.ipynb`**
- Uses the sentiment data saved by `SaveSentiment.ipynb` and integrates it with stock data to train and evaluate the LSTM model.
- Combines stock data and sentiment data for improved predictive performance.
4. **`README.md`**
- Provides an overview of the project, the files, and their roles in the workflow.
---
## Features
- **Stock Price Prediction**: Time-series forecasting with LSTM for accurate trend analysis.
- **Sentiment Analysis**: Evaluates market sentiment from general news and stock-specific articles to inform predictions.
---
## Getting Started
### Prerequisites
To run the project, ensure you have the following installed:
- Python 3.8 or later
- Required Python libraries: `tensorflow`, `pandas`, `numpy`, `sklearn`, `matplotlib`, `nltk`, `yfinance`, and `fredapi`.
---
### Check Out My Other Projects
Explore more of my AI and ML work [here](https://github.com/devMuniz02/AI-ML-Code-and-projects/).
---
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.