|
From: Philip S. <phi...@ho...> - 2018-07-18 10:18:46
|
It’s been a long standing problem (for me) that bonds with a discountingBondCurve pricing engine do not correctly do yield/price conversions. This is because of an underlying problem with the yearFraction api for ActAct and similar day count conventions which require a reference period. This was explained by Luigi here: https://quant.stackexchange.com/questions/12707/pricing-a-fixedratebond-in-quantlib-yield-vs-termstructure And appears to still be a problem. It also causes knock on effects. For example, it causes FixedRateBondForward to calculate incorrect forward prices due to having the wrong spotValue when prices of a discounting curve. However, I noted PR request 216 - which introduced the ability to add a schedule as part of the constructor for day count conventions. I believe this introduces a way to solve this problem succinctly. With access to a schedule the dayCount should be able to work out the correct reference period and internally call the correct yearFraction(day day day day) internally. I am available to work on this, but I have never written any C++ so am looking for: 1) An experiences quantlib developer to work with me (or do it for me). 2) Any advice as to whether this is more complicated than it seems. Yours Phil Sent from my iPhone |