Skip to content
All library documents

Bootstrapping Separate OIS Curves for Different Valuation Dates

Article Quant Q&A · Author: NewNY1990

Summary

The document discusses a QuantLib bootstrapping error caused by combining Japanese yen overnight indexed swap market data from two trade dates in one curve. Instruments from different dates can share maturity pillars, triggering a duplicate-pillar error, but the deeper issue is that a term structure represents market conditions as of one valuation date.

The guidance is to build an independent OIS curve for each date using that date’s instrument quotes and evaluation date. A curve calibrated to one day’s market data is appropriate for discounting cash flows as of that day; adding the next day’s observations does not create a meaningful single-date curve. The example uses data from consecutive February 2017 dates. It gives the conceptual fix but does not provide a corrected implementation or discuss curve construction choices beyond separating the dates.

Key ideas

  • A bootstrapped curve represents market conditions as of a specific valuation date.
  • Quotes from different trade dates should not be combined in a single OIS curve.
  • Build a separate curve using each date’s instruments and set the evaluation date accordingly.
  • Duplicate maturity pillars may expose the problem, but the underlying issue is mixing valuation dates.

Tags

Full text
# Bootstrapping OIS Curve with data from different days data


# Bootstrapping OIS Curve with data from different days data












I have the following problem bootstrapping the JPY OIS Curve. The bootstrapping itself works when havin one set of data, e.g. for the date 2017-02-09. I have all my instruments and as said bootstrapping and receiving the OIS curve. If i extend the dataset to a second date 2017-02-10 I receive all the data into my bootstrapper which makes no sense with the error message:

> more than one instrument with pillar February 10th, 2017

which results to the same maturities due to data from different dates as explained above. I have somehow to loop over the fdates but I have no idea how this could work in that context.Help would be appreciated.

```
import QuantLib as ql
import pandas as pd
import matplotlib.pyplot as plt

def Convert(Period):
    unit =[]
    if Period[-1:] == 'D':
        unit = ql.Days
    elif Period[-1:] == 'M':
        unit = ql.Months
    elif Period[-1:] == 'W':
        unit = ql.Weeks
    elif Period[-1:] == 'Y':
        unit = ql.Years
    period_object = ql.Period(int(Period[:-1]), unit)
    return period_object

date = ql.Date(9, ql.February, 2017)
ql.Settings.instance().evaluationDate = date

data = pd.read_csv('C:/Data_JPY_Playing.csv').fillna('')

data_selected = data[['fdate', 'ptype' ,'maturity','fixing','values']].to_records(index=False)  

Rate_Helper_Full_Disc = [] 

for fdate, ptype, maturity, fixing, values in data_selected:
    if row['ptype'] == 'Deposit':
        helper_disc = ql.DepositRateHelper(ql.QuoteHandle(ql.SimpleQuote(row['values']/100)),
                                           Convert(row['maturity']), 
                                           int(row['fixing']),
                                           ql.Japan(), 
                                           ql.ModifiedFollowing, 
                                           False, 
                                           ql.Actual365Fixed())

        Rate_Helper_Full_Disc.append(helper_disc) 

disc_curve = ql.PiecewiseCubicZero(date, Rate_Helper_Full_Disc, ql.Actual365Fixed())
disc_curve.enableExtrapolation()
```

## Answer by Antoine Conze (score 3, accepted)

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

A curve is used to do calculations (e.g. discounting of cash flows) as of a given trade date. Bootstrapping a single curve for two different trade dates does not make sense. With the first set of data you should bootstrap an OIS curve for the 2017-02-09 trade date, with the second set of data you should bootstrap an OIS curve for the 2017-02-10 trade date.

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.