pfhedge.features

pfhedge.features provides features for pfhedge.nn.Hedger.

Creation

get_feature

Get feature from name.

list_feature_names

Returns the list of the names of available features.

Derivatives Features

Moneyness

Moneyness of the derivative.

LogMoneyness

Log-moneyness of the derivative.

MaxMoneyness

Cumulative maximum of moneyness.

MaxLogMoneyness

Cumulative maximum of log Moneyness.

Barrier

A feature which signifies whether the price of the underlier have reached the barrier.

PrevHedge

Previous holding of underlier.

TimeToMaturity

Remaining time to the maturity of the derivative.

UnderlierSpot

Spot price of the underlier of the derivative.

Variance

Variance of the underlier of the derivative.

Volatility

Volatility of the underlier of the derivative.

Tensor Creation Ops

Empty

A feature filled with uninitialized data.

Ones

A feature filled with the scalar value 1.

Zeros

A feature filled with the scalar value 0.

Containers

ModuleOutput

The feature computed as an output of a torch.nn.Module.

FeatureList

Holds features in a list.