Skip to content
All library documents

Mixing Short-End Steps and Long-End Interpolation in QuantLib Curves

Article Quant Q&A · Author: George

Summary

The document asks whether a QuantLib term structure can use one interpolation style for the short end and another beyond a chosen maturity. The example is an overnight-indexed swap curve with flat, stepwise behavior around central-bank meeting dates, followed by a smoother interpolation farther along the curve. It highlights a compatibility constraint: the interpolation methods must operate on the same curve quantity, such as forwards or discounts, to be mixed directly.

The replies describe mixed interpolation support in QuantLib and give an example of a log-discount curve using mixed linear and cubic behavior. This addresses the general idea, but does not demonstrate that the example produces the requested meeting-date steps or explain the calibration helpers and pillar setup. Users should check the available bindings and confirm that the chosen interpolation and curve construction match their intended short-end behavior.

Key ideas

  • A curve may need different interpolation behavior at short and long maturities.
  • QuantLib mixed interpolation combines methods applied to the same curve quantity.
  • A mixed linear-cubic discount interpolation is cited as an available construction.
  • The example does not establish that meeting-date steps are achieved without further curve setup.

Tags

Full text
# Combining term structure types in Quantlib


# Combining term structure types in Quantlib












Is it possible to combine multiple term structure types for curve construction in quantlib?

Specifically I want to be able to construct an OIS curve that is stepped in the short end with pillars at central bank meeting dates - and interpolated past say the 1 year point.

For example I would like to use the PiecewiseFlatForward curve type for the stepped part, and the PiecewiseLogCubicDiscount beyond.

## Answer by Luigi Ballabio (score 2)

https://quant.stackexchange.com/a/79280

Currently there's no way to combine an interpolation on forwards with an interpolation on discounts. There is a `MixedInterpolation` class in the underlying C++ library that could join two different interpolations on the same quantities (i.e., on forwards for both parts, or on discounts for both parts) but it seems to only support a few combinations and it's not fully exported to Python.

## Answer by F Chan (score 1)

https://quant.stackexchange.com/a/80983

This is already implement in QuantLib: Issue You can also find some discussions here

```
ql.PiecewiseLogMixedLinearCubicDiscount(date, helpers, calendar, [], [], ql.LogMixedLinearCubic(n, ql.MixedInterpolation.SplitRanges)) # jumps and jumpDates are empty
```

Similar for `PiecewiseLogMixedLinearCubicDiscount`

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.