AlgoTraderAlgoTrader Documentation

Chapter 14. Options & Futures

14.1. Expiration
14.2. Leverage & Exposure
14.3. Symbol, ISIN & RIC
14.4. Delta Hedging
14.5. Option & Future Chain Download
14.6. Option Greeks
14.7. Option Pricing Engine
14.7.1. SABR Calibration
14.7.2. Option Pricing
14.7.3. References
14.8. OTC Options

Both Options and Futures implement the interface ExpirableI which has a property expiration that represents the expiration date.

For hints on how to roll futures and options, see Section, “Rolling of Futures and Options”.

In addition to the expiration date (sometimes also called lastTradingDay) Futures also have the following two fields:

  • firstNoticeDay: this is the day on which the buyer of a futures contract can be called upon by the exchange to take delivery

  • maturityMonthYear. The contract month & year of a future


expiration and maturityMonthYear do not necessarily need to be within the same month. e.g. maturityMonthYear: 2015-12, expiration: 2015-11-30

The following table contains references on how these three fields are used by different market data providers

For an detailed explanation between lastTradingDay and firstNoticeDay please visit this page on futures expiration


IB also shows an expiration date in TWS which is either the same day or the next day after the last trading day

AlgoTrader uses the following definitions for Leverage & Exposure:


Contract Size


Current Value


Underlying Spot price






AlgoTrader uses the Delta-adjusted Option Leverage as Option Leverage.

The two classes FutureSymbol and OptionSymbole provide static methods for generating the Symbol, ISIN and RIC for Futures and Options. Both Symbol and ISIN use the property symbolRoot of the SecurityFamly. The RIC on the other side uses the property ricRoot.

Automatic Delta Hedging is provided by the Service ch.algotrader.service.OptionService. The method hedgeDelta will calculate the delta adjusted market value for all securities based on one particular underlying. The method will subsequently build up a hedging position based on the nearest Future of the same underlying. Since some underlying have more than one Futures Chain based on them, the property hedgingFamily needs to be defined on the Subscription of the underlying. In addition the method hedgeDelta can also be invoked with the ServerManagementService.

Te ReferenceDataService can be used to download all currently traded and past Options and/or Futures into the database, see Chapter 19, Reference Data.

The following Option Greeks are available through the Class OptionUtil:

The system provides a sophisticated option pricing engine which is developed around the SABR volatility Model.

Based on historical Volatility at different Moneyness levels (e.g. ATM, ATM +10%, ATM +20%, ATM -10% & ATM-20%) or Delta levels (e.g. 50%, 35%, 75%) volatility parameters are calculated (=calibration) and used for option pricing.

Since OTC Options do not have a predefined chain definition, the OptionService contains a method createOTCOption to create an OTC option based on the specified expirationDate, strike and type.