High-Frequency-Trading-Model-with-IB  by jamesmawm

Trading model using Interactive Brokers API for high-frequency data studies

created 11 years ago
2,678 stars

Top 18.0% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a Python-based high-frequency trading model that leverages the Interactive Brokers API for executing pairs and mean-reversion strategies. It is designed for traders and researchers interested in automating trades, exploring high-frequency data, and building algorithmic trading systems.

How It Works

The model employs statistical arbitrage techniques, including bootstrapping with historical data for parameter derivation, resampling time series for homogeneity, and identifying highly correlated tradable pairs. It supports shorting one instrument and longing another, using volatility ratios for trend detection, and calculating fair security valuation via beta. Trade signals are generated based on incoming tick data, with beta re-evaluation at configurable intervals.

Quick Start & Requirements

Highlighted Details

  • Migrated from ibpy to ib_insync library in version 3.0.
  • Supports headless running via Docker for remote execution.
  • Inspired by academic research and books on high-frequency finance.
  • Includes a disclaimer that the model has not been proven profitable in a live account.

Maintenance & Community

The project saw its last update in June 2019 (Version 3.0). The author also published a book, "Mastering Python for Finance - Second Edition," with related source codes available on GitHub.

Licensing & Compatibility

The repository does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is described as a work in progress, with version 2.0 noting many outdated components and the trading model being unlikely to work as intended. The included strategy parameters are theoretical and not adjusted for back-tested results. The model has only been tested in a demo account.

Health Check
Last commit

2 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
59 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.