pfhedge.nn.functional.european_forward_start_payoff¶
- pfhedge.nn.functional.european_forward_start_payoff(input, strike=1.0, start_index=0, end_index=- 1)[source]¶
Returns the payoff of a European forward start option.
- Parameters
input (torch.Tensor) – The input tensor representing the price trajectory.
strike (float, default=1.0) – The strike price of the option.
start_index (int, default=0) – The time index at which the option starts.
end_index (int, default=-1) – The time index at which the option ends.
- Shape:
input: \((*, T)\) where \(T\) is the number of time steps and \(*\) means any number of additional dimensions.
output: \((*)\)
- Returns
torch.Tensor