pfhedge.nn.functional.ncdf

pfhedge.nn.functional.ncdf(input)[source]

Returns a new tensor with the normal cumulative distribution function.

\[\text{ncdf}(x) = \int_{-\infty}^x \frac{1}{\sqrt{2 \pi}} e^{-\frac{y^2}{2}} dy\]
Parameters

input (torch.Tensor) – The input tensor.

Returns

torch.Tensor

Examples

>>> from pfhedge.nn.functional import ncdf
>>>
>>> input = torch.tensor([-1.0, 0.0, 10.0])
>>> ncdf(input)
tensor([0.1587, 0.5000, 1.0000])