π Real-Time Stock Movement Predictor using SVM + Streamlit
π Try the Live Demo
π Live App
π§ GitHub Repo
πΈ Project in Action
UI:
Model Evaluation:
π‘ What Does This App Do?
It predicts whether a stockβs next-day movement will be:
π UP or π DOWN
You simply:
Choose a stock (AAPL, MSFT, TSLA, etc.)
Click βPredictβ
See the next-day prediction powered by an SVM model
π§ How It Works
β
Features Used:
Past 3-day returns
Short & Long moving averages
Momentum = short β long
Volatility (rolling std dev)
Ticker encoded as a feature
π Model:
SVM classifier trained on 3 years of daily data (from Yahoo Finance)
Achieved ~99% test accuracy π―
π οΈ Tech Stack
Component | Tool / Library |
---|---|
Model | Scikit-learn (SVM) |
Data Source | yfinance (Yahoo Finance API) |
Frontend | Streamlit |
Feature Engg | pandas, NumPy |
Visualization | seaborn, matplotlib |
π Project Structure
stock-movement-svm/
βββ app.py # Streamlit frontend + logic
βββ model.pkl # Trained SVM model
βββ scaler.pkl # Feature scaler
βββ generate_features.py # Feature generation logic
βββ requirements.txt
βββ screenshots/
β βββ screenshot-ui.png
β βββ confusion-matrix.png
βββ README.md
π Run Locally
git clone https://github.com/snoorbasha50/stock-movement-svm.git
cd stock-movement-svm
pip install -r requirements.txt
streamlit run app.py
π Future Enhancements
Add more stocks dynamically
Include candlestick chart visualizations
Fine-tune SVM hyperparameters
Try LSTM or deep learning for sequence modeling
π¬ Letβs Connect