_WithOperations#
- class rateslib.curves._WithOperations#
Bases:
object
Provides automatic implementation of the curve operations required on a
_BaseCurve
.Methods Summary
roll
(tenor[, id])Create a
RolledCurve
: translating the rate space of Self in time.shift
(spread[, id])Create a
ShiftedCurve
: moving Self vertically in rate space.translate
(start[, id])Create a
TranslatedCurve
: maintaining an identical rate space, but moving the initial node date forwards in time.Methods Documentation
- roll(tenor, id=NoInput.blank)#
Create a
RolledCurve
: translating the rate space of Self in time.For examples see the documentation for
RolledCurve
.- Parameters:
tenor (datetime, str or int) – The measure of time by which to translate the curve through time.
id (str, optional) – Set the id of the returned curve.
- Return type:
- shift(spread, id=NoInput.blank)#
Create a
ShiftedCurve
: moving Self vertically in rate space.For examples see the documentation for
ShiftedCurve
.- Parameters:
- Return type:
- translate(start, id=NoInput.blank)#
Create a
TranslatedCurve
: maintaining an identical rate space, but moving the initial node date forwards in time.For examples see the documentation for
TranslatedCurve
.- Parameters:
start (datetime) – The new initial node date for the curve. Must be after the original initial node date.
id (str, optional) – Set the id of the returned curve.
- Return type: