Building Discount Curves from Spot Rates with Zero-Curve Interpolation
Summary
When spot rates and their dates are already available, a discount curve can be constructed directly from those inputs, without using bond helpers calibrated from par yields. The answer describes the required data as dates, zero yields, and a day-count convention, with additional curve settings available through defaults.
It points to several interpolation choices for zero curves, including linear, log-linear, cubic, natural cubic, log-cubic, and monotonic cubic forms. These alternatives provide different ways to interpolate between supplied rate observations when producing a curve for bond pricing. The material is a practical pointer to available curve classes rather than a comparison of their behavior: it gives no guidance on selecting an interpolation method, handling extrapolation, or validating resulting prices. The listed examples are specific to QuantLib’s interface.
Key ideas
- Known spot rates and dates can be used directly to construct a discount curve without bond helpers.
- Curve construction requires dates, zero yields, and a day-count convention.
- Zero curves support several interpolation choices, including linear, log-linear, and cubic variants.
- The source lists available methods but does not compare their pricing behavior or recommend one for a particular use.
Tags
Full text
# Interpolation for discount curve building QuantLib for bonds # Interpolation for discount curve building QuantLib for bonds I'm trying to figure out how to build a discount curve to price bonds from spot rates using some advance interpolation methods like PiecewiseLogCubicDiscount. I know I can build this curve with BondHelpers if I have par bond yield, but what if I only have spot rates? The only example I've seen so far has liner interpolation on rates. ## Answer by David Duarte (score 2, accepted) https://quant.stackexchange.com/a/51613 If you have the spot rates, you don't need helpers and you can build the curve directly with spot rates and dates. You have several interpolation possibilities that have the same required inputs: dates, yields, dayCounter. There are other optional parameters that have defaults. Here are some example of the classes, where the names are hopefully self explanatory: ``` import QuantLib as ql dates = [ql.Date(31,12,2019), ql.Date(31,12,2020), ql.Date(31,12,2021)] zeros = [0.01, 0.02, 0.03] ql.ZeroCurve(dates, zeros, ql.ActualActual()) ql.LogLinearZeroCurve(dates, zeros, ql.ActualActual()) ql.CubicZeroCurve(dates, zeros, ql.ActualActual()) ql.NaturalCubicZeroCurve(dates, zeros, ql.ActualActual()) ql.LogCubicZeroCurve(dates, zeros, ql.ActualActual()) ql.MonotonicCubicZeroCurve(dates, zeros, ql.ActualActual()) ```
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.