This repository contains a project focused on sentiment analysis of the Dow Jones Industrial Average (DJIA) stock using news headlines. The goal of this project is to explore the relationship between news sentiment and stock market performance, and to predict stock market trends using machine learning models.
- Data Preprocessing: Cleaning and preparing news headline data for analysis.
- Sentiment Analysis: Using natural language processing techniques to extract sentiment from news headlines.
- Exploratory Data Analysis (EDA): Visualizing and analyzing the relationship between news sentiment and stock price movements.
- Machine Learning Models: Implementing predictive models to forecast stock trends based on sentiment analysis.
The dataset used in this project contains:
- News Headlines: Historical news headlines that potentially impact DJIA performance.
- Stock Market Data: Historical DJIA index data.
The dataset is included in this repository under the data/
directory. Ensure that the dataset is in the correct path before running the notebook.
To run this project, you will need the following:
- Python 3.7+
- Jupyter Notebook or any compatible IDE
- Key Python libraries:
pandas
,numpy
,matplotlib
,seaborn
,sklearn
,nltk
- ML Algorithms:
Random Forest
,Multinomial Naive Bayes
&Logistic Regression
You can install the required libraries using:
pip install -r requirements.txt
- Clone this repository:
git clone https://github.com/codebyte156/Sentiment-Analysis-Dow-Jones-Stock-DJIA.git
- Navigate to the project directory:
cd Sentiment-Analysis-Dow-Jones-Stock-DJIA
- Open the Jupyter Notebook:
jupyter notebook stock-sentiment-analysis.ipynb
- Run the notebook cells sequentially to execute the analysis.
Sentiment-Analysis-Dow-Jones-Stock-DJIA/
├── data/
│ └── Stock-Headlines-DataSet.csv # Dataset for the project
├── stock-sentiment-analysis.ipynb # Main notebook
├── README.md # Project description
├── requirements.txt # Python dependencies
└── LICENSE.txt # License
The analysis provides insights into how sentiment in news headlines correlates with DJIA performance. Predictive models demonstrate the feasibility of using sentiment data for stock market trend forecasting. Visualizations in the notebook highlight key findings.
- Incorporating real-time news feeds for live sentiment analysis.
- Testing additional machine learning models for improved accuracy.
- Expanding the dataset to include other stock indices or global markets.
Contributions are welcome! If you have ideas for improving this project, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License. See the MIT LICENSE file for more details.
For questions or suggestions, please reach out via [email protected] or open an issue on this repository.
Thank you for exploring this project. Happy analyzing!