pfhedge.nn¶
pfhedge.nn
provides torch.nn.Module
that are useful for Deep Hedging.
See PyTorch Documentation
for general usage of torch.nn.Module
.
Hedger Module¶
Module to hedge and price derivatives. |
Black-Scholes Layers¶
Creates Black-Scholes formula module from a derivative. |
|
Black-Scholes formula for an American binary option. |
|
Black-Scholes formula for a European option. |
|
Black-Scholes formula for a European binary option. |
|
Black-Scholes formula for a lookback option with a fixed strike. |
Whalley-Wilmott Layers¶
Creates a module for Whalley-Wilmott's hedging strategy. |
Nonlinear Activations¶
Clamp all elements in |
|
Leakily clamp all elements in |
Loss Functions¶
Base class for hedging criteria. |
|
Creates a criterion that measures the expected exponential utility. |
|
Creates a criterion that measures the entropic risk measure. |
|
Creates a criterion that measures the expected shortfall. |
|
Creates a criterion that measures the QuadraticCVaR. |
|
Creates a criterion that measures the expected isoelastic utility. |
Multi Layer Perceptron¶
Creates a multilayer perceptron. |
Other Modules¶
Returns a tensor filled with the scalar value zero. |
|
Returns total variance in the SVI model. |