Serving the Quantitative Finance Community

 
User avatar
surya2cents
Topic Author
Posts: 0
Joined: January 30th, 2009, 8:04 pm

approximate Jacobian calculation

June 13th, 2014, 11:44 am

Is there a fast approximate Jacobian calculation of swaps with respect to libor and discount curves? I am trying to bootstrap 3M libor and OIS discount using OIS swaps, libor-ois basis swaps and 3m libor swaps. The solver uses a levenberg-marquardt algorithm and calculates an approximate numerical jacobian at each step. Since our desired Jacobian is approximately sparse, I am wondering if there are smart ways to calculate it and thus speed up the curve building.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

approximate Jacobian calculation

June 13th, 2014, 12:14 pm

Duration ?
knowledge comes, wisdom lingers
 
User avatar
bearish
Posts: 5906
Joined: February 3rd, 2011, 2:19 pm

approximate Jacobian calculation

June 13th, 2014, 11:36 pm

I have a feeling that Miron and Swannell covered that in their book 20-some years ago.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

approximate Jacobian calculation

June 14th, 2014, 8:41 am

Isn't the dominant term in the jacobian going to the derivatives with respect to the rate at ith instrument's maturity ?
knowledge comes, wisdom lingers
 
User avatar
ppauper
Posts: 11729
Joined: November 15th, 2001, 1:29 pm

approximate Jacobian calculation

June 15th, 2014, 11:18 am

QuoteOriginally posted by: surya2centsSince our desired Jacobian is approximately sparse, I am wondering if there are smart ways to calculate it and thus speed up the curve building.what is it, 2x2 ? 3x3 ?you could probably write down (on paper) the full expression for the Jacobian and then cross out the terms that are close to zero (because it is approximately sparse) and see what you are left with
 
User avatar
mathmarc
Posts: 2
Joined: March 18th, 2003, 6:50 am

approximate Jacobian calculation

June 15th, 2014, 8:17 pm

QuoteOriginally posted by: surya2centsIs there a fast approximate Jacobian calculation of swaps with respect to libor and discount curves? Why do you want an approximate calculation? Why not an exact one? Specially if you want to use it for risk management, it is better to have an exact matrix.Algorithmic Differentiation (AD) provides a fast exact calculation. In AD, fast mean that computing the sensitivity of the output (PV) with respect to the input (curve parameters) takes less than 3 times the time required for one PV (even if there are 100 dependent nodes in your curves and thus 100 sensitivities to compute). From my experience, having implemented it for a full quantitatve finance library, it is very efficient and decently easy to put in place (if your library has been design from the start with AD in mind).Bearish: I'm not familiar with Miron and Swannell book. What is their suggestion to speed the curve calibration with a large number of node?
 
User avatar
bearish
Posts: 5906
Joined: February 3rd, 2011, 2:19 pm

approximate Jacobian calculation

June 15th, 2014, 9:31 pm

QuoteOriginally posted by: mathmarcQuoteOriginally posted by: surya2centsIs there a fast approximate Jacobian calculation of swaps with respect to libor and discount curves? Why do you want an approximate calculation? Why not an exact one? Specially if you want to use it for risk management, it is better to have an exact matrix.Algorithmic Differentiation (AD) provides a fast exact calculation. In AD, fast mean that computing the sensitivity of the output (PV) with respect to the input (curve parameters) takes less than 3 times the time required for one PV (even if there are 100 dependent nodes in your curves and thus 100 sensitivities to compute). From my experience, having implemented it for a full quantitatve finance library, it is very efficient and decently easy to put in place (if your library has been design from the start with AD in mind).Bearish: I'm not familiar with Miron and Swannell book. What is their suggestion to speed the curve calibration with a large number of node?I don't think I ever read the book, but I saw some of the ideas implemented by one of the authors in Excel 4 macro language (which I suspect may still run somewhere). The point, as I recall it, was basically to obtain hedges efficiently by having precomputed the sensitivity of the curve points to the hedging instruments. Undoubtedly, more modern approaches would be preferred today.