pfhedge.nn.functional.lookback_payoff¶
- pfhedge.nn.functional.lookback_payoff(input, call=True, strike=1.0)[source]¶
Returns the payoff of a lookback option with a fixed strike.
See also
- Parameters
input (torch.Tensor) – The input tensor representing the price trajectory.
call (bool, default=True) – Specifies whether the option is call or put.
strike (float, default=1.0) – The strike price of the option.
- Shape:
input: \((*, T)\) where \(T\) is the number of time steps and \(*\) means any number of additional dimensions.
output: \((*)\)
- Returns
torch.Tensor