StoxAI is a professional financial dashboard that provides real-time technical analysis, comprehensive risk metrics, and market intelligence for stocks across global exchanges (NSE, BSE, NYSE, NASDAQ). Built with Python, Dash, and Plotly, it delivers institutional-grade analytics in an intuitive, dark-themed interface.
┌───────────────────────────────────────────────────────────┐
│ StoxAI Pipeline │
├───────────────────────────────────────────────────────────┤
│ │
│ User Input → Data Fetch → Technical Analysis │
│ ↓ ↓ ↓ │
│ Ticker Yahoo Finance 20+ Indicators │
│ Symbol Auto-Fallback Risk Metrics │
│ │
└───────────────────────────────────────────────────────────┘
📊 Market Intelligence: Empowering traders and analysts with institutional-grade tools for data-driven decision making.
|
|
┌───────────────────────────────────────────────────────────┐
│ StoxAI Core │
├───────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ User │ → │ Symbol │ → │ Cache │ │
│ │ Input │ │ Resolver │ │ Layer │ │
│ └──────────┘ └──────────┘ └────┬─────┘ │
│ ↓ │
│ ┌──────────┐ │
│ │ Yahoo │ │
│ │ Finance │ │
│ └────┬─────┘ │
│ ↓ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │Technical │ ← │ Data │ ← │ Raw │ │
│ │Indicators│ │Processing│ │ OHLCV │ │
│ └────┬─────┘ └──────────┘ └──────────┘ │
│ ↓ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Risk │ │ Trading │ │
│ │ Metrics │ │ Signals │ │
│ └────┬─────┘ └────┬─────┘ │
│ │ │ │
│ └────────┬────────┘ │
│ ↓ │
│ ┌──────────────┐ │
│ │ Dashboard │ │
│ │ (Plotly) │ │
│ └──────────────┘ │
│ │
└───────────────────────────────────────────────────────────┘
StoxAI/
├── app.py # Main entry point – run with: python app.py
├── requirements.txt # Python dependencies
├── README.md # Documentation
├── src/
│ ├── __init__.py
│ ├── config.py # Theme colors, cache paths
│ ├── cache.py # CacheManager for price/news
│ ├── data.py # yfinance fetch, symbol resolution, news
│ ├── analysis.py # Technical indicators, risk metrics, signals
│ ├── charts.py # Plotly dashboard figure
│ ├── layout.py # Dash layout (navbar, search, footer)
│ └── callbacks.py # Dash callbacks (analyze, quick select)
├── assets/ # Static resources (optional)
│ └── custom.css # Custom styling
└── stock_cache/ # Cache directory (auto-generated)
└── *.pkl # Binary cache files
|
System Requirements
|
Key Dependencies
|
# Clone the repository
git clone https://github.com/yourusername/StoxAI.git
# Navigate to directory
cd StoxAI
# Install dependencies
pip install -r requirements.txt
# Install dependencies
pip install -r requirements.txt
# Run the application (from project root)
python app.pyOpen your browser and navigate to:
http://127.0.0.1:8050
- Enter a stock ticker in the search box (e.g.,
RELIANCE,AAPL,TSLA) - Click Analyze or use quick-access buttons
- Explore the dashboard with interactive charts and metrics
| Exchange | Suffix | Examples |
|---|---|---|
| NSE (India) | .NS |
RELIANCE.NS, TCS.NS, INFY.NS |
| BSE (India) | .BO |
RELIANCE.BO, TCS.BO, INFY.BO |
| NYSE/NASDAQ | None | AAPL, MSFT, GOOGL, TSLA |
The system intelligently detects Indian stocks and automatically:
- Appends
.NSfor NSE data - Falls back to
.BO(BSE) if NSE fails - Handles US stocks without suffix
- Moving Averages: SMA20, SMA50, EMA
- MACD: Moving Average Convergence Divergence with signal line
- RSI: Relative Strength Index (14-period)
- Stochastic Oscillator: %K and %D lines
- CCI: Commodity Channel Index
- Bollinger Bands: 20-period with 2 standard deviations
- ATR: Average True Range
- OBV: On-Balance Volume
- MFI: Money Flow Index
The platform calculates comprehensive risk metrics:
| Metric | Description |
|---|---|
| Sharpe Ratio | Risk-adjusted return (annualized) |
| Sortino Ratio | Downside risk-adjusted return |
| Maximum Drawdown | Largest peak-to-trough decline |
| Value at Risk | 95% confidence level potential loss |
| Win Rate | Percentage of positive trading days |
graph LR
A[User Input] --> B{Symbol Resolver}
B --> C[Cache Check]
C -->|Hit| D[Cached Data]
C -->|Miss| E[Yahoo Finance API]
E --> F[NSE .NS]
F -->|Fail| G[BSE .BO]
G -->|Fail| H[Raw Symbol]
D --> I[Feature Engineering]
H --> I
I --> J[Technical Indicators]
J --> K[Risk Metrics]
K --> L[Trading Signals]
L --> M[Plotly Dashboard]
- Portfolio Optimization: Multi-asset portfolio tracking and optimization
- Machine Learning: LSTM/Transformer models for price forecasting
- User Accounts: Persistent preferences and watchlists
- Alert System: Price and indicator-based notifications
- Backtesting Engine: Strategy performance testing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.