FinancePy

FinancePy API Reference

Equity Digital Option

financepy.products.equity.equity_digital_option

Classes

EquityDigitalOption

EquityDigitalOption(expiry_dt: financepy.utils.date.Date, barrier: float, call_put_type: financepy.utils.global_types.OptionTypes, digital_type: financepy.utils.global_types.DigitalOptionTypes)
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: financepy.utils.date.Date, stock_price: float | numpy.ndarray, discount_curve: financepy.market.curves.discount_curve.DiscountCurve, dividend_curve: financepy.market.curves.discount_curve.DiscountCurve, 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: financepy.utils.date.Date, stock_price: float, discount_curve: financepy.market.curves.discount_curve.DiscountCurve, dividend_curve: financepy.market.curves.discount_curve.DiscountCurve, 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.