Interpolator
financepy.market.curves.interpolator
Classes
InterpTypes
InterpTypes(*values)
Inherits from: Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum):
... RED = 1
... BLUE = 2
... GREEN = 3
Access them by:
- attribute access:
>>> Color.RED
<Color.RED: 1>
- value lookup:
>>> Color(1)
<Color.RED: 1>
- name lookup:
>>> Color['RED']
<Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own
attributes -- see the documentation for details.
Interpolator
Interpolator(interpolator_type: 'InterpTypes', **kwargs: 'dict') -> 'None'
Discount-factor interpolator.
The class separates fitting from evaluation:
* ``fit`` validates and stores the market knots, and builds any expensive
spline representation once.
* ``interpolate`` performs the cheapest possible evaluation path for the
selected interpolation type.
Methods
fit
fit(self, times: 'np.ndarray', dfs: 'np.ndarray') -> 'None'
No description available.
interpolate
interpolate(self, t: 'Union[float, np.ndarray]')
No description available.
suitable_for_bootstrap
suitable_for_bootstrap(cls, interp_type: 'InterpTypes') -> 'bool'
No description available.
Functions
interpolate
interpolate(t: 'Union[float, np.ndarray]', times: 'np.ndarray', dfs: 'np.ndarray', method: 'int')
Fast stand-alone discount-factor interpolation.
This compatibility wrapper supports the original three Numba-backed methods:
flat forwards, linear forwards and linear zero rates.
Generated automatically from the FinancePy source code.
Do not edit this file manually.