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.