# jamesmawm/High-Frequency-Trading-Model-with-IB

A high-frequency trading model using Interactive Brokers API with pairs and mean-reversion in Python

Repository: https://github.com/jamesmawm/High-Frequency-Trading-Model-with-IB
Canonical: https://ross.abutalabs.com/products/high-frequency-trading-model-with-ib
Language: Python
License: MIT
License Family: permissive
Last push: 2025-05-29T13:24:00+00:00

## Health v2 (maintenance only)
Score: 34/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 24, release rhythm 8, longevity 100
- inputs: {"age_days": 4490, "days_push": 461, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2919, forks 678 (observed 2026-08-28T04:07:30.071191+00:00)

## What it is
A Python trading model that implements pairs trading and mean-reversion strategies on high-frequency data via the Interactive Brokers API. It runs from the console or headless in Docker and connects to IB Trader Workstation using the ib_insync library.

## Use cases
- run a pairs trading strategy on Interactive Brokers
- backtest mean-reversion on high-frequency market data
- automate trades through the IB TWS API
- deploy trading algos headless in Docker
- learn algorithmic trading with a working IB example

## When to choose
- you have an Interactive Brokers paper or live account and want a ready-made pairs/mean-reversion model
- you want a simple, MIT-licensed Python reference for trading via ib_insync
- you need to run trading instances remotely in Docker

## When to avoid
- you need a production-grade, actively maintained HFT system - the codebase is dated and the author notes it may not work as intended
- you trade through brokers other than Interactive Brokers
- you need true low-latency high-frequency execution - this is a basic model, not real HFT infrastructure

## Facets
- artifact type: application
- maturity: maintenance
- function: trading, workflow-automation, developer-tools
- domain: fintech
- platform: python, cross-platform
- tags: interactive-brokers, pairs-trading, mean-reversion, algorithmic-trading, ib-insync, high-frequency-trading, trading, automation, docker

## Member repositories
- jamesmawm/High-Frequency-Trading-Model-with-IB (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:30.071191+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:34:00.338965+00:00, confidence not recorded.
  - readme: https://github.com/jamesmawm/High-Frequency-Trading-Model-with-IB (fetched 2026-08-28T04:07:30.071191+00:00, sha 8fba43fab5e1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
