Synthetic Spread Strategies

Format: SPREAD (<CQG expression>, <calculation mode>, <tick size>, <trading ratio>, <BAT filter>, <rollover>, <rounding>)

Example: SPREAD(HOE-CLE, L1, 0.01, 1:2.5, T:BA, 1, MATH)

Spreads can also be written in common notation. For example:

      EP-ENQ

      EP-ENQ*2

Parentheses should include everything in the spread equation that follows SPREAD.

Each component should be separated by a comma. If a component is not included in your spread equation, but the following component is, you should include a comma for the first component. Spaces are optional.

Options format: C.<commodity prefix><instrument symbol><month code><two-digit year code><strike price>

P.<commodity prefix><instrument symbol><month code><two-digit year code><strike price>

Example: SPREAD(C.EU6Z113000-P.EU6Z113000)

 

Component

Description

CQG expression

Names the symbols and the optional multipliers for the spread. Each element of the expression can consist of one symbol and one multiplier.

For example: 0.5*EP-0.2*ENQ, 42*HOE-CLE, 1.6*FVA-USA, CLE-ET

Calculation mode

Identifies how you would like the spread calculated, by legs or currency.

Allowed values:

L1, L2, L3, etc. = Displays price based on tick value of leg selected.

CUR = Displays the price based on the full currency values of the legs.

Consider E-Mini S&P versus E-Mini NASDAQ 100 using a one contract leg-to-leg ratio. The dollar value of the E-Mini S&P is the price multiplied by $50. If the price of the futures contract is 1097.25, then the value of the contract is $54,862.50 (1097.25 * $50). The dollar value of the E-Mini NASDAQ 100 is the price multiplied by $20. If the price of the futures contract is 1798.00, then the value of the contract is $35,960 (1798.00 * $20). If you calculate EP-ENQ with CUR selected, the price displayed is $18,902.50 ($54,862.50-$35,960.00).

In the case of a spread where two legs trade in different currencies, adjust the expression to the appropriate currency using a conversion ratio, such as today’s exchange rate, as currency is calculated as a raw number and not as a monetary value in a base currency. For example, consider the DAX Index that trades in Euros versus the E-Mini S&P that trades in dollars. To adjust for Euro: SPREAD(DD-EP/1.5,CUR). For USD: SPREAD(1.5*DD-EP,CUR).

Price for spreads that include cash instruments inherit their formatting from the leg that is used for tick size calculation. For example, SPREAD(BUS02-TUA) is formatted in the same way as BUS02. If the calculation mode is changed to L2, then spread price is formatted in the same way as TUA. If you define the tick size, then the price is formatted as a rounded decimal. Applies to Order Ticket and DOMTrader only.

Default = L1

Tick size

Specifies the spread tick size. If all legs either have an equal tick size or are for the same contract, then the tick size is the spread tick size. If the tick size is not specified, then the spread tick size for leg mode is equal to the leg tick size.

Specify tick size in binary format as well as decimal format. Allowed values:

½, ¼, ⅛, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512, 1/1024, 1/2048, ½ 1/64, 1/32, ¼ 1/32, ½ 1/32

For example, SPREAD (USA*2 - ENQ,, 1/4 1/32). Some of the smallest tick sizes must be entered manually, as they are not available in the tick size menu.

For currency mode, the tick size represents the greatest common denominator (GCD) of leg tick values or the minimum tick value if the GCD is not applicable. For example: SPREAD (ZSE-ZME, CUR). GCD (12.5, 10) = 2.5. 2.5 is the largest number both 12.5 and 10 are divisible by.

Variable tick size

Trading ratio

Specifies the order quantity for each leg in this format: leg one:leg two:leg three. Values can be fractional. Fractional values can have six integers (0-9) both before and after the decimal, nnnnnn.nnnnnn.

For example:

SPREAD (EP*2-ENQ,,,2:1)

SPREAD (1.6*TYA-USA,,,5:3)

SPREAD ( EP - ENQ, , , 1 : 0 )

SPREAD ( EP - ENQ, , , 1.5 : 2.999999 )

Default = 1:1

BAT Filter

Each leg has a BAT (Bid/Ask and Trade) filter. Separate the filter for each leg with a colon. For example:

SPREAD ( EP * 2 - ENQ , , , , BA : T )

SPREAD ( EP - ENQ + TYA , , , , T : BA : BA )

Allowed values:

BA = If leg side is buy, leg ask price is used for spread ask price calculation and leg bid price is used for spread bid price calculation. If leg side is sell, leg ask price is used for spread bid price calculation and leg bid price is used for spread ask price calculation.

T = Trades of the given leg are used for both synthetic spread ask and bid prices calculation.

B = Leg ask price is used for spread ask price calculation and leg bid price is used for spread bid price calculation.

Default = BA

Rollover

If turned on, when one leg expires, all legs roll over to the same month. Allowed values:

0 = Same month rollover is turned off.

1 = Same month rollover is turned on.

Default = 0.

Rounding

Using a fractional trade ratio may result in fractional lots. If so, the number of lots has to be rounded. This parameters indicates how to round: up, down, or mathematically.

Rounding applies only to complex strategies with fractional trade ratios. Rounding applies to positive numbers. If used with a negative value, then rounding is applied to the absolute value and then the sign is changed.

Rounding impacts spread BBA volume, aggregation DOM volume, and aggregation trade volume.

Allowed values:

DOWN = always round down

UP = always round up

MATH = round up when fractional part is 5 or greater; round down when fractional part is less than 5

 

To create spread QFormulas

Additive and Multiplicative Formulas

For our purposes, “additive” formulas contain only addition and subtraction between legs.

“Multiplicative” formulas contain multiplication and division between legs. Multiplicative formulas can be used with additive formulas. For example:

SPREAD(A - SPREAD(B/C))

These formulas have several useful applications, especially when trading arbitrage strategies and ratio of prices instead of difference.

They can be used with:

      Alerts

      Charts

      DOMTrader

      Monitors

      Order Ticket

      Orders & Positions

      Quotes

      Simple Order Ticket

      SnapTrader

Multiplicative formulas can be used in conjunction with aggregation but not with yield and net change.

Additive formulas

Only addition and subtraction operations can be used between spread legs in additive formulas. Formulas can include offsets. For example:

EP * 2 - ENQ

SMA * 0.022 + ZLE * 11 - ZSE

EP - ENQ + 100.0

These additional rules apply:

      Every leg of the expression must include only one contract symbol and one constant multiplier.

Incorrect: EP * DD - ENQ

      Multipliers are positive or negative values.

Correct: 2 * ENQ - 4 * DD - EP

      Multipliers can be used in divisor form.

Correct: EP - ENQ * 0.5 or EP - ENQ / 2

Multiplicative formulas

Only multiplication and division operations can be used between spread legs in multiplicative formulas.

A leg multiplier must be a positive value. For example:

SPREAD(3.42 * A / (21 * B))

SPREAD(A / (5 * B) / C)

A multiplicative formula should include only those parentheses that contain one leg with its multiplier. The system removes all other parentheses. If the formula cannot be preserved without changing the order of legs, then the formula is rejected. For example:

SPREAD(A * B / (C * D)) becomes SPREAD(A * B / C / D)

SPREAD(A * B / (C / D)) becomes SPREAD(A * B / C * D)

Traders should explicitly nest strategies. For example:

SPREAD(EP * (TUA - TYA)) should be SPREAD(EP * SPREAD(TUA - TYA))

SPREAD(A * B / (C * D)) should be SPREAD(A * B / SPREAD(C * D))

Nested strategies cannot be expressed in simple notation. For example:

Correct: A * B / C * D

Correct: EP * ENQ

Correct: RBE / CLE

Incorrect: A * B / (C * D)

Incorrect: EP * (TUA - USA)

For buy spreads, legs used as multipliers are bought, and legs used as divisors are sold. Consider these examples from the buying perspective:

SPREAD(A / B)                  buy A, sell B

SPREAD(A * B)                  buy A, buy B

SPREAD(A * B / C)   buy A, buy B, sell C

SPREAD(A * B * C * D)       buy A, buy B, buy C, buy D

SPREAD(A / B / C / D)        buy A, sell B, sell C, sell D

With parameters

Calculation mode, tick size, trade ratio, BAT filter, and roll-over parameters can be used with multiplicative formulas. For example:

SPREAD ( EP * 2 - ENQ )

SPREAD ( SMA * 0.022 + ZLE * 11 - ZSE, L3 )

SPREAD ( SMA * 0.022 + ZLE * 11 - ZSE, L3, , 10:11:9 )

Tick size is not calculated automatically for spread formulas. If a spread tick size is specified explicitly, it is used regardless of leg tick sizes. When tick size is not specified:

      For both additive and multiplicative formulas in currency calculation mode, tick size of the first leg converted to the currency is used as spread tick size.

      For both additive and multiplicative formulas in leg calculation mode (L1, L2, etc.), tick size of the specified leg is used.

With aggregation

The AGGR() expression can be used with any leg of a multiplicative formula. For example:

SPREAD(A * AGGR(2 * B & C) / D

Also, multiplicative formulas can be used as any leg of aggregation expression. For example:

AGGR(A & SPREAD(B / C / D)))

As applied to arbitrage

To spread two similar commodities quoted in different currencies, traders can convert those commodities to one currency. For example, consider FSUGR and SBE. FSUGR, traded on RTS, is quoted in rubles. SBE, same spec traded on ICE, is quoted in dollars.

You can use FUS, which is futures on USD quoted in rubles (USD/RUR), to convert the sugar price in dollars to rubles. This spread expression is sugar quoted in rubles (2.2046 ratio used to convert pounds to tons):

SPREAD(2.2046 / 100 * SBE * FUS / 1000).

Now, you can arbitrage these two sugar contracts:

SPREAD(FSUGR - SPREAD(2.2046 / 100 * SBE * FUS / 1000))

Or use aggregation to buy sugar on both exchanges:

AGGR(FSUGR & SPREAD(2.2046 / 100 * SBE * FUS / 1000))

As applied to trading using ratio instead of difference

You can trade Gasoline/Crude Oil, Gold/Silver, Gold/Crude as well as other well-known ratios. For example:

SPREAD(RBE/CLE)

Buying this gasoline-crude spread enables you to buy RBE and sell CLE.

According to bid/ask calculation rules, bid/ask quotes are calculated as RBE divided by CLE.

Exchange-Traded Strategy Symbology