This project predicts stock prices based on historical data, market trends, and news sentiment analysis using machine learning. The model uses LSTM (Long Short-Term Memory) for time series prediction and NLP (Natural Language Processing) for sentiment analysis of financial news.
- 📈 Fetches real-time stock data using Yahoo Finance API.
- 📰 Scrapes and analyzes news sentiment related to the stock.
- 🤖 Uses LSTM, ARIMA, or XGBoost for stock price prediction.
- 📊 Provides a Streamlit dashboard for visualization.
- Programming Language: Python
- Libraries: Pandas, Scikit-learn, TensorFlow/Keras, Matplotlib, Seaborn, Plotly
- Data Sources: Yahoo Finance API, Web Scraping (BeautifulSoup)
- Frameworks: Streamlit (for Dashboard UI)
├── main.py # Data fetching, training, and prediction
├── app.py # Streamlit dashboard for visualization
├── requirements.txt # Required Python packages
├── README.md # Project documentation
git clone https://github.com/ishusharma/stock-price-prediction.git
cd stock-price-predictionpython -m venv venvActivate it:
- Windows:
venv\Scripts\activate - Mac/Linux:
source venv/bin/activate
pip install -r requirements.txtIf you don’t have requirements.txt, run:
pip install numpy pandas scikit-learn tensorflow keras yfinance beautifulsoup4 requests nltk matplotlib seaborn plotly streamlitpython main.pyThis will:
- Fetch historical stock data
- Perform sentiment analysis
- Train an LSTM-based prediction model
streamlit run app.pyThis will launch an interactive web app to visualize stock predictions.
- Stock Price Prediction Graph 📉
- Sentiment Analysis Score 📰
- Real-time Data & Forecast 📊