Skip to content

Repository files navigation

QuantInsti Live Algo Trading Setups

This repository provides production-ready trading frameworks for Interactive Brokers (IBKR). Each setup is designed for live execution with automated data management, configurable strategies, and robust error handling.

Contributors

Repository Focus

The repository includes three specialized trading setups:

  • Multi-Asset Trading (ibkr-multi-asset/): A strategy-, trading-frequency-, asset-, and exchange/venue-agnostic framework for FX, futures, spot metals, crypto, stocks, equity options, and futures options. It does not require one venue: exchange, currency, routing, and primary-exchange settings remain configurable. Selected symbols must be valid on their chosen IBKR-supported exchange and have correct contract details, currency, routing, and market-hours metadata. The bundled configuration is an example, not a framework limit. See ibkr-multi-asset/README.md for details.
  • Forex Trading (ibkr-forex/): A dedicated framework for FX execution. It is not exchange-agnostic within IBKR: cash Forex contracts are limited to IDEALPRO, and other venue settings are not interchangeable.
  • Stock Trading (ibkr-stock/): A modular, exchange/venue-agnostic framework for systematic equity trading. It does not require one venue: exchange, currency, routing, and primary-exchange settings remain configurable, and selected symbols must be valid on their chosen IBKR-supported exchange and have correct contract details, currency, routing, and market-hours metadata.

Key Features

  • Unified Execution Engines: Production-grade frameworks supporting concurrent execution across multiple asset classes or focused single-asset strategies.
  • Strategy-Agnostic Architecture: Decoupled core engines from strategy logic. A strategy that implements the required interface can be dropped into user_config/ and plugged in without touching the underlying framework. This repository is yours once you clone it: if your strategy needs more than the interface supports, change the engine source however you need to, subject only to the license (see LICENSE.md).
  • Automated Data Infrastructure: Integrated utilities for bulk historical data acquisition and local data management across all setups.
  • Performance Analytics & Reporting: Automated generation of performance metrics and reports for portfolio monitoring.
  • Robust Error Recovery: Self-healing configuration with default parameter fallbacks and connection monitoring to ensure operational continuity.

Architecture

The project is organized to separate the core trading engine from user-specific configurations and strategies.

Multi-Asset Setup (ibkr-multi-asset/)

  • src/ibkr_multi_asset/: Core engine, portfolio rebalancing, and PDF reporting logic.
  • user_config/: Primary entry point (main.py) and strategy implementation.
  • llm-guide.md: Paste this file into any LLM (Claude, GPT-4, DeepSeek) to generate a custom trading strategy without writing code: provide your backtest script or describe your strategy in plain language.

Forex Setup (ibkr-forex/)

  • src/ibkr_forex/: Core engine optimized for FX-specific order types and data handling.
  • user_config/: Connection settings and Forex strategy logic.

Stock Setup (ibkr-stock/)

  • src/ibkr_stock/: Core engine featuring contract detail utilities and equity data management.
  • user_config/: Portfolio settings and equity strategy logic.

Getting Started

  1. Clone the repository:
    git clone https://github.com/QuantInsti/QuantInsti-Live-Algo-Trading-Setups
  2. Select a setup directory: Navigate to ibkr-multi-asset/, ibkr-forex/, or ibkr-stock/ depending on your trading requirements.
  3. Review the documentation: Each setup includes a doc/ folder with detailed setup and strategy development guides.
  4. Configure environment: Set your credentials in user_config/main.py or via environment variables (see user_config/.env.example for the required variable names).
  5. Execution: The engine uses relative paths for its own data/log files, so it must be launched from inside user_config/, not from the setup's root:
    cd ibkr-multi-asset/user_config
    python main.py

Disclaimer

Trading involves substantial risk, and this project is for educational purposes only. The authors or contributors are not responsible for any financial losses. You should always test your strategies thoroughly in a paper trading account before deploying with real capital.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages