AlgoTraderAlgoTrader Documentation

Chapter 17. Options & Futures

17.1. Expiration
17.2. Leverage & Exposure
17.3. Symbol, ISIN & RIC
17.4. Delta Hedging
17.5. Option & Future Chain Download
17.6. Option Greeks
17.7. Option Pricing Engine
17.7.1. SABR Calibration
17.7.2. Option Pricing
17.7.3. References
17.8. OTC Options

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

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

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

Note

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:


CS

Contract Size

CV

Current Value

S

Underlying Spot price

D

Delta

Q

Quantity

Note

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 underlyings 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 23, 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.