|
From: Victoria T. <vic...@we...> - 2022-08-29 13:01:04
|
Hello,
We are pricing interest rates swaps using quantlib in python.
In our code, we construct the helpers for the discount curve as following:
OIS_Helpers = []
for i in range(1, len(Sliced_Data) + 1):
OIS_Rate = ql.QuoteHandle(ql.SimpleQuote(Sliced_Data["EUREST"][i -
1] / 100))
Maturity_Date_OIS = Calendar.advance(Spot_Date,
ql.Period(Sliced_Data.index[i - 1]))
OIS_Helpers.append(ql.DatedOISRateHelper(Spot_Date,
Maturity_Date_OIS, OIS_Rate, OIS_Index))
With Sliced Data being the inputs fixed swap rates *from 2Y* to 50Y.
Then we build the OIS discounting curve as following:
Disc_Curve = ql.YieldTermStructureHandle(ql.PiecewiseLogLinearDiscount(Spot_Date,
OIS_Helpers, Float_DC))
And we use it in the rest of the code, which returns correct prices for
Swaps beginning at spot date and finishing in 2y, 5y, 10y,etc.
We are very happy with the results, but we are wondering how the
discounting OIS curve is actually built, *since we didn't provide the
algorithm with fixed swap rates for 3m, 6m, 9m, 12m, 15m, 18m, 21m (all the
quarters before 2y)*.
How can it uses the bootstrapping method without these rates?
Are the functions ql.DatedOISRateHelper and/or
ql.YieldTermStructureHandle(ql.PiecewiseLogLinearDiscount) supposing that
the curve is flat before 2y, taking the same base rate as 2y for 3m,
6m,...until 21m?
Many thanks in advance.
|