This is a simple, interactive command-line chatbot built with Python and the yfinance module. It allows users to fetch real-time stock data by entering the ticker symbol (e.g., AAPL, TSLA, MSFT). The bot retrieves and displays the current price, day’s high, and day’s low for the selected stock.
- Interactive 3D Interface: Features an immersive WebGL particle background powered by Three.js that responds to user mouse movement.
- Holographic Charting Engine: Integrates Chart.js mapped with dynamic bezier curves, gradient fills, and customized tooltips.
- Tailwind CSS Overhaul: Fully responsive, "Apple-tier" frosted glass dashboard (
backdrop-blur-xl) with staggered animations. - Advanced Technical Indicators Engine:
- Simple Moving Averages (SMA 20 & 50 Crossovers)
- Relative Strength Index (RSI 14)
- MACD (Moving Average Convergence Divergence Histogram)
- Bollinger Bands (Volatility Boundaries)
- Neural Verdict System: A proprietary AI scoring engine that automatically grades data points to generate actionable
STRONG BUY/HOLD/STRONG SELLsignals alongside risk assessments. - Global Market Support: Handles both NSE/BSE (e.g., "RELIANCE.NS", "TATASTEEL.NS") and international markets (e.g., "TSLA", "AAPL").
The project has been scaled to a full MVT architectural pattern for maximum maintainability:
- Frontend (Jinja2 + Tailwind + Three.js):
layout.html,index.html,dashboard.html. Handles WebGL rendering, CSS grids, and chart population.
- Backend (Flask Server):
app.py: The robust routing and controller layer running asynchronously via Python.
- Data Core (
data_engine.py):- Extensive integration with the
yfinanceAPI for instant market history fetching and caching.
- Extensive integration with the
- Math Engine (
analysis_engine.py):- Calculates all statistical formulas via NumPy & Pandas.
- Python 3.8+
- Internet connection (required for CDN styling and real-time market polling)
-
Clone the repository:
git clone https://github.com/pratik1258m/Stockbot.git cd Stockbot -
Install required backend dependencies:
pip install -r requirements.txt
-
Execute the Application Server:
python3 app.py
Access the breathtaking dashboard at
http://127.0.0.1:5001.
The internal "Verdict AI" formulates signals using a weighted scoring matrix:
- Trend Factor: Evaluates the relation of the Close price natively against the SMA-50 baseline.
- Momentum Factor: Assigns gravity based on RSI extremities (Oversold < 30 = Bullish; Overbought > 70 = Bearish).
- Convergence Factor: Interprets positive/negative histogram divergence emitted by the MACD.
- Volatility Factor: Monitors Bollinger Band expansion tests and standard deviation breakouts.
These raw scores are mapped to a human-readable professional diagnostic scale.
Designed explicitly to fulfill requirements for a Computer Science Final Year thesis/project. Code structure is strictly self-documented, highly modular, and production-ready.