NautilusTrader
ConceptsData
These docs track the unreleased nightly build and may change without notice. Switch to the latest stable docs.

OptionGreeks

OptionGreeks represents venue‑provided option sensitivities and implied volatility for one option instrument. As a native Data enum variant, it can be recorded, replayed, and queried through the catalog.

Fields

FieldRust typePython typeRequired/defaultNotes
instrument_idInstrumentIdInstrumentIdRequiredOption instrument for the Greeks.
conventionGreeksConventionGreeksConventionDefaultNumeraire convention for the values.
greeksOptionGreekValuesSeparate floatsRequiredDelta, gamma, vega, theta, and rho.
mark_ivOption<f64>float | NoneNoneMark implied volatility.
bid_ivOption<f64>float | NoneNoneBid implied volatility.
ask_ivOption<f64>float | NoneNoneAsk implied volatility.
underlying_priceOption<f64>float | NoneNoneUnderlying price used for the calculation.
open_interestOption<f64>float | NoneNoneOpen interest when published.
ts_eventUnixNanosintRequiredEvent timestamp in nanoseconds.
ts_initUnixNanosintRequiredInitialization timestamp in nanoseconds.

Behavior

  • OptionGreeks dereferences to its core OptionGreekValues on the Rust surface.
  • The Python constructor accepts delta, gamma, vega, theta, and optional rho as separate float arguments.
  • Option chain subscriptions use underlying_price and deltas to resolve ATM and delta‑based strike windows.

Example

use nautilus_core::UnixNanos;
use nautilus_model::{
    data::{OptionGreekValues, OptionGreeks},
    enums::GreeksConvention,
    identifiers::InstrumentId,
};

let greeks = OptionGreeks {
    instrument_id: InstrumentId::from("BTC-20240628-65000-C.DERIBIT"),
    convention: GreeksConvention::PriceAdjusted,
    greeks: OptionGreekValues {
        delta: 0.51,
        gamma: 0.0002,
        vega: 12.5,
        theta: -3.2,
        rho: 0.1,
    },
    mark_iv: Some(0.55),
    bid_iv: Some(0.54),
    ask_iv: Some(0.56),
    underlying_price: Some(65_000.0),
    open_interest: Some(120.0),
    ts_event: UnixNanos::from(1_000_000_000),
    ts_init: UnixNanos::from(1_000_000_100),
};

On this page