FinancePy

FinancePy API Reference

equity digital option

financepy.products.equity.equity_digital_option

Class

EquityDigitalOption

EquityDigitalOption( expiry_dt: Date, barrier: float, call_put_type: OptionTypes, digital_type: DigitalOptionTypes, ) -> None
Inherits from: EquityOption
A EquityDigitalOption is an option in which the buyer receives some payment if the stock price has crossed a barrier ONLY at expiry and zero otherwise. There are two types: cash-or-nothing and the asset-or-nothing option. We do not care whether the stock price has crossed the barrier today, we only care about the barrier at option expiry. For a continuously- monitored barrier, use the EquityOneTouchOption class.

Methods

value

value( self, value_dt: Date, stock_price: float | numpy.ndarray, discount_curve: DiscountCurve, dividend_curve: DiscountCurve, model: Model, )
Digital Option valuation using the Black-Scholes model assuming a barrier at expiry. Handles both cash-or-nothing and asset-or-nothing options.

value_mc

value_mc( self, value_dt: Date, stock_price: float, discount_curve: DiscountCurve, dividend_curve: DiscountCurve, model: Model, num_paths: int = 10000, seed: int = 4242, )
Digital Option valuation using the Black-Scholes model and Monte Carlo simulation. Product assumes a barrier only at expiry. Monte Carlo handles both a cash-or-nothing and an asset-or-nothing option.
Generated automatically from the FinancePy source code. Do not edit this file manually.