Skip to content

Latest commit

Β 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages