qdpmc.tools.payoffs.cash_or_nothing¶
- qdpmc.tools.payoffs.cash_or_nothing(underlying_price, strike, cash_amount)[source]¶
A cash-or-nothing payoff function.
- Parameters
underlying_price (
numpy.ndarray
) – An array of price of the underlying asset.strike (scalar) – The strike of the option.
cash_amount (scalar) – Amount of cash paid.
- Returns
numpy.ndarray
– The payoff array.