Piecewise Yield curve test

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Piecewise Yield curve test

Hari-40
Hi,
  I am a new person into this QuantLib (both C++ and Java) world and trying to
understand the various models published and particularly on piece wise yield
curve
(for ALM yield curve modelling). I am using the version 1.2. When I try to test
a simple piece wise (Discount, LogLinear) model, I get the below stack trace.


Exception in thread "main" java.lang.NullPointerException
        at
org.jquantlib.termstructures.yieldcurves.InterpolatedZeroCurve.maxDate(Interpola
tedZeroCurve.java:234)
        at
org.jquantlib.termstructures.AbstractTermStructure.checkRange(AbstractTermStruct
ure.java:286)
        at
org.jquantlib.termstructures.AbstractYieldTermStructure.discount(AbstractYieldTe
rmStructure.java:375)
        at
org.jquantlib.termstructures.AbstractYieldTermStructure.discount(AbstractYieldTe
rmStructure.java:367)
        at
org.jquantlib.termstructures.yieldcurves.PiecewiseYieldCurve.discount(PiecewiseY
ieldCurve.java:687)
        at org.jquantlib.indexes.IborIndex.forecastFixing(IborIndex.java:240)
        at
org.jquantlib.indexes.InterestRateIndex.fixing(InterestRateIndex.java:175)
        at
org.jquantlib.indexes.InterestRateIndex.fixing(InterestRateIndex.java:180)
        at
org.jquantlib.testsuite.termstructures.yieldcurves.PiecewiseYieldCurveTest.testC
urveConsistency(PiecewiseYieldCurveTest.java:407)
        at
org.jquantlib.testsuite.termstructures.yieldcurves.PiecewiseYieldCurveTest.testC
urveConsistency(PiecewiseYieldCurveTest.java:381)
        at
org.jquantlib.testsuite.termstructures.yieldcurves.PiecewiseYieldCurveTest.testS
plineZeroConsistency(PiecewiseYieldCurveTest.java:718)

I used the sample test program provided in the 'testsuite'. I tried to debug and
finally understand that 'Interpolation' curve is not initialized at all.
Can anyone help to provide me a working sample of a piece wise yield curve in
Java using JQuantLib (v1.2)? Thanks.


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Piecewise Yield curve test

Luigi Ballabio
Hi,
    while it's possible that someone on this list can answer, this is
the mailing list for the C++ version.  You might have better luck
asking on the JQuantLib forums or mailing lists.  The links for both
are available at <http://www.jquantlib.org/index.php/Contact_us>.

Luigi

On Fri, Sep 14, 2012 at 1:08 PM, Hari <[hidden email]> wrote:

> Hi,
>   I am a new person into this QuantLib (both C++ and Java) world and trying to
> understand the various models published and particularly on piece wise yield
> curve
> (for ALM yield curve modelling). I am using the version 1.2. When I try to test
> a simple piece wise (Discount, LogLinear) model, I get the below stack trace.
>
>
> Exception in thread "main" java.lang.NullPointerException
>         at
> org.jquantlib.termstructures.yieldcurves.InterpolatedZeroCurve.maxDate(Interpola
> tedZeroCurve.java:234)
>         at
> org.jquantlib.termstructures.AbstractTermStructure.checkRange(AbstractTermStruct
> ure.java:286)
>         at
> org.jquantlib.termstructures.AbstractYieldTermStructure.discount(AbstractYieldTe
> rmStructure.java:375)
>         at
> org.jquantlib.termstructures.AbstractYieldTermStructure.discount(AbstractYieldTe
> rmStructure.java:367)
>         at
> org.jquantlib.termstructures.yieldcurves.PiecewiseYieldCurve.discount(PiecewiseY
> ieldCurve.java:687)
>         at org.jquantlib.indexes.IborIndex.forecastFixing(IborIndex.java:240)
>         at
> org.jquantlib.indexes.InterestRateIndex.fixing(InterestRateIndex.java:175)
>         at
> org.jquantlib.indexes.InterestRateIndex.fixing(InterestRateIndex.java:180)
>         at
> org.jquantlib.testsuite.termstructures.yieldcurves.PiecewiseYieldCurveTest.testC
> urveConsistency(PiecewiseYieldCurveTest.java:407)
>         at
> org.jquantlib.testsuite.termstructures.yieldcurves.PiecewiseYieldCurveTest.testC
> urveConsistency(PiecewiseYieldCurveTest.java:381)
>         at
> org.jquantlib.testsuite.termstructures.yieldcurves.PiecewiseYieldCurveTest.testS
> plineZeroConsistency(PiecewiseYieldCurveTest.java:718)
>
> I used the sample test program provided in the 'testsuite'. I tried to debug and
> finally understand that 'Interpolation' curve is not initialized at all.
> Can anyone help to provide me a working sample of a piece wise yield curve in
> Java using JQuantLib (v1.2)? Thanks.
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev