Hi,
I'm trying to construct a yield curve from underlying bonds, with the assumption that forward rates between constituent dates are flat, but I'm getting an exception: iteration: 01could not bootstrap the 2 instrument, maturity 2015/09/15: root not bracketed: f[2.22044604925031E-16,3] -> [-0.630056170925172,-0.630056170925172] It is a result of fxMin_ and fxMax_ being the same values, when solving for the interpolated value.
I found a similar thread from 2013 which experienced the same issue: but there was no solution. thanks Francois Botha
------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi,
can you post some code that reproduces the problem? Luigi On Tue, May 6, 2014 at 1:15 PM, Francois Botha <[hidden email]> wrote: > Hi, > > I'm trying to construct a yield curve from underlying bonds, with the > assumption that forward rates between constituent dates are flat, but I'm > getting an exception: > > iteration: 01could not bootstrap the 2 instrument, maturity 2015/09/15: root > not bracketed: f[2.22044604925031E-16,3] -> > [-0.630056170925172,-0.630056170925172] > > It is a result of fxMin_ and fxMax_ being the same values, when solving for > the interpolated value. > > I found a similar thread from 2013 which experienced the same issue: > http://sourceforge.net/p/quantlib/mailman/message/30416455/ > > but there was no solution. > > thanks > Francois Botha -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Francois Botha
On 6 May 2014 13:45, Luigi Ballabio <[hidden email]> wrote: Hi, ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I think *iterative* bootstrapping does not work with forward flat
interpolation by construction, but with backward flat it does, so this is not a limitation, is it ? The value of the forward on the curve's supporting points does not really matter, but only integrals over that quantity, no ? best, Peter On 6 May 2014 14:17, Francois Botha <[hidden email]> wrote: > Hi, > > The code is at http://pastie.org/private/56rqzqv7sn8lnbndfaaluw > > Francois > > Francois Botha > > > On 6 May 2014 13:45, Luigi Ballabio <[hidden email]> wrote: >> >> Hi, >> can you post some code that reproduces the problem? >> >> Luigi >> >> >> On Tue, May 6, 2014 at 1:15 PM, Francois Botha <[hidden email]> wrote: >> > Hi, >> > >> > I'm trying to construct a yield curve from underlying bonds, with the >> > assumption that forward rates between constituent dates are flat, but >> > I'm >> > getting an exception: >> > >> > iteration: 01could not bootstrap the 2 instrument, maturity 2015/09/15: >> > root >> > not bracketed: f[2.22044604925031E-16,3] -> >> > [-0.630056170925172,-0.630056170925172] >> > >> > It is a result of fxMin_ and fxMax_ being the same values, when solving >> > for >> > the interpolated value. >> > >> > I found a similar thread from 2013 which experienced the same issue: >> > http://sourceforge.net/p/quantlib/mailman/message/30416455/ >> > >> > but there was no solution. >> > >> > thanks >> > Francois Botha >> >> >> >> -- >> <https://implementingquantlib.blogspot.com> >> <https://twitter.com/lballabio> > > > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Yes, thanks a lot. The backward flat works. Maybe an appropriate exception should be thrown if the forward flat is used for bootstrapping? I also have another issue, but I'll send a separate mail for that. Thanks again.
F Francois Botha
On 6 May 2014 21:15, Peter Caspers <[hidden email]> wrote: I think *iterative* bootstrapping does not work with forward flat ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I wouldn't throw a specific exception. The framework lets you combine
interpolation schemes and bootstrap algorithms in a completely generic way, so imo it will be difficult to detect constellations that do not work by construction. Better throw the 'could not bootstrap ...' exception and let the user think deeply about what he might have done wrong ... :-) best, Peter On 8 May 2014 12:03, Francois Botha <[hidden email]> wrote: > Yes, thanks a lot. The backward flat works. Maybe an appropriate exception > should be thrown if the forward flat is used for bootstrapping? > > I also have another issue, but I'll send a separate mail for that. Thanks > again. > > F > > Francois Botha > > > On 6 May 2014 21:15, Peter Caspers <[hidden email]> wrote: >> >> I think *iterative* bootstrapping does not work with forward flat >> interpolation by construction, >> but with backward flat it does, so this is not a limitation, is it ? >> The value of the forward on >> the curve's supporting points does not really matter, but only >> integrals over that quantity, no ? >> best, Peter >> >> On 6 May 2014 14:17, Francois Botha <[hidden email]> wrote: >> > Hi, >> > >> > The code is at http://pastie.org/private/56rqzqv7sn8lnbndfaaluw >> > >> > Francois >> > >> > Francois Botha >> > >> > >> > On 6 May 2014 13:45, Luigi Ballabio <[hidden email]> wrote: >> >> >> >> Hi, >> >> can you post some code that reproduces the problem? >> >> >> >> Luigi >> >> >> >> >> >> On Tue, May 6, 2014 at 1:15 PM, Francois Botha <[hidden email]> >> >> wrote: >> >> > Hi, >> >> > >> >> > I'm trying to construct a yield curve from underlying bonds, with the >> >> > assumption that forward rates between constituent dates are flat, but >> >> > I'm >> >> > getting an exception: >> >> > >> >> > iteration: 01could not bootstrap the 2 instrument, maturity >> >> > 2015/09/15: >> >> > root >> >> > not bracketed: f[2.22044604925031E-16,3] -> >> >> > [-0.630056170925172,-0.630056170925172] >> >> > >> >> > It is a result of fxMin_ and fxMax_ being the same values, when >> >> > solving >> >> > for >> >> > the interpolated value. >> >> > >> >> > I found a similar thread from 2013 which experienced the same issue: >> >> > http://sourceforge.net/p/quantlib/mailman/message/30416455/ >> >> > >> >> > but there was no solution. >> >> > >> >> > thanks >> >> > Francois Botha >> >> >> >> >> >> >> >> -- >> >> <https://implementingquantlib.blogspot.com> >> >> <https://twitter.com/lballabio> >> > >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Is your legacy SCM system holding you back? Join Perforce May 7 to find >> > out: >> > • 3 signs your SCM is hindering your productivity >> > • Requirements for releasing software faster >> > • Expert tips and advice for migrating your SCM now >> > http://p.sf.net/sfu/perforce >> > _______________________________________________ >> > QuantLib-users mailing list >> > [hidden email] >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > > > ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |