On 09 Feb 2017, at 13:07, Charles Allderman <[hidden email]> wrote:Hi PeterThanks for clearing that up. If I created an interpolated daily series and passed that in would this workaround work?ThanksCharlesOn Thu, Feb 9, 2017 at 1:57 PM, Peter Caspers <[hidden email]> wrote:Hi,it’s not rounding, QuantLib calculates 123.92 = 123.8 + (124.2-123.8) x (10-1) / 30, i.e. takes November instead of February as the basis for the interpolation. This is due to a bug described hereThere is an attempt to solve that, but this is not yet mergedLooking at that I think we also need to fix the interpolation in CPICoupon, the code for this starts hereWhat do you think, Francois, Luigi?Kind RegardsPeterOn 08 Feb 2017, at 13:08, Charles Allderman <[hidden email]> wrote:Hi
I am digging into the pricing of a CPIBond. I have this index CPI index time
series:
DATE
2016-08-31 123.0
2016-09-30 123.2
2016-10-31 123.8
2016-11-30 124.2
2016-12-31 124.7
If I interpolate for 10 February 2017 I get:
(10.0-1)/28.0*(124.2-123.8)+123.8 123.92857142857143
Deriving the values as calculated by QuantLib using the last cash flow I
get:
principal*baseCPI/notional123.92000000000002
So it appears to be rounded down.
The inflation index is simply created by passing in a vector of
dates(month-end date plus 1 day) and values.
inflationIndex.addFixings(dte_fixings[:len(fixData)], fixData)
So is there a way to get the full interpolated value?
Thanks
Charles
--
View this message in context: http://quantlib.10058.n7.nabble.com/CPI-Time-Series- Interpolation-tp18062.html
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Free forum by Nabble | Disable Popup Ads | Edit this page |