Interpreting a Rateslib Curve Parameterized by Discount Factors
Summary
The document clarifies the meaning of a curve constructed with Rateslib from dated nodes and numeric values. The example supplies an initial node with value one, followed by later nodes with lower values. The accepted explanation identifies these node values as discount factors, so the object represents a discount curve rather than an unspecified rate curve. The initial date’s value of one anchors discounting at the curve’s starting point.
The response also makes the curve’s default construction choices explicit: log-linear interpolation, a modified following date adjustment, and an ACT/360 day-count convention. These settings determine how values between nodes are interpolated and how dates and year fractions are handled. The note answers the curve-type question, but it does not describe calibration from market instruments, alternative interpolation methods, or how to interpret the resulting forward rates. The node values alone define the supplied curve representation; they do not explain how those values were sourced.
Key ideas
- The Rateslib curve shown is parameterized by discount factors at dated nodes.
- The starting node is assigned a value of one to anchor the discount curve.
- The example uses log-linear interpolation between the supplied nodes.
- Date adjustment and day-count conventions are part of the curve’s defaults.
- The example identifies the curve representation but does not explain market calibration.
Tags
Full text
# Curve construction with Python's RATESLIB package
# Curve construction with Python's RATESLIB package
As per the user guide of Python's RATESLIB package (https://rateslib.readthedocs.io/en/latest/i_guide.html#guide-doc), below example is provided to construct a Curve
```
from rateslib.curves import Curve
usd_curve = Curve(
nodes={
dt(2022, 1, 1): 1.0,
dt(2022, 7, 1): 0.98,
dt(2023, 1, 1): 0.95
},
calendar="nyc",
)
```
My question what is the type of the curve? Is it basically a `discount curve`? I dont seem to find any such definition in their User guide.
## Answer by Attack68 (score 2, accepted)
https://quant.stackexchange.com/a/76398
That is a curve parametrised by discount factors. The initial node date must be 1.0.
Including the defaults that curve is actually the same as
```
usd_curve = Curve(
nodes={
dt(2022, 1, 1): 1.0,
dt(2022, 7, 1): 0.98,
dt(2023, 1, 1): 0.95
},
calendar="nyc",
interpolation="log_linear",
modifier="MF",
convention="ACT360",
)
usd_curve.plot("1b")
```Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.