Skip to main content
ForexNews24
ArbitragePythonProfessional

QuantArb Engine: trading robot for Python

Author: ForexNews24 R&D team

QuantArb Engine is an arbitrage advisor that profits from price dislocations between related instruments.

How the advisor works

The advisor tracks several related instruments and looks for the moment when their ratio deviates from the norm, allowing a chain of trades to be executed profitably without directional risk. Automation is mandatory: the window of opportunity lives fractions of a second.

Pure arbitrage on liquid markets has almost disappeared — dislocations are removed by high-frequency systems faster than a retail trader can react. The accessible variant is statistical arbitrage, but it carries the risk of the relationship between instruments breaking down.

Parameters and metrics

Advisor parameters
ParameterValue
Entry thresholdcosts + 0.2 pip buffer
Execution latency< 5 ms
Venues3 simultaneously
LanguagePython + FIX API

Why this advisor cannot be honestly tested on our data

An arbitrage engine holds a connection to several instruments at once and executes them synchronously — its entire logic is built on this. The MetaTrader tester runs an advisor on a single symbol, so reproducing a multi-symbol arbitrage position in it is technically impossible, and on the single EUR/USD pair there is nothing to build it from.

What an honest test would require
Time-synchronized quotes of several related instruments, a multi-symbol execution engine, and analysis of the stability of the relationship (cointegration) are needed; for pure arbitrage, also tick data with low-latency infrastructure.

We deliberately do not show a backtest here: a tester report computed on unsuitable data would create a false impression of how the advisor behaves on a live account.

From the authors' review
«An arbitrage engine does not "predict" the market — it exploits the fact that the market physically cannot be consistent with itself across all venues at once, if only for milliseconds.»

Pros and cons

Pros
  • Profit is almost independent of market direction.
  • Market-neutral while the instruments’ relationship holds.
  • Based on a measurable dislocation.
Cons
  • Pure arbitrage on liquid markets has practically disappeared.
  • Requires several instruments and low latency.
  • The statistical variant collapses when the relationship breaks.

Pitfalls

A statistical-arbitrage advisor is undone by the breakdown of the very relationship the strategy is built on: while the dependency holds, divergences revert and create false confidence, but on a structural shift the relationship breaks and both legs of the position take losses at once. The "market-neutral" robot turns out, at that moment, to be a directional bet.

Who it suits

For traders who understand the statistics of relationships between instruments and have infrastructure for simultaneous execution. Requires monitoring the stability of the relationship and readiness for its breakdown.

Related methodology

Methodology
Arbitrage

Frequently asked questions

Why is a standard tester unsuitable for an arbitrage advisor?

The MetaTrader tester works with one symbol per run, while an arbitrage engine holds several instruments at once and executes them synchronously. A multi-symbol position cannot be reproduced in a single-threaded tester.

Does risk-free arbitrage still exist?

On liquid markets it has practically disappeared: dislocations are removed in fractions of a second by high-frequency systems. A retail trader has access to statistical arbitrage, with the risk of the relationship breaking down.

What is the main risk of such an engine?

The breakdown of the relationship between instruments: the divergence stops reverting to the norm, and both legs of the position go into the red at once, despite the "neutrality".

From research to application

In our Allocation product we implemented these algorithms with all the nuances covered across the portal.

Learn about Allocation