Hi, I'm trying to reconcile quantlib's fixed bond values with our own internal models (some in-house developed Excel addins). For the quantlib part, I'm actually using QLNet and I write my code in C#.
From the code below, I could see that the first coupon in the cashflows leg is not the full 3.5, and this is the reason of most of the difference I'm experiencing. Our internal models assums that all the cashflows are the full 3.5. I suspect this is a clean price vs dirty price issue, but my code gives the same answer for dirtyPrice() and cleanPrice(). The yield curve is read in from a CSV file.
C# code at http://pastie.org/9142044 How can I force the cashflows to have the full coupons for all the dates? thanks
Francois Botha
------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I solved the problem, but for reference, I had to change from Settings.evaluationDate() to issueDate in this statement: Schedule fixedBondSchedule = new Schedule(Settings.evaluationDate(),
maturityDate, new Period(Frequency.Semiannual),
new SouthAfrica(),
BusinessDayConvention.Unadjusted,
BusinessDayConvention.Unadjusted,
DateGeneration.Rule.Backward, true);
The parameter name, effectiveDate, confused me a bit. Francois On 5 May 2014 12:08, Francois Botha <[hidden email]> wrote:
------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |