How to handle sink schedules, stepped coupons, stepped formulas, callable floaters?

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

How to handle sink schedules, stepped coupons, stepped formulas, callable floaters?

Mike Jake
Hello all,

Q1>
Does Quantlib make a lot of major simplifying assumptions about fixed income markets? For example, assume that the most complicated feature a bond can have is being callable (ignoring sink schedules, stepped coupons, stepped formulas etc).  Note also, for instance, that the hierarchy doesn’t include callable floaters.

Q2> Is there any serious commercial adoption of this library?

Thank you

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: How to handle sink schedules, stepped coupons, stepped formulas, callable floaters?

Ferdinando M. Ametrano-3
Hi Mike

On Fri, May 25, 2012 at 4:21 PM, Mike Jake <[hidden email]> wrote:
> Q1>
> Does Quantlib make a lot of major simplifying assumptions about fixed income
> markets?

a lot...

> Q2> Is there any serious commercial adoption of this library?

not really, just hobbists and wanna-be-quants

better ask matlab for some real quant library

ciao -- Nando

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Test Suite Crashed in QL v1.2

Billy Ng-5
The system crashed at the following, an assertion error.
line 764 std::vector
 #if _HAS_ITERATOR_DEBUGGING
                if (size() <= _Pos)
                        {
                        _DEBUG_ERROR("vector subscript out of range");
                        _SCL_SECURE_OUT_OF_RANGE;
                        }
 #endif /* _HAS_ITERATOR_DEBUGGING */

VPPTest::testVPPPricing()
    const Real fdmPrice = vppOption.NPV();

Billy
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Billy Ng-5
Hi,

In trying to debug this problem under Test-Suite Project, how to make source code visible to the debugger?
Sorry if it is a bit off topic.

Billy Ng

-----Original Message-----
From: Billy Ng [mailto:[hidden email]]
Sent: Saturday, May 26, 2012 10:32 AM
To: [hidden email]
Subject: [Quantlib-users] Test Suite Crashed in QL v1.2


The system crashed at the following, an assertion error.
line 764 std::vector
 #if _HAS_ITERATOR_DEBUGGING
                if (size() <= _Pos)
                        {
                        _DEBUG_ERROR("vector subscript out of range");
                        _SCL_SECURE_OUT_OF_RANGE;
                        }
 #endif /* _HAS_ITERATOR_DEBUGGING */

VPPTest::testVPPPricing()
    const Real fdmPrice = vppOption.NPV();

Billy
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: How to handle sink schedules, stepped coupons, stepped formulas, callable floaters?

Luigi Ballabio
In reply to this post by Mike Jake
Hello,

On Fri, May 25, 2012 at 4:21 PM, Mike Jake <[hidden email]> wrote:
> Q1>
> Does Quantlib make a lot of major simplifying assumptions about fixed income
> markets? For example, assume that the most complicated feature a bond can
> have is being callable (ignoring sink schedules, stepped coupons, stepped
> formulas etc).  Note also, for instance, that the hierarchy doesn’t include
> callable floaters.

Yes and no.  For instance, the current implementation of callable
bonds does miss those features, but there's nothing fundamental that
prevents them from being added.  For instance, if you added another
constructor that takes the sequence of notionals and the sink
schedule, the underlying machinery would be ready to use it.  Ditto
for the callable floaters: nobody contributed them yet, but nothing
prevents them from being implemented.


> Q2> Is there any serious commercial adoption of this library?

Good question.  I'm forced to give my usual lame answer, which is that
I'm aware of a few places where the library is used but I don't think
I can disclose them.  The only other clue I have is that people
subscribe to the mailing list with email addresses from all around the
financial world; but again, I can't share any of them.  So all in all,
the picture of the adoption of the library is quite opaque, even for
me.  I have a slightly better view of its use in academy, since I get
invited from time to time to give lectures on the architecture of the
library.  But even there, I don't have much feedback about its use in
research.  Which might as well mean that it's not used, of course...

Luigi

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Luigi Ballabio
In reply to this post by Billy Ng-5
On Sat, May 26, 2012 at 5:50 AM, Billy Ng <[hidden email]> wrote:
> In trying to debug this problem under Test-Suite Project, how to make source code visible to the debugger?
> Sorry if it is a bit off topic.

It should be as easy as compiling the whole thing in Debug mode and
starting the debugger. Visual Studio should show you the code
automatically.  What is it exactly that you're doing?

Luigi

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Billy Ng-5
I compiled the whole thing in Debug Mode.
In running the testsuite, it crashed at vpp.cpp after running for a while
I think the problem is caused by "vector subscript out of range" under Boost.
I do not have access to the boost source code, so it turn up with some disassembly code.
Therefore, I cannot trace where went wrong as it is after running for a while.

I have the option to copy out vpp.cpp as a standalone project, but I think I should at least ask in this mailing list to see if there a solution for it.
It does not make sense if I cannot do testing under a test-suite as the problem may not repeat if running alone

Billy

VPPTest::testVPPPricing()
    const Real fdmPrice = vppOption.NPV();

The system crashed at the following, an assertion error.
line 764 std::vector
 #if _HAS_ITERATOR_DEBUGGING
                if (size() <= _Pos)
                        {
                        _DEBUG_ERROR("vector subscript out of range");
                        _SCL_SECURE_OUT_OF_RANGE;
                        }
 #endif /* _HAS_ITERATOR_DEBUGGING */


-----Original Message-----
From: Luigi Ballabio [mailto:[hidden email]]
Sent: Monday, May 28, 2012 4:54 PM
To: Billy Ng
Cc: [hidden email]
Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2


On Sat, May 26, 2012 at 5:50 AM, Billy Ng <[hidden email]> wrote:
> In trying to debug this problem under Test-Suite Project, how to make source code visible to the debugger?
> Sorry if it is a bit off topic.

It should be as easy as compiling the whole thing in Debug mode and
starting the debugger. Visual Studio should show you the code
automatically.  What is it exactly that you're doing?

Luigi
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Luigi Ballabio
As for running vpp.cpp alone, you can just edit quantlibtestsuite.cpp
and comment out all the test->add(...) instructions except for the one
that adds the VPP tests.

As for the error, I don't think you need to go into the Boost code.
The problem is likely to be further up in the stack trace, in the code
from QuantLib that calls Boost.  I'd examine that instruction and see
if it's doing something incorrect, like asking an out-of-bound element
or looping outside a valid range.  When the debugger stops, you can
just go up the stack trace to the calling function until you find
QuantLib code.

Luigi


On Mon, May 28, 2012 at 11:10 AM, Billy Ng <[hidden email]> wrote:

> I compiled the whole thing in Debug Mode.
> In running the testsuite, it crashed at vpp.cpp after running for a while
> I think the problem is caused by "vector subscript out of range" under Boost.
> I do not have access to the boost source code, so it turn up with some disassembly code.
> Therefore, I cannot trace where went wrong as it is after running for a while.
>
> I have the option to copy out vpp.cpp as a standalone project, but I think I should at least ask in this mailing list to see if there a solution for it.
> It does not make sense if I cannot do testing under a test-suite as the problem may not repeat if running alone
>
> Billy
>
> VPPTest::testVPPPricing()
>    const Real fdmPrice = vppOption.NPV();
>
> The system crashed at the following, an assertion error.
> line 764 std::vector
>  #if _HAS_ITERATOR_DEBUGGING
>                if (size() <= _Pos)
>                        {
>                        _DEBUG_ERROR("vector subscript out of range");
>                        _SCL_SECURE_OUT_OF_RANGE;
>                        }
>  #endif /* _HAS_ITERATOR_DEBUGGING */
>
>
> -----Original Message-----
> From: Luigi Ballabio [mailto:[hidden email]]
> Sent: Monday, May 28, 2012 4:54 PM
> To: Billy Ng
> Cc: [hidden email]
> Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
>
>
> On Sat, May 26, 2012 at 5:50 AM, Billy Ng <[hidden email]> wrote:
>> In trying to debug this problem under Test-Suite Project, how to make source code visible to the debugger?
>> Sorry if it is a bit off topic.
>
> It should be as easy as compiling the whole thing in Debug mode and
> starting the debugger. Visual Studio should show you the code
> automatically.  What is it exactly that you're doing?
>
> Luigi

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Billy Ng-5
Thanks.
I did commented out other tests.
Running just vppOption.NPV() takes minutes.

Some more info, hope it helps.
 vppOption.NPV() is the only problem.
Other VPP tests run fine.

Billy

-----Original Message-----
From: Luigi Ballabio [mailto:[hidden email]]
Sent: Monday, May 28, 2012 5:53 PM
To: Billy Ng
Cc: [hidden email]
Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2


As for running vpp.cpp alone, you can just edit quantlibtestsuite.cpp
and comment out all the test->add(...) instructions except for the one
that adds the VPP tests.

As for the error, I don't think you need to go into the Boost code.
The problem is likely to be further up in the stack trace, in the code
from QuantLib that calls Boost.  I'd examine that instruction and see
if it's doing something incorrect, like asking an out-of-bound element
or looping outside a valid range.  When the debugger stops, you can
just go up the stack trace to the calling function until you find
QuantLib code.

Luigi


On Mon, May 28, 2012 at 11:10 AM, Billy Ng <[hidden email]> wrote:

> I compiled the whole thing in Debug Mode.
> In running the testsuite, it crashed at vpp.cpp after running for a while
> I think the problem is caused by "vector subscript out of range" under Boost.
> I do not have access to the boost source code, so it turn up with some disassembly code.
> Therefore, I cannot trace where went wrong as it is after running for a while.
>
> I have the option to copy out vpp.cpp as a standalone project, but I think I should at least ask in this mailing list to see if there a solution for it.
> It does not make sense if I cannot do testing under a test-suite as the problem may not repeat if running alone
>
> Billy
>
> VPPTest::testVPPPricing()
>    const Real fdmPrice = vppOption.NPV();
>
> The system crashed at the following, an assertion error.
> line 764 std::vector
>  #if _HAS_ITERATOR_DEBUGGING
>                if (size() <= _Pos)
>                        {
>                        _DEBUG_ERROR("vector subscript out of range");
>                        _SCL_SECURE_OUT_OF_RANGE;
>                        }
>  #endif /* _HAS_ITERATOR_DEBUGGING */
>
>
> -----Original Message-----
> From: Luigi Ballabio [mailto:[hidden email]]
> Sent: Monday, May 28, 2012 4:54 PM
> To: Billy Ng
> Cc: [hidden email]
> Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
>
>
> On Sat, May 26, 2012 at 5:50 AM, Billy Ng <[hidden email]> wrote:
>> In trying to debug this problem under Test-Suite Project, how to make source code visible to the debugger?
>> Sorry if it is a bit off topic.
>
> It should be as easy as compiling the whole thing in Debug mode and
> starting the debugger. Visual Studio should show you the code
> automatically.  What is it exactly that you're doing?
>
> Luigi
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: How to handle sink schedules, stepped coupons, stepped formulas, callable floaters?

Billy Ng-5
In reply to this post by Luigi Ballabio
Hi,

IMHO, google on "quantlib experience" and taking a look at QuantLib-Jobs mailing archive may give some insight into this aspect.

Billy


> Q2> Is there any serious commercial adoption of this library?

Good question.  I'm forced to give my usual lame answer, which is that
I'm aware of a few places where the library is used but I don't think
I can disclose them.  The only other clue I have is that people
subscribe to the mailing list with email addresses from all around the
financial world; but again, I can't share any of them.  So all in all,
the picture of the adoption of the library is quite opaque, even for
me.  I have a slightly better view of its use in academy, since I get
invited from time to time to give lectures on the architecture of the
library.  But even there, I don't have much feedback about its use in
research.  Which might as well mean that it's not used, of course...

Luigi

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Billy Ng-5
In reply to this post by Billy Ng-5
Hope it helps
 
Billy 


-----Original Message-----
From: Billy Ng [[hidden email]]
Sent: Monday, May 28, 2012 6:06 PM
To: Luigi Ballabio
Cc: [hidden email]
Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2


Thanks.
I did commented out other tests.
Running just vppOption.NPV() takes minutes.

Some more info, hope it helps.
 vppOption.NPV() is the only problem.
Other VPP tests run fine.

Billy

-----Original Message-----
From: Luigi Ballabio [[hidden email]]
Sent: Monday, May 28, 2012 5:53 PM
To: Billy Ng
Cc: [hidden email]
Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2


As for running vpp.cpp alone, you can just edit quantlibtestsuite.cpp
and comment out all the test->add(...) instructions except for the one
that adds the VPP tests.

As for the error, I don't think you need to go into the Boost code.
The problem is likely to be further up in the stack trace, in the code
from QuantLib that calls Boost.  I'd examine that instruction and see
if it's doing something incorrect, like asking an out-of-bound element
or looping outside a valid range.  When the debugger stops, you can
just go up the stack trace to the calling function until you find
QuantLib code.

Luigi


On Mon, May 28, 2012 at 11:10 AM, Billy Ng <[hidden email]> wrote:

> I compiled the whole thing in Debug Mode.
> In running the testsuite, it crashed at vpp.cpp after running for a while
> I think the problem is caused by "vector subscript out of range" under Boost.
> I do not have access to the boost source code, so it turn up with some disassembly code.
> Therefore, I cannot trace where went wrong as it is after running for a while.
>
> I have the option to copy out vpp.cpp as a standalone project, but I think I should at least ask in this mailing list to see if there a solution for it.
> It does not make sense if I cannot do testing under a test-suite as the problem may not repeat if running alone
>
> Billy
>
> VPPTest::testVPPPricing()
>    const Real fdmPrice = vppOption.NPV();
>
> The system crashed at the following, an assertion error.
> line 764 std::vector
>  #if _HAS_ITERATOR_DEBUGGING
>                if (size() <= _Pos)
>                        {
>                        _DEBUG_ERROR("vector subscript out of range");
>                        _SCL_SECURE_OUT_OF_RANGE;
>                        }
>  #endif /* _HAS_ITERATOR_DEBUGGING */
>
>
> -----Original Message-----
> From: Luigi Ballabio [[hidden email]]
> Sent: Monday, May 28, 2012 4:54 PM
> To: Billy Ng
> Cc: [hidden email]
> Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
>
>
> On Sat, May 26, 2012 at 5:50 AM, Billy Ng <[hidden email]> wrote:
>> In trying to debug this problem under Test-Suite Project, how to make source code visible to the debugger?
>> Sorry if it is a bit off topic.
>
> It should be as easy as compiling the whole thing in Debug mode and
> starting the debugger. Visual Studio should show you the code
> automatically.  What is it exactly that you're doing?
>
> Luigi
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Klaus Spanderen-2
In reply to this post by Billy Ng-5
Hi Billy

thanks for highlighting this problem.

I don't fully understand the issue yet but it seems that the out of bound
access occurs in the MultiCubicSpline class, which is used in the multi
dimensional finite difference solver FdmNdimSolver. As far as I can see it
seems to be a rounding problem, Changing line 212 in
fdsimpleklugeextouvppengine.cpp towards
x[3] = std::min(results.size()-1-1e-8,  (Real) (nStates-results.size()+i));
fixes the problem, I'll investigate this further on.

regards
 Klaus

On Monday 28 May 2012 12:05:31 Billy Ng wrote:

> Thanks.
> I did commented out other tests.
> Running just vppOption.NPV() takes minutes.
>
> Some more info, hope it helps.
>  vppOption.NPV() is the only problem.
> Other VPP tests run fine.
>
> Billy
>
> -----Original Message-----
> From: Luigi Ballabio [mailto:[hidden email]]
> Sent: Monday, May 28, 2012 5:53 PM
> To: Billy Ng
> Cc: [hidden email]
> Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
>
>
> As for running vpp.cpp alone, you can just edit quantlibtestsuite.cpp
> and comment out all the test->add(...) instructions except for the one
> that adds the VPP tests.
>
> As for the error, I don't think you need to go into the Boost code.
> The problem is likely to be further up in the stack trace, in the code
> from QuantLib that calls Boost.  I'd examine that instruction and see
> if it's doing something incorrect, like asking an out-of-bound element
> or looping outside a valid range.  When the debugger stops, you can
> just go up the stack trace to the calling function until you find
> QuantLib code.
>
> Luigi
>
> On Mon, May 28, 2012 at 11:10 AM, Billy Ng <[hidden email]> wrote:
> > I compiled the whole thing in Debug Mode.
> > In running the testsuite, it crashed at vpp.cpp after running for a while
> > I think the problem is caused by "vector subscript out of range" under
> > Boost. I do not have access to the boost source code, so it turn up with
> > some disassembly code. Therefore, I cannot trace where went wrong as it
> > is after running for a while.
> >
> > I have the option to copy out vpp.cpp as a standalone project, but I
> > think I should at least ask in this mailing list to see if there a
> > solution for it. It does not make sense if I cannot do testing under a
> > test-suite as the problem may not repeat if running alone
> >
> > Billy
> >
> > VPPTest::testVPPPricing()
> >    const Real fdmPrice = vppOption.NPV();
> >
> > The system crashed at the following, an assertion error.
> > line 764 std::vector
> >  #if _HAS_ITERATOR_DEBUGGING
> >                if (size() <= _Pos)
> >                        {
> >                        _DEBUG_ERROR("vector subscript out of range");
> >                        _SCL_SECURE_OUT_OF_RANGE;
> >                        }
> >  #endif /* _HAS_ITERATOR_DEBUGGING */
> >
> >
> > -----Original Message-----
> > From: Luigi Ballabio [mailto:[hidden email]]
> > Sent: Monday, May 28, 2012 4:54 PM
> > To: Billy Ng
> > Cc: [hidden email]
> > Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
> >
> > On Sat, May 26, 2012 at 5:50 AM, Billy Ng <[hidden email]> wrote:
> >> In trying to debug this problem under Test-Suite Project, how to make
> >> source code visible to the debugger? Sorry if it is a bit off topic.
> >
> > It should be as easy as compiling the whole thing in Debug mode and
> > starting the debugger. Visual Studio should show you the code
> > automatically.  What is it exactly that you're doing?
> >
> > Luigi
>
> ---------------------------------------------------------------------------
>--- Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Billy Ng-5
Hi Klause,

The change fix the problem.
To provide some observations for your pursuit:

The culpit is in multicublicspline.cpp (QL v1.2) line 295
 res = a * y[i] + b * y[i + 1] + a2 * y2[i] + b2 * y2[i + 1];

The variable, i do goes up to 13 where nStates=14
y[i+1] causes the "vector out of range" problem.
It happens at the very end of the calculation and I suspect it is the boundary situations that cause the out of bound problem.

Hope it helps

Billy


-----Original Message-----
From: Klaus Spanderen [mailto:[hidden email]]
Sent: Tuesday, May 29, 2012 5:03 AM
To: [hidden email]
Cc: Billy Ng; Luigi Ballabio
Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2


Hi Billy

thanks for highlighting this problem.

I don't fully understand the issue yet but it seems that the out of bound
access occurs in the MultiCubicSpline class, which is used in the multi
dimensional finite difference solver FdmNdimSolver. As far as I can see it
seems to be a rounding problem, Changing line 212 in
fdsimpleklugeextouvppengine.cpp towards
x[3] = std::min(results.size()-1-1e-8,  (Real) (nStates-results.size()+i));
fixes the problem, I'll investigate this further on.

regards
 Klaus

On Monday 28 May 2012 12:05:31 Billy Ng wrote:

> Thanks.
> I did commented out other tests.
> Running just vppOption.NPV() takes minutes.
>
> Some more info, hope it helps.
>  vppOption.NPV() is the only problem.
> Other VPP tests run fine.
>
> Billy
>
> -----Original Message-----
> From: Luigi Ballabio [mailto:[hidden email]]
> Sent: Monday, May 28, 2012 5:53 PM
> To: Billy Ng
> Cc: [hidden email]
> Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
>
>
> As for running vpp.cpp alone, you can just edit quantlibtestsuite.cpp
> and comment out all the test->add(...) instructions except for the one
> that adds the VPP tests.
>
> As for the error, I don't think you need to go into the Boost code.
> The problem is likely to be further up in the stack trace, in the code
> from QuantLib that calls Boost.  I'd examine that instruction and see
> if it's doing something incorrect, like asking an out-of-bound element
> or looping outside a valid range.  When the debugger stops, you can
> just go up the stack trace to the calling function until you find
> QuantLib code.
>
> Luigi
>
> On Mon, May 28, 2012 at 11:10 AM, Billy Ng <[hidden email]> wrote:
> > I compiled the whole thing in Debug Mode.
> > In running the testsuite, it crashed at vpp.cpp after running for a while
> > I think the problem is caused by "vector subscript out of range" under
> > Boost. I do not have access to the boost source code, so it turn up with
> > some disassembly code. Therefore, I cannot trace where went wrong as it
> > is after running for a while.
> >
> > I have the option to copy out vpp.cpp as a standalone project, but I
> > think I should at least ask in this mailing list to see if there a
> > solution for it. It does not make sense if I cannot do testing under a
> > test-suite as the problem may not repeat if running alone
> >
> > Billy
> >
> > VPPTest::testVPPPricing()
> >    const Real fdmPrice = vppOption.NPV();
> >
> > The system crashed at the following, an assertion error.
> > line 764 std::vector
> >  #if _HAS_ITERATOR_DEBUGGING
> >                if (size() <= _Pos)
> >                        {
> >                        _DEBUG_ERROR("vector subscript out of range");
> >                        _SCL_SECURE_OUT_OF_RANGE;
> >                        }
> >  #endif /* _HAS_ITERATOR_DEBUGGING */
> >
> >
> > -----Original Message-----
> > From: Luigi Ballabio [mailto:[hidden email]]
> > Sent: Monday, May 28, 2012 4:54 PM
> > To: Billy Ng
> > Cc: [hidden email]
> > Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
> >
> > On Sat, May 26, 2012 at 5:50 AM, Billy Ng <[hidden email]> wrote:
> >> In trying to debug this problem under Test-Suite Project, how to make
> >> source code visible to the debugger? Sorry if it is a bit off topic.
> >
> > It should be as easy as compiling the whole thing in Debug mode and
> > starting the debugger. Visual Studio should show you the code
> > automatically.  What is it exactly that you're doing?
> >
> > Luigi
>
> ---------------------------------------------------------------------------
>--- Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: How to handle sink schedules, stepped coupons, stepped formulas, callable floaters?

Mike Jake
In reply to this post by Luigi Ballabio
I have to say this is a very good open-source library with quality I didn't expect to see originally.

Thank you for the great work:)

On Mon, May 28, 2012 at 3:51 AM, Luigi Ballabio <[hidden email]> wrote:
Hello,

On Fri, May 25, 2012 at 4:21 PM, Mike Jake <[hidden email]> wrote:
> Q1>
> Does Quantlib make a lot of major simplifying assumptions about fixed income
> markets? For example, assume that the most complicated feature a bond can
> have is being callable (ignoring sink schedules, stepped coupons, stepped
> formulas etc).  Note also, for instance, that the hierarchy doesn’t include
> callable floaters.

Yes and no.  For instance, the current implementation of callable
bonds does miss those features, but there's nothing fundamental that
prevents them from being added.  For instance, if you added another
constructor that takes the sequence of notionals and the sink
schedule, the underlying machinery would be ready to use it.  Ditto
for the callable floaters: nobody contributed them yet, but nothing
prevents them from being implemented.


> Q2> Is there any serious commercial adoption of this library?

Good question.  I'm forced to give my usual lame answer, which is that
I'm aware of a few places where the library is used but I don't think
I can disclose them.  The only other clue I have is that people
subscribe to the mailing list with email addresses from all around the
financial world; but again, I can't share any of them.  So all in all,
the picture of the adoption of the library is quite opaque, even for
me.  I have a slightly better view of its use in academy, since I get
invited from time to time to give lectures on the architecture of the
library.  But even there, I don't have much feedback about its use in
research.  Which might as well mean that it's not used, of course...

Luigi


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite Crashed in QL v1.2

Klaus Spanderen-2
In reply to this post by Billy Ng-5
Hi Billy

I've just seen the following "warning" in multicubicspline.cpp in line 465

        \bug cannot interpolate at the grid points on the boundary
             surface of the N-dimensional region

If this is true then the code change I've sent around is already what we
should use to drive around this issue in the MultiCubicSpline class. (In
addition I think we should disable extrapolation in the multi dimensional
finite difference solver for the multi dim cubic splines).

regards
 Klaus


On Tuesday 29 May 2012 03:35:14 Billy Ng wrote:

> Hi Klause,
>
> The change fix the problem.
> To provide some observations for your pursuit:
>
> The culpit is in multicublicspline.cpp (QL v1.2) line 295
>  res = a * y[i] + b * y[i + 1] + a2 * y2[i] + b2 * y2[i + 1];
>
> The variable, i do goes up to 13 where nStates=14
> y[i+1] causes the "vector out of range" problem.
> It happens at the very end of the calculation and I suspect it is the
> boundary situations that cause the out of bound problem.
>
> Hope it helps
>
> Billy
>
>
> -----Original Message-----
> From: Klaus Spanderen [mailto:[hidden email]]
> Sent: Tuesday, May 29, 2012 5:03 AM
> To: [hidden email]
> Cc: Billy Ng; Luigi Ballabio
> Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
>
>
> Hi Billy
>
> thanks for highlighting this problem.
>
> I don't fully understand the issue yet but it seems that the out of bound
> access occurs in the MultiCubicSpline class, which is used in the multi
> dimensional finite difference solver FdmNdimSolver. As far as I can see it
> seems to be a rounding problem, Changing line 212 in
> fdsimpleklugeextouvppengine.cpp towards
> x[3] = std::min(results.size()-1-1e-8,  (Real) (nStates-results.size()+i));
> fixes the problem, I'll investigate this further on.
>
> regards
>  Klaus
>
> On Monday 28 May 2012 12:05:31 Billy Ng wrote:
> > Thanks.
> > I did commented out other tests.
> > Running just vppOption.NPV() takes minutes.
> >
> > Some more info, hope it helps.
> >  vppOption.NPV() is the only problem.
> > Other VPP tests run fine.
> >
> > Billy
> >
> > -----Original Message-----
> > From: Luigi Ballabio [mailto:[hidden email]]
> > Sent: Monday, May 28, 2012 5:53 PM
> > To: Billy Ng
> > Cc: [hidden email]
> > Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
> >
> >
> > As for running vpp.cpp alone, you can just edit quantlibtestsuite.cpp
> > and comment out all the test->add(...) instructions except for the one
> > that adds the VPP tests.
> >
> > As for the error, I don't think you need to go into the Boost code.
> > The problem is likely to be further up in the stack trace, in the code
> > from QuantLib that calls Boost.  I'd examine that instruction and see
> > if it's doing something incorrect, like asking an out-of-bound element
> > or looping outside a valid range.  When the debugger stops, you can
> > just go up the stack trace to the calling function until you find
> > QuantLib code.
> >
> > Luigi
> >
> > On Mon, May 28, 2012 at 11:10 AM, Billy Ng <[hidden email]> wrote:
> > > I compiled the whole thing in Debug Mode.
> > > In running the testsuite, it crashed at vpp.cpp after running for a
> > > while I think the problem is caused by "vector subscript out of range"
> > > under Boost. I do not have access to the boost source code, so it turn
> > > up with some disassembly code. Therefore, I cannot trace where went
> > > wrong as it is after running for a while.
> > >
> > > I have the option to copy out vpp.cpp as a standalone project, but I
> > > think I should at least ask in this mailing list to see if there a
> > > solution for it. It does not make sense if I cannot do testing under a
> > > test-suite as the problem may not repeat if running alone
> > >
> > > Billy
> > >
> > > VPPTest::testVPPPricing()
> > >    const Real fdmPrice = vppOption.NPV();
> > >
> > > The system crashed at the following, an assertion error.
> > > line 764 std::vector
> > >  #if _HAS_ITERATOR_DEBUGGING
> > >                if (size() <= _Pos)
> > >                        {
> > >                        _DEBUG_ERROR("vector subscript out of range");
> > >                        _SCL_SECURE_OUT_OF_RANGE;
> > >                        }
> > >  #endif /* _HAS_ITERATOR_DEBUGGING */
> > >
> > >
> > > -----Original Message-----
> > > From: Luigi Ballabio [mailto:[hidden email]]
> > > Sent: Monday, May 28, 2012 4:54 PM
> > > To: Billy Ng
> > > Cc: [hidden email]
> > > Subject: Re: [Quantlib-users] Test Suite Crashed in QL v1.2
> > >
> > > On Sat, May 26, 2012 at 5:50 AM, Billy Ng <[hidden email]> wrote:
> > >> In trying to debug this problem under Test-Suite Project, how to make
> > >> source code visible to the debugger? Sorry if it is a bit off topic.
> > >
> > > It should be as easy as compiling the whole thing in Debug mode and
> > > starting the debugger. Visual Studio should show you the code
> > > automatically.  What is it exactly that you're doing?
> > >
> > > Luigi
> >
> > -------------------------------------------------------------------------
> >-- --- Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > QuantLib-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users