Login  Register

Re: Bonds.java

Posted by Luigi Ballabio on Jun 09, 2014; 11:09am
URL: http://quantlib.414.s1.nabble.com/Bonds-java-tp15420p15429.html

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