pfhedge.nn.functional.bs_european_delta¶
- pfhedge.nn.functional.bs_european_delta(log_moneyness, time_to_maturity, volatility, call=True)[source]¶
Returns Black-Scholes delta of a European option.
See also
- Parameters
log_moneyness (torch.Tensor, optional) – Log moneyness of the underlying asset.
time_to_maturity (torch.Tensor, optional) – Time to expiry of the option.
volatility (torch.Tensor, optional) – Volatility of the underlying asset.
- Shape:
log_moneyness: \((N, *)\) where \(*\) means any number of additional dimensions.
time_to_maturity: \((N, *)\)
volatility: \((N, *)\)
output: \((N, *)\)
- Returns
torch.Tensor
Examples
>>> from pfhedge.nn.functional import bs_european_delta ... >>> bs_european_delta(torch.tensor([-0.1, 0.0, 0.1]), 1.0, 0.2) tensor([0.3446, 0.5398, 0.7257])