Skip to content

Latest commit

 

History

History
114 lines (92 loc) · 5.08 KB

File metadata and controls

114 lines (92 loc) · 5.08 KB

open_trading_algo Documentation

Welcome to the comprehensive documentation for open_trading_algo - a robust Python library for algorithmic trading, technical analysis, and financial data processing.

Table of Contents

Getting Started

Core Modules

Advanced Features

API Reference

Deployment & Production

Library Overview

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

Key Features

🚀 Performance & Reliability

  • 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

📊 Technical Analysis

  • 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

🎯 Signal Generation

  • 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

⚖️ Risk Management

  • Dynamic position sizing based on volatility
  • Stop-loss and take-profit automation
  • Portfolio-level risk controls
  • Correlation-based hedging strategies

🔄 Live Trading Ready

  • Real-time data feeds with configurable update intervals
  • Event-driven signal processing
  • Integration-ready APIs for broker connectivity
  • Production logging and monitoring

Architecture

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

Getting Help

Contributing

This library is actively maintained and welcomes contributions. See the main README for development setup and contribution guidelines.