Inspecting QuantLib Rate Helper Pillar Dates to Find Curve Collisions
Summary
The question concerns building an inflation-swap curve with QuantLib rate helpers and encountering an error because multiple instruments share a pillar date. The practical diagnostic is to inspect each helper’s pillar date, which is the date used as a curve node. Comparing those dates can reveal which instruments collide and support further investigation of the input tenors or helper construction.
The answer supplies a direct API call for retrieving the pillar date from each helper. This is a narrow debugging technique rather than a discussion of curve calibration, instrument conventions, or how to resolve duplicate pillars. It helps expose the conflicting dates, but users still need to decide whether the overlap reflects duplicate market quotes, differing instruments that map to the same node, or a convention issue. The exchange provides no worked diagnosis of the specific swaps or validation of any subsequent curve change.
Key ideas
- Rate helpers expose pillar dates that can be inspected during curve construction.
- Repeated pillar dates can trigger a collision when instruments are added to a curve.
- Printing each helper’s pillar date helps identify which inputs map to the same curve node.
- The diagnostic reveals a collision but does not determine how the modeler should resolve it.
Tags
Full text
# Quantlib: How to print the maturity dates or pillars from the helpers in Quantlib python?
# Quantlib: How to print the maturity dates or pillars from the helpers in Quantlib python?
I am trying to value inflation swaps using necessary functions from quantlib and successfully completed the valuation. Underneath helper function is working well for most of the swaps. But few swaps giving me below error. RuntimeError: more than one instrument with pillar May 17th, 2021.
```
helpers = []
for idx, row in rate_data.iterrows():
rate = row["mid_yield"] / 100
tenor = row.tenor
if tenor == "1D":
helpers.append(ql.DepositRateHelper(rate, index))
else:
helpers.append(
ql.OISRateHelper(
0, ql.Period(tenor), ql.QuoteHandle(ql.SimpleQuote(rate)), index
)
)
```
I know the maturity dates from 'helper' is colliding with the maturity dates of rates. I just want to know how to print the variables/dates/pillars from 'helpers' in python to see the dates. Thereafter I can do further analysis based on constructed helpers maturity dates.
## Answer by Luigi Ballabio (score 4, accepted)
https://quant.stackexchange.com/a/68979
You can see at the beginning of this file the methods exported by all helpers. For the pillar dates, you can write
```
for h in helpers:
print(h.pillarDate())
```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.