Callablebonds.cpp misleading output

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

Callablebonds.cpp misleading output

Bart Mosley, bondgeek.com
The output for the callablebonds example program should reference the  
clean price instead of NPV, since you are comparing to a clean price  
from BBG.

i.e.

cout << callableBond0.NPV() << " / "

should be:

cout << callableBond0.cleanPrice() << " / "

So the discrepancy with Bloomberg in the zero-vol case is only .03,  
not .4.

Unless, that is, the idea is to get newbies like me to dig through the  
code to understand why the price discrepancy with Bloomberg is so big  
or why the price doesn't correspond to yield :)


Bart.

____________________
[hidden email]





------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Callablebonds.cpp misleading output

Luigi Ballabio
On Thu, 2009-01-08 at 14:22 -0500, Bart Mosley, bondgeek.com wrote:
> The output for the callablebonds example program should reference the  
> clean price instead of NPV, since you are comparing to a clean price  
> from BBG.
>
> [...]
>
> Unless, that is, the idea is to get newbies like me to dig through the  
> code to understand why the price discrepancy with Bloomberg is so big  
> or why the price doesn't correspond to yield :)

Ouch :)

It's fixed now--thanks for the heads-up.

Luigi



--

The idea that an arbitrary naive human should be able to properly
use a given tool without training or understanding is even more
wrong for computing than it is for other tools (e.g. automobiles,
airplanes, guns, power saws).
-- Doug Gwyn



------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Callablebonds.cpp misleading output

Allen Kuo-2
yes, missed that, thanks for the heads up, and for fixing it Luigi.

--- On Fri, 1/9/09, Luigi Ballabio <[hidden email]> wrote:
From: Luigi Ballabio <[hidden email]>
Subject: Re: [Quantlib-users] Callablebonds.cpp misleading output
To: "Bart Mosley, bondgeek.com" <[hidden email]>
Cc: [hidden email]
Date: Friday, January 9, 2009, 5:06 AM

On Thu, 2009-01-08 at 14:22 -0500, Bart Mosley, bondgeek.com wrote:
> The output for the callablebonds example program should reference the  
> clean price instead of NPV, since you are comparing to a clean price  
> from BBG.
> 
> [...]
> 
> Unless, that is, the idea is to get newbies like me to dig through the  
> code to understand why the price discrepancy with Bloomberg is so big  
> or why the price doesn't correspond to yield :)

Ouch :)

It's fixed now--thanks for the heads-up.

Luigi



-- 

The idea that an arbitrary naive human should be able to properly 
use a given tool without training or understanding is even more 
wrong for computing than it is for other tools (e.g. automobiles, 
airplanes, guns, power saws). 
-- Doug Gwyn 



------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users