Welcome to the comprehensive documentation for open_trading_algo - a robust Python library for algorithmic trading, technical analysis, and financial data processing.
- Data APIs & Fetchers - Financial data retrieval from multiple sources
- Data Cache System - Multiple caching implementations (SQLite, Parquet, InfluxDB)
- Technical Indicators - Comprehensive technical analysis indicators
- Trading Metrics - Risk, performance, and analytical metrics
- Trading Models - Modular trading strategy implementations
- Signal Generation - Long, short, options, and sentiment signals
- Risk Management - Position sizing and risk controls
- Backtesting - Historical strategy testing and optimization
- Live Data Feeds - Real-time data streaming
- Signal Optimization - Multi-signal portfolio optimization
- Database Population - Automated data collection
- Sentiment Analysis - Social and analyst sentiment integration
- Module Reference - Complete API documentation
- Configuration Files - YAML configuration options
- Examples - Code examples and use cases
- Production Setup - Best practices for live trading
- Performance Optimization - Scaling and efficiency tips
- Troubleshooting - Common issues and solutions
open_trading_algo is designed as a modular, production-ready framework for:
- Multi-source data aggregation from Yahoo Finance, Finnhub, Alpha Vantage, FMP, Twelve Data, Polygon, and Tiingo
- Advanced technical analysis with 50+ indicators including custom oscillators and trend filters
- Signal generation and optimization across multiple timeframes and asset classes
- Risk management with position sizing, stop-loss, and portfolio hedging
- Real-time data processing with caching and rate limiting
- Backtesting and strategy optimization with walk-forward analysis and Monte Carlo simulation
- SQLite-based local caching system for minimal API calls
- Thread-safe rate limiting for all data providers
- Robust error handling and retry logic
- Configurable data sources with automatic failover
- 50+ technical indicators (RSI, MACD, Bollinger Bands, ADX, etc.)
- Custom indicators like Fibonacci retracements and volume profiles
- Multi-timeframe analysis support
- Signal aggregation and weighting
- Long/short equity signals
- Options trading signals (calls/puts)
- Sentiment-based signals from social media and analyst ratings
- Machine learning ensemble methods
- Modular trading models with extensible strategy framework
- Dynamic position sizing based on volatility
- Stop-loss and take-profit automation
- Portfolio-level risk controls
- Correlation-based hedging strategies
- Real-time data feeds with configurable update intervals
- Event-driven signal processing
- Integration-ready APIs for broker connectivity
- Production logging and monitoring
open_trading_algo/
├── open_trading_algo/ # Main library package
│ ├── fin_data_apis/ # Data source integrations
│ ├── indicators/ # Technical analysis indicators
│ ├── models/ # Trading strategy models
│ │ ├── base_model.py # Abstract base class
│ │ ├── momentum_model.py # Momentum strategies
│ │ ├── mean_reversion_model.py # Mean reversion
│ │ └── trend_following_model.py # Trend following
│ ├── cache/ # Multiple caching implementations
│ │ ├── data_cache.py # SQLite-based cache (default)
│ │ ├── parquet_cache.py # Parquet columnar storage
│ │ ├── timeseries_cache.py # InfluxDB time series database
│ │ └── setup_influxdb.py # InfluxDB setup utilities
│ ├── sentiment/ # Sentiment analysis
│ ├── alerts/ # Signal alerting system
│ └── backtest/ # Strategy backtesting
├── docs/ # This documentation
└── examples/ # Usage examples
- Check the Troubleshooting Guide for common issues
- Review Examples for practical implementations
- Refer to the API Reference for detailed method documentation
This library is actively maintained and welcomes contributions. See the main README for development setup and contribution guidelines.