`payoff`

calculates the per-unit option payoff for digital, best-of, and worst-of multi-asset options.

1 | ```
payoff(payType, pcFlag, strike, S)
``` |

`payType` |
case; if 0, digital payoff, if 1, best-of payoff, if 2, worst-of payoff. |

`pcFlag` |
case vector; if 0, call, if 1, put. |

`strike` |
vector; option strikes. |

`S` |
list containing the vectors of spatial grid points associated with each underlying. Vector sizes of underlying spatial grid points need not be equal. |

`payoff`

returns an array of the unit option values at each point spanned by the list of underlying vectors. Dimension of array is inhereted from `S`

.

Michael Eichenberger and Carlo Rosa

1 2 3 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.