Zeros

class pfhedge.features.Zeros[source]

A feature filled with the scalar value 0.

Name:

'zeros'

Examples

>>> from pfhedge.features import Zeros
>>> from pfhedge.instruments import BrownianStock
>>> from pfhedge.instruments import EuropeanOption
...
>>> derivative = EuropeanOption(BrownianStock(), maturity=5/250, strike=2.0)
>>> derivative.simulate()
>>> f = Zeros().of(derivative)
>>> f.get()
tensor([[[0.],
         [0.],
         [0.],
         [0.],
         [0.],
         [0.]]])