Vignesh-72/Stock-Price-Prediction-Model
Stock Price Prediction Hybrid Model
๐ Stock Price Prediction Web App
๐ Live App
๐ Access the deployed app here: Stock Price Prediction Dashboard
๐ Project Overview
Project Title: Cracking the Market Code with AI-Driven Stock Price Prediction using Time Series Analysis
Stock market forecasting is a complex challenge due to its inherent volatility and unpredictability. Traditional statistical models often fail to capture hidden patterns in stock price movements. This project addresses the issue by leveraging machine learning models to:
- Predict the next day's closing price (Regression)
- Predict the direction of the stock price movement (Up/Down) (Classification)
This tool serves as a decision support system for analysts and traders, using historical and technical indicators to generate informed predictions.
๐ฏ Objectives
- Predict Future Prices: Develop regression models (Random Forest, Linear Regression) to forecast next-day closing prices.
- Predict Price Direction: Build a classification model (Logistic Regression) to determine price movement direction.
- Feature Engineering: Incorporate technical indicators like Lag values, MA_5, MA_20, and RSI.
- EDA & Visualization: Analyze trends and patterns using interactive visualizations.
- Interactive Dashboard: Enable real-time user input and stock visualization through a Streamlit-based interface.
- Version Control & CI/CD: Use GitHub and GitHub Actions for collaborative development and deployment automation.
๐ง Methodology
-
Data Collection:
- Historical stock data fetched using
yfinanceAPI.
- Historical stock data fetched using
-
Data Preprocessing:
- Handle missing values (dropna) from rolling calculations.
- Outliers retained to preserve real market scenarios.
-
Feature Engineering:
- Lag_1, Lag_2 (previous day prices)
- MA_5, MA_20 (short and medium-term trends)
- RSI (14-day momentum indicator)
-
Model Development:
- Regression: Random Forest Regressor
- Classification: Logistic Regression
-
Evaluation:
- Regression: MAE, MAPE
- Classification: Accuracy, Precision, Recall, F1-Score
-
Visualization:
- Actual vs Predicted Prices
- RSI chart with thresholds
- MA crossover signals
- Volatility and return trends
- Daily accuracy percentage bars
-
Deployment:
- Streamlit Web App hosted online
๐ Key Features
- Lag Values: Historical close prices (Lag_1, Lag_2)
- Moving Averages: 5-day and 20-day trend indicators
- RSI: Tracks price momentum and reversal signals
- Bollinger Bands: Measure volatility and deviation
- Interactive Plots: Plotly-based dynamic charting
- Daily Accuracy: Bar plots highlight prediction quality
๐ฆ Data Source
- API: Yahoo Finance (
yfinancelibrary) - Data Type: Time-series (OHLC + Volume)
- Target Variables:
Target_Price(for regression)Target_UpDown(for classification)
โ๏ธ Tools & Technologies
-
Language: Python
-
IDE/Notebook: VS Code, Jupyter, Axel DICE, Google Colab
-
Libraries:
pandas,numpyโ Data processingplotly,matplotlib,seabornโ Visualizationscikit-learnโ Machine learningstreamlitโ Web dashboardyfinance,appdirsโ Data and utility support
-
Deployment :
- Streamlit (Web app hosting)
๐ Getting Started
- Clone the repository
git clone https://github.com/Vignesh-72/Stock-Price-Prediction-Model.git
cd Stock-Price-Prediction-Model- Install dependencies
pip install -r requirements.txt- Run the application
streamlit run streamlit_app.py- Usage
- Enter a stock ticker (e.g., AAPL, GOOGL)
- View predictions, trends, and trading recommendations
๐ฅ Project Team
- Vignesh S โ Model Building & Training
- Umar Farooq โ Front-End Design & Exploratory Data Analysis
- Vikram โ Data Cleaning & Feature Engineering
- Sheshathri โ Documentation & Reporting
โ ๏ธ Academic Integrity Notice
This project was developed by Vignesh S and Team for academic use at Priyadarshini Engineering College. Unauthorized copying, modification, or submission of this project as your own academic or commercial work is strictly prohibited..
