Login  Register

Re: Bonds.java

Posted by Giacomo Sergio on Jun 09, 2014; 1:26pm
URL: http://quantlib.414.s1.nabble.com/Bonds-java-tp15420p15430.html

Hi Luigi,

Thank you very much, that was helpful. Attached the new version, hope is
useful, without errors. The results still do not match with the cpp
version. I¹ll review everything again. If anyone is working on that too
and have some hints are welcome.

Regards,
Giacomo

Il giorno 09/06/14 13:09, "Luigi Ballabio" <[hidden email]> ha
scritto:

>Hi Giacomo,
>    you have to set the evaluation date. After you define todayDate, add
>
>    Settings.instance().setEvaluationDate(todayDate);
>
>otherwise the library will still think it's June 2014.
>
>After this, you'll still have errors because you're using some helpers
>with the same maturity (I didn't have time to check which ones).
>You'll have to compare your code with the original one and check that
>you initialize the helpers with the correct arguments.
>
>PiecewiseFlatForward should be ok.
>
>Hope this helps,
>    Luigi
>
>
>
>On Mon, Jun 9, 2014 at 10:52 AM, Giacomo Sergio
><[hidden email]> wrote:
>> Dear Luigi and all,
>>
>> I started using the QuantLib-SWIG-1.4. As I couldn¹t find in the
>>examples
>> the implementation of the Bonds example class, I have written my
>> implementation (attached), following the Bonds.cpp in QuantLib-1.4
>> Examples/Bonds. Nevertheless I have a 0 price for Zero Coupon Bonds and
>>for
>> Floating and an error for the Fixed Rate bonds (more than one instrument
>> with maturity September 12th, 2014.
>> I couldn¹t find the PiecewiseYieldCourve as implemented in the c++
>>classŠand
>> I used PiecewiseFlatForward.
>>
>> Any feedback/suggestion, would be appreciated.
>>
>> Kind Regards,
>>  Giacomo
>>
>>
>>-------------------------------------------------------------------------
>>-----
>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>Solutions
>> Find What Matters Most in Your Big Data with HPCC Systems
>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>> http://www.hpccsystems.com
>> _______________________________________________
>> QuantLib-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>
>
>
>--
><https://implementingquantlib.blogspot.com>
><https://twitter.com/lballabio>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://www.hpccsystems.com
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Bonds.java (28K) Download Attachment