Different first and non-first solvers for IterativeBootstrap

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

Different first and non-first solvers for IterativeBootstrap

igitur
Hi,

I noticed that in iterativebootstrap.hpp there are 2 solvers defined. Brent , which is used when an existing curve has not been bootstrapped and FiniteDifferenceNewtonSafe, for when an existing curve is updated. 

I was just wondering why the use of 2 solvers. Is it purely for performance reasons? Does the FiniteDifferenceNewtonSafe solver perform better than Brent when a curve already exists? Or are there other reasons?

thanks a lot
Francois Botha

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Different first and non-first solvers for IterativeBootstrap

Ferdinando Ametrano-4
Hi Francois

Newton Raphson is more efficient than Brent, but it requires the calculation of the first derivative. This derivative is almost for free if you have to update a curve from a know previous state, which is not the case in the first iteration.

Moreover, in the first iteration Newton Raphson can diverge because of unstable derivative calculation and so it has to be bounded resorting to bisection in case of failure. In this case Brent is more efficient

hope it helps
Ferdinando

On Wed, Mar 22, 2017 at 12:19 PM, Francois Botha <[hidden email]> wrote:
Hi,

I noticed that in iterativebootstrap.hpp there are 2 solvers defined. Brent , which is used when an existing curve has not been bootstrapped and FiniteDifferenceNewtonSafe, for when an existing curve is updated. 

I was just wondering why the use of 2 solvers. Is it purely for performance reasons? Does the FiniteDifferenceNewtonSafe solver perform better than Brent when a curve already exists? Or are there other reasons?

thanks a lot
Francois Botha

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Different first and non-first solvers for IterativeBootstrap

igitur
Makes perfect sense. Thanks very much. 

On 22 Mar 2017 17:44, "Ferdinando M. Ametrano" <[hidden email]> wrote:
Hi Francois

Newton Raphson is more efficient than Brent, but it requires the calculation of the first derivative. This derivative is almost for free if you have to update a curve from a know previous state, which is not the case in the first iteration.

Moreover, in the first iteration Newton Raphson can diverge because of unstable derivative calculation and so it has to be bounded resorting to bisection in case of failure. In this case Brent is more efficient

hope it helps
Ferdinando

On Wed, Mar 22, 2017 at 12:19 PM, Francois Botha <[hidden email]> wrote:
Hi,

I noticed that in iterativebootstrap.hpp there are 2 solvers defined. Brent , which is used when an existing curve has not been bootstrapped and FiniteDifferenceNewtonSafe, for when an existing curve is updated. 

I was just wondering why the use of 2 solvers. Is it purely for performance reasons? Does the FiniteDifferenceNewtonSafe solver perform better than Brent when a curve already exists? Or are there other reasons?

thanks a lot
Francois Botha

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users