AlgoTraderAlgoTrader Documentation

Chapter 24. Synthetic Securities and Derivative Spreads

24.1. Combination Example
24.2. Combination Service
24.2.1. Create Combination
24.2.2. Update Component Quantity
24.2.3. Remove a Component
Combinations and Components

Figure 24.1. Combinations and Components

AlgoTrader supports Synthetic Securities & Derivative Spreads based on the two Entities Combination and Component.

Combinations are handled like every other Security. A Combination consists of one or many Components. Each component has a quantity.

When trading combinations there are two options:

  • tradable / non-synthetic combinations

  • synthetic / non-tradable combinations

For synthetic / non-tradable combinations the AlgoTrader Server generates Ticks based on the size of the components of the combination and the current market values of the associated securities. This calculation is handled by the module module-combination.epl which provides the Component Window.


It is possible to trade tradable / non-synthetic combinations through the IB interface. For combination orders AlgoTrader will place BAG orders through the IB interface. For this to work it is necessary to have conids defined for all components of the combination.

On executions AlgoTrader will create fills for each component and for the combination itself. As a consequence there will be positions on all components as well as the combination itself.

A Combination is available to all strategies and can be subscribed/unsubscribed in the usual manner.

The example above shows a Combination based on 11 ES Mini September 2018 Futures and 3 ES Mini December 2018 Futures. The example shows that the market price of the combination is based on the total prices of both components, e.g. for the ask price:

11 x 2773 + 3 x 2777 = 38834

The CombinationService is responsible for handling all Combination / Component related DB-Operations.