pfhedge.nn.functional.d1¶
- pfhedge.nn.functional.d1(log_moneyness, time_to_maturity, volatility)[source]¶
Returns \(d_1\) in the Black-Scholes formula.
\[d_1 = \frac{s}{\sigma \sqrt{t}} + \frac{\sigma \sqrt{t}}{2}\]where \(s\) is the log moneyness, \(t\) is the time to maturity, and \(\sigma\) is the volatility.
Note
Risk-free rate is set to zero.
- Parameters
log_moneyness (torch.Tensor or float) – Log moneyness of the underlying asset.
time_to_maturity (torch.Tensor or float) – Time to maturity of the derivative.
volatility (torch.Tensor or float) – Volatility of the underlying asset.
- Returns
torch.Tensor