pfhedge.nn.functional¶
Payoff Functions¶
Returns the payoff of a European option. |
|
Returns the payoff of a lookback option with a fixed strike. |
|
Returns the payoff of an American binary option. |
|
Returns the payoff of a European binary option. |
|
Returns the payoff of a European forward start option. |
Nonlinear activation functions¶
Leakily clamp all elements in |
|
Clamp all elements in |
Criterion Functions¶
Applies an exponential utility function. |
|
Applies an isoelastic utility function. |
|
Returns the entropic risk measure. |
|
Returns the expected shortfall of the given input tensor. |
|
Returns the value at risk of the given input tensor. |
|
Returns the Quadratic CVaR of the given input tensor. |
Black-Scholes formulas¶
European option¶
Returns Black-Scholes price of a European option. |
|
Returns Black-Scholes delta of a European option. |
|
Returns Black-Scholes gamma of a European option. |
|
Returns Black-Scholes vega of a European option. |
|
Returns Black-Scholes theta of a European option. |
American binary option¶
Returns Black-Scholes price of an American binary option. |
|
Returns Black-Scholes delta of an American binary option. |
|
Returns Black-Scholes gamma of an American binary option. |
|
Returns Black-Scholes vega of an American binary option. |
|
Returns Black-Scholes theta of an American binary option. |
European binary option¶
Returns Black-Scholes price of a European binary option. |
|
Returns Black-Scholes delta of a European binary option. |
|
Returns Black-Scholes gamma of a European binary option. |
|
Returns Black-Scholes vega of a European binary option. |
|
Returns Black-Scholes theta of a European binary option. |
Lookback option¶
Returns Black-Scholes price of a lookback option. |
|
Returns Black-Scholes delta of a lookback option. |
|
Returns Black-Scholes gamma of a lookback option. |
|
Returns Black-Scholes vega of a lookback option. |
|
Returns Black-Scholes theta of a lookback option. |
Other Functions¶
Does a bilinear interpolation of four tensors based on a scalar or tensor weights and returns the resulting tensor. |
|
Returns two tensors obtained by applying Box-Muller transformation to two input tensors. |
|
Returns \(d_1\) in the Black-Scholes formula. |
|
Returns \(d_2\) in the Black-Scholes formula. |
|
Returns a new tensor with the normal cumulative distribution function. |
|
Returns a new tensor with the normal distribution function. |
|
Returns the final profit and loss of hedging. |
|
Returns the realized variance of the price. |
|
Returns the realized volatility of the price. |
|
Returns variance in the SVI model. |
|
Alias for |
|
Returns the largest \(p * N\) elements of the given input tensor, where \(N\) stands for the total number of elements in the input tensor. |