Skip to main content

Module types

Module types 

Source
Expand description

Shared option types and BSM parameter packs.

§Trading vs engineering

  • Trading: OptionType is the side of the contract; BsmParams is the market + contract snapshot you reprice (spot from the tape, strike/expiry fixed, vol from your surface or from mid via IV).
  • Engineering: keep BsmParams as a plain Copy struct so configs and message handlers stay allocation-free; validate once with ValidatedBsm::new or store a crate::derivatives::BsmState per contract key.

Structs§

BsmParams
Black–Scholes–Merton inputs (European, continuous dividend yield q).
ValidatedBsm
Validated BSM pack (strictly positive S,K; non-negative T,σ; finite rates).

Enums§

OptionType
Call or put (European exercise in this module).

Functions§

forward_moneyness
Forward moneyness S e^{(r-q)T} / K.
intrinsic
Intrinsic value (European exercise value at this spot).
spot_moneyness
Spot moneyness S / K (not forward-adjusted).
time_value
Time value = premium − intrinsic (floored at 0 for numerical noise).