pfhedge.nn.functional.isoelastic_utility

pfhedge.nn.functional.isoelastic_utility(input, a)[source]

Applies an isoelastic utility function.

An isoelastic utility function is defined as:

\[\begin{split}u(x) = \begin{cases} x^{1 - a} & a \neq 1 \\ \log{x} & a = 1 \end{cases} \,.\end{split}\]
Parameters
  • input (torch.Tensor) – The input tensor.

  • a (float) – Relative risk aversion coefficient of the isoelastic utility.

Returns

torch.Tensor