Re: [QuantLib-svn] SF.net SVN: quantlib:[16477] trunk/QuantLib

Posted by Piter Dias-4 on
URL: http://quantlib.414.s1.nabble.com/Re-QuantLib-svn-SF-net-SVN-quantlib-16477-trunk-QuantLib-tp12995p12998.html

Luigi/Nando/Eric,

>> Author:   nando
>> Date:     2009-09-16 14:14:43 +0000 (Wed, 16 Sep 2009)
>>
>> Log Message:
>> -----------
>> switched from vector<InterestRate> to vector<shared_prt<InterestRate> >
>
> Good grief. Why?

I believe Nando made this change because QuantLibAddin auto-generated code
expects vector<shared_prt<InterestRate> > instead of vector<InterestRate>.
It was used to implement FixedRateLeg2 function.

Based on latest trunk code, I implemented the FixedRateBond2 function for
QuantLibXL that is able to handle a vector of InterestRate objects and
included also a spreadsheet that matches the QuantLib testsuite (seems to
be a good idea having the same test in both tools).

You can see in the patch that I kept the vector<InterestRate> once it made
mode sense for me making the conversion inside QuantLibAddin. The idea
behind it is making the QuantLib code more stable (change fewer times) than
QuantLibXL (pretty like a third party library).

I hope you find the patch and spreadsheet useful.

Regards,


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

Piter Dias
[hidden email]
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

ql.patch (29K) Download Attachment
Brazilian Onshore Treasuries.zip (29K) Download Attachment