Re: Exception in Bond::cleanPriceFromZSpread(...)

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Exception-in-Bond-cleanPriceFromZSpread-tp12044p12047.html

On Wed, 2008-07-16 at 12:08 -0400, Luca Billi wrote:
> I think the exception is legitimate: interest rates on zero intervals
> are meaningless, whereas discount factors are not:
>
> exp(-r*t) = 1 for t=0, regardless of r.
>
> That's why I think that, when t=0, it's ok to avoid calling
> ZeroSpreadedTermStructure::zeroYieldImpl(), which operates in the
> yield space and is not required when t=0, and return immediatly 1.

Ok, I've put the t=0 check in.  I'd still like to have zeroYieldImpl()
succeed at t=0 (the rate can be defined as the limit for t->0, after
all) but that's for another day...

Thanks for the heads-up,
        Luigi


--

I have yet to see any problem, however complicated, which, when you
looked at it in the right way, did not become still more complicated.
-- Poul Anderson



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev