finpricing.utils.interpolator#

Module Contents#

Classes#

InterpTypes

Generic enumeration.

CurveInterpolator

Interpolator

class finpricing.utils.interpolator.InterpTypes[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

FLAT_FWD_RATES = 1#
class finpricing.utils.interpolator.CurveInterpolator[source]#
class finpricing.utils.interpolator.Interpolator(times, dfs, method: InterpTypes = InterpTypes.FLAT_FWD_RATES)[source]#

Bases: CurveInterpolator

property times#
property dfs#
__repr__() str[source]#

Return repr(self).

validate() None[source]#

Validate input data

eval(t: float) float[source]#

Evaluate discount factor at time t

Parameters:

t (float) – time (fraction of year)

Returns:

interpolated discount factor

Return type:

float