Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/bug-related-to-error-message-root-not-bracketed-tp153p156.html
On Fri, 2010-06-11 at 14:23 +0000, Jinping Shi wrote:
> My further investigation shows that the problem is somewhere else.
>
> I was using <Forward, Linear> in the boostraping and when the input
> data is noisy (or too many data points), the forward rate can be
> negative. So the change should be in
>
> /ql/termstructures/iterativebootstrap.hpp
>
> 157 // bracket
> 158 Real min = Traits::minValueAfter(i, ts_->data_);// -2.0; //JSHI,
> allow negative if using forward linear
There's no need to do that (especially since the modification should
affect only the forwards, while the code above is generic.) If the
problem is negative rates, you can enable them. On Windows, open
<ql/userconfig.hpp> and uncomment the line
# define QL_NEGATIVE_RATES
on Linux and any other platform where you run configure, run it as:
./configure --enable-negative-rates
In both cases, recompile the library after the modification.
Luigi
P.S. Maybe we should enable negative rates by default. People, what do
you think?
--
The young man knows the rules, but the old man knows the exceptions.
-- O. W. Holmes
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users