Expand description
Shared option types and BSM parameter packs.
§Trading vs engineering
- Trading:
OptionTypeis the side of the contract;BsmParamsis the market + contract snapshot you reprice (spot from the tape, strike/expiry fixed, vol from your surface or from mid via IV). - Engineering: keep
BsmParamsas a plainCopystruct so configs and message handlers stay allocation-free; validate once withValidatedBsm::newor store acrate::derivatives::BsmStateper contract key.
Structs§
- BsmParams
- Black–Scholes–Merton inputs (European, continuous dividend yield
q). - Validated
Bsm - Validated BSM pack (strictly positive S,K; non-negative T,σ; finite rates).
Enums§
- Option
Type - 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).