Payoffs¶
dummypy.payoffs
¶
Payoff functions for vanilla European option contracts.
call_payoff(spot, strike)
¶
Return the expiry payoff of a European call option.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spot
|
ArrayLike
|
Underlying spot price(s) at expiry. Scalars and array-likes are both accepted. |
required |
strike
|
float
|
Strike price of the option. |
required |
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
Element-wise payoff |
Source code in src/dummypy/payoffs.py
put_payoff(spot, strike)
¶
Return the expiry payoff of a European put option.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spot
|
ArrayLike
|
Underlying spot price(s) at expiry. Scalars and array-likes are both accepted. |
required |
strike
|
float
|
Strike price of the option. |
required |
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
Element-wise payoff |