qdpmc.tools.payoffs.plain_vanilla¶
- qdpmc.tools.payoffs.plain_vanilla(underlying_price, strike, option_type='call')[source]¶
A plain-vanilla payoff function.
- Parameters
underlying_price (
numpy.ndarray
) – An array of price of the underlying asset.strike (scalar) – The strike of the option.
option_type (
str
) – “put” or “call”.
- Returns
numpy.ndarray
– The payoff array.