Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StoxAI

📈 Professional-Grade Financial Dashboard & Technical Analysis Platform

Version Python Dash License

Real-Time Market Analysis • Advanced Technical Indicators • Risk Metrics


📋 Overview

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.


✨ Features

📊 Technical Analysis

  • 20+ Technical Indicators
    RSI, MACD, Bollinger Bands, Stochastic, CCI, MFI, ATR

  • Multi-Timeframe Charts
    Interactive candlestick charts with volume analysis

  • Smart Signal Detection
    Automated trading signals for crossovers and breakouts

  • Moving Averages
    SMA, EMA with golden/death cross identification

🎯 Advanced Features

  • Risk Analytics Dashboard
    Sharpe Ratio, Sortino Ratio, VaR, Maximum Drawdown

  • Intelligent Caching
    1-hour cache system for optimal performance

  • Multi-Exchange Support
    NSE, BSE, NYSE, NASDAQ with auto-detection

  • Auto-Fallback Mechanism
    Seamless switching between exchanges for Indian stocks


🏗️ Architecture

┌───────────────────────────────────────────────────────────┐
│                    StoxAI Core                            │
├───────────────────────────────────────────────────────────┤
│                                                           │
│  ┌──────────┐      ┌──────────┐      ┌──────────┐         │
│  │  User    │  →   │  Symbol  │  →   │  Cache   │         │
│  │  Input   │      │ Resolver │      │  Layer   │         │
│  └──────────┘      └──────────┘      └────┬─────┘         │
│                                            ↓              │
│                                     ┌──────────┐          │
│                                     │  Yahoo   │          │
│                                     │ Finance  │          │
│                                     └────┬─────┘          │
│                                          ↓                │
│  ┌──────────┐      ┌──────────┐      ┌──────────┐         │
│  │Technical │  ←   │  Data    │  ←   │   Raw    │         │
│  │Indicators│      │Processing│      │   OHLCV  │         │
│  └────┬─────┘      └──────────┘      └──────────┘         │
│       ↓                                                   │
│  ┌──────────┐      ┌──────────┐                           │
│  │   Risk   │      │ Trading  │                           │
│  │ Metrics  │      │ Signals  │                           │
│  └────┬─────┘      └────┬─────┘                           │
│       │                 │                                 │
│       └────────┬────────┘                                 │
│                ↓                                          │
│         ┌──────────────┐                                  │
│         │  Dashboard   │                                  │
│         │  (Plotly)    │                                  │
│         └──────────────┘                                  │
│                                                           │
└───────────────────────────────────────────────────────────┘

📁 Project Structure

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

🚀 Installation

Prerequisites

System Requirements

  • Python 3.8 or higher
  • pip package manager
  • Internet connection

Key Dependencies

  • Dash & Plotly
  • yfinance
  • pandas & NumPy
  • TA-Lib (Python)

Quick Start

# 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.py

Access the Dashboard

Open your browser and navigate to:

http://127.0.0.1:8050

💻 Usage

Basic Usage

  1. Enter a stock ticker in the search box (e.g., RELIANCE, AAPL, TSLA)
  2. Click Analyze or use quick-access buttons
  3. Explore the dashboard with interactive charts and metrics

Supported Exchanges

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

Auto-Detection

The system intelligently detects Indian stocks and automatically:

  • Appends .NS for NSE data
  • Falls back to .BO (BSE) if NSE fails
  • Handles US stocks without suffix

📊 Technical Indicators

Trend Indicators

  • Moving Averages: SMA20, SMA50, EMA
  • MACD: Moving Average Convergence Divergence with signal line

Momentum Indicators

  • RSI: Relative Strength Index (14-period)
  • Stochastic Oscillator: %K and %D lines
  • CCI: Commodity Channel Index

Volatility Indicators

  • Bollinger Bands: 20-period with 2 standard deviations
  • ATR: Average True Range

Volume Indicators

  • OBV: On-Balance Volume
  • MFI: Money Flow Index

🎯 Risk Analytics

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

🔄 Data Flow

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]
Loading

🚀 Future Roadmap

  • 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

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


📞 Contact

GitHub LinkedIn


📈 Trade Smart, Trade Safe! 📈

Built with ❤️ for traders and analysts

About

StoxAI is an AI-assisted stock market analysis platform delivering real-time technical indicators, risk analytics, and interactive financial dashboards for data-driven trading and research.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages