difficulty constructing PiecewiseYieldCurve with USD Libor fixes.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

difficulty constructing PiecewiseYieldCurve with USD Libor fixes.

VINOD RAJAKUMAR
I am using QuantLib v1.4-7 on Centos. I've attached a sample program, makefile, and several sample inputs to demonstrate the issues I am having.

My source for libor fixes is http://www.global-rates.com/interest-rates/libor/american-dollar/american-dollar.aspx

My source for verifying value dates and maturities is https://www.theice.com/publicdocs/Fixing_Calendar_2016.pdf

1) For the curve constructed from libor rates on Friday 9/2/2016, it appears that the curve is calculating 9/7/2016 as the reference/value date, but I believe it should be 9/6/2016 (while Monday 9/5 was a holiday in the u.s., it was not a holiday in london, so 2 london business days after Fri 9/2 is Tues 9/6 which is a valid business day in both the u.k. and the u.s.). In contrast, the individual IborIndex objects compute the value date correctly as 9/6 (The ICE pdf also lists 9/6 as the value date for the 9/2, see pg 11)

$ ./testYieldCurve 20160902.csv
inTenor,inMatDate,inFix,outValDate,outMatDate,outDays
 1d,2016-09-06,0.00420440,2016-09-02,2016-09-06,4
 1w,2016-09-13,0.00443000,2016-09-06,2016-09-13,7
 1m,2016-10-06,0.00525720,2016-09-06,2016-10-06,30
 2m,2016-11-07,0.00661890,2016-09-06,2016-11-07,62
 3m,2016-12-06,0.00835110,2016-09-06,2016-12-06,91
 6m,2017-03-06,0.01247060,2016-09-06,2017-03-06,181
12m,2017-09-06,0.01559440,2016-09-06,2017-09-06,365
EvaluationDate: 2016-09-02
ReferenceDate:  2016-09-07
Curve nodes:
ERR: could not get curve nodes, 1st iteration: failed at 1st alive instrument, maturity September 13th, 2016, reference date September 7th, 2016: negative time (-0.00277778) given


2) For the curve constructed from libor rates on 9/5/2016 (bank holiday in the u.s. so no o/n rate published), everything is fine. I included it as a useful sanity check.

3) For the curve constructed from libor rates on 9/6/2016, there appear to be two issues - First, the o/n libor rate seems to be ignored when creating the curve nodes, and subsequently, I can not recover the original o/n fix with maturity date 9/7/2016 from the curve as it is before its reference date of 9/8/2016. Second, the calculation of the maturity date of 1-month libor index for the curve appears to be incorrect. The curve creates a node for 10/10/2016 but this is a bank holiday in the u.s. (columbus day). The individual IborIndex object for the 1-month period computes the maturity date correctly.

Is there a way to include the o/n rate when creating the curve? (One reason I would want to do this is to interpolate a rate between o/n and 1w to price short-dated equity options.)

Could you confirm that 10/11 is the correct maturity date for 1-month libor - that is, that the IborIndex object correct, while the curve is incorrectly creating a node for 10/10?

$ ./testYieldCurve 20160906.csv
inTenor,inMatDate,inFix,outValDate,outMatDate,outDays
 1d,2016-09-07,0.00420440,2016-09-06,2016-09-07,1
 1w,2016-09-15,0.00443000,2016-09-08,2016-09-15,7
 1m,2016-10-11,0.00516560,2016-09-08,2016-10-11,33
 2m,2016-11-08,0.00663000,2016-09-08,2016-11-08,61
 3m,2016-12-08,0.00840670,2016-09-08,2016-12-08,91
 6m,2017-03-08,0.01250060,2016-09-08,2017-03-08,181
12m,2017-09-08,0.01561330,2016-09-08,2017-09-08,365
EvaluationDate: 2016-09-06
ReferenceDate:  2016-09-08
Curve nodes:
2016-09-08,0.00442981
2016-09-15,0.00442981
2016-10-10,0.00516441
2016-11-08,0.00662628
2016-12-08,0.00839778
2017-03-08,0.01246148
2017-09-08,0.01549101
Check original rate fixes
 1d,2016-09-07,0.00420440,ERR:negative time (-0.00277778) given
 1w,2016-09-15,0.00443000,0.44300000 % Actual/360 simple compounding
 1m,2016-10-11,0.00516560,0.52160702 % Actual/360 simple compounding
 2m,2016-11-08,0.00663000,0.66300000 % Actual/360 simple compounding
 3m,2016-12-08,0.00840670,0.84067000 % Actual/360 simple compounding
 6m,2017-03-08,0.01250060,1.25006000 % Actual/360 simple compounding
12m,2017-09-08,0.01561330,1.56133000 % Actual/360 simple compounding



Regards,
Vinod


------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Makefile (298 bytes) Download Attachment
20160902.csv (228 bytes) Download Attachment
20160905.csv (196 bytes) Download Attachment
20160906.csv (228 bytes) Download Attachment
Main.cpp (6K) Download Attachment