NautilusTrader
ConceptsInstruments

Option Contract

OptionContract represents a listed put or call option on a non-crypto underlying. It defines the option kind, strike price, activation time, expiration time, currency, multiplier, and lot size.

Examples include equity options, index options, and futures options.

Fields

FieldRust typePython typeRequired/defaultNotes
instrument_idInstrumentIdInstrumentIdRequiredStored as id in Rust.
raw_symbolSymbolSymbolRequiredNative venue symbol.
asset_classAssetClassAssetClassRequiredAsset class of the underlying.
exchangeOption<Ustr>str | NoneNoneExchange MIC or venue code when known.
underlyingUstrstrRequiredUnderlying asset, future, or index.
option_kindOptionKindOptionKindRequiredPut or call.
strike_pricePricePriceRequiredOption strike price.
activation_nsUnixNanosintRequiredContract activation timestamp.
expiration_nsUnixNanosintRequiredContract expiration timestamp.
currencyCurrencyCurrencyRequiredPremium quote and settlement currency.
price_precisionu8intRequiredDecimal places allowed for prices.
price_incrementPricePriceRequiredSmallest valid price step.
size_precisionu8int0Options trade in whole contracts.
size_incrementQuantityQuantity1Minimum contract size step.
multiplierQuantityQuantityRequiredContract multiplier.
lot_sizeQuantityQuantityRequiredRounded lot or contract lot size.
margin_initOption<Decimal>Decimal | None0Initial margin rate.
margin_maintOption<Decimal>Decimal | None0Maintenance margin rate.
maker_feeOption<Decimal>Decimal | None0Maker fee rate. Negative values rebate.
taker_feeOption<Decimal>Decimal | None0Taker fee rate. Negative values rebate.
max_quantityOption<Quantity>Quantity | NoneNoneMaximum order quantity.
min_quantityOption<Quantity>Quantity | None1Minimum order quantity.
max_priceOption<Price>Price | NoneNoneMaximum valid quote or order price.
min_priceOption<Price>Price | NoneNoneMinimum valid quote or order price.
tick_scheme_nameN/Astr | NoneNoneRegistered variable tick scheme name.
infoOption<Params>dict | NoneNoneAdapter metadata.
ts_eventUnixNanosintRequiredEvent timestamp in nanoseconds.
ts_initUnixNanosintRequiredInitialization timestamp in nanoseconds.

Note: Python constructors use instrument_id; Rust stores the same value as id.

Behavior

  • OptionContract has instrument class Option.
  • It trades in whole contracts with size precision 0 and size increment 1.
  • The option kind and strike price define the payoff shape.
  • Use CryptoOption for options where the underlying and settlement are crypto currencies.

Example

use chrono::{TimeZone, Utc};
use nautilus_core::UnixNanos;
use nautilus_model::{
    enums::{AssetClass, OptionKind},
    identifiers::{InstrumentId, Symbol},
    instruments::OptionContract,
    types::{Currency, Price, Quantity},
};
use ustr::Ustr;

let activation = Utc.with_ymd_and_hms(2021, 9, 17, 0, 0, 0).unwrap();
let expiration = Utc.with_ymd_and_hms(2021, 12, 17, 0, 0, 0).unwrap();

let aapl_call = OptionContract::new(
    InstrumentId::from("AAPL211217C00150000.OPRA"),
    Symbol::from("AAPL211217C00150000"),
    AssetClass::Equity,
    Some(Ustr::from("GMNI")),
    Ustr::from("AAPL"),
    OptionKind::Call,
    Price::from("150.00"),
    Currency::from("USD"),
    UnixNanos::from(activation.timestamp_nanos_opt().unwrap() as u64),
    UnixNanos::from(expiration.timestamp_nanos_opt().unwrap() as u64),
    2,
    Price::from("0.01"),
    Quantity::from("100"),
    Quantity::from("1"),
    None,
    None,
    None,
    None,
    None,
    None,
    None,
    None,
    None,
    UnixNanos::default(),
    UnixNanos::default(),
);

Adapters

Representative adapters that create or consume OptionContract instruments include:

  • Options covers option data, Greeks, and chain subscriptions.
  • Crypto Option covers crypto option contracts.

On this page