rburkholder/trade-frame

C++ 17 based library (with sample applications) for testing equities, futures, currencies, etfs & options based automated trading ideas using DTN IQFeed real time data feed and Interactive Brokers (IB TWS API) for trade execution. libtorch/lstm/cuda demo. Support for Alpaca & Phemex. Notifications via Telegram.

What it solves

Trade-frame is a C++ framework designed for high-capacity, low-latency trading applications. It specifically addresses the difficulty of tracking complex option combination orders (combos) through their entire lifecycle, allowing traders to group legs of a trade to monitor overall profit and loss more effectively than standard broker interfaces.

How it works

The framework consists of a library of functions for sinking market data, organizing time series, building indicators, and issuing orders. It utilizes a modular architecture with specific libraries for different functions:

  • Data & Execution: Integrates with providers like IQFeed, Interactive Brokers, and Alpaca for real-time market data and order execution.
  • Core Trading Logic: Manages positions, portfolios, and instruments through dedicated classes (Watch, Position, Portfolio).
  • Options Engine: A specialized engine computes Greeks in real-time for options trading.
  • Simulation: A simulation interface allows for offline strategy testing with a delay queue to simulate round-trip and slippage effects.
  • Storage: Uses HDF5 and SQLite for storing time series and trading records.

Who it’s for

This tool is designed for quantitative traders and developers building automated or manual trading systems, particularly those focusing on options, equities, futures, and futures options.

Highlights

  • Option Combo Tracking: Native support for grouping multiple security legs into a single combo for P&L tracking.
  • Low-Latency Focus: Built in C++17 for high-performance trading applications.
  • Multi-Broker Support: Compatible with Interactive Brokers, IQFeed, and Alpaca.
  • Strategy Testing: Includes a simulation engine for backtesting and offline testing of strategies.
  • ML Integration: Provides templates for automated trading and includes an LSTM-based model (via libtorch) for SPY prediction.

Related

  • Project
  • Project
  • Project
  • Project
  • Project