Page 1 of 1
approximate Jacobian calculation
Posted: June 13th, 2014, 11:44 am
by surya2cents
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.
approximate Jacobian calculation
Posted: June 13th, 2014, 12:14 pm
by daveangel
Duration ?
approximate Jacobian calculation
Posted: June 13th, 2014, 11:36 pm
by bearish
I have a feeling that Miron and Swannell covered that in their book 20-some years ago.
approximate Jacobian calculation
Posted: June 14th, 2014, 8:41 am
by daveangel
Isn't the dominant term in the jacobian going to the derivatives with respect to the rate at ith instrument's maturity ?
approximate Jacobian calculation
Posted: June 15th, 2014, 11:18 am
by ppauper
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
approximate Jacobian calculation
Posted: June 15th, 2014, 8:17 pm
by mathmarc
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?
approximate Jacobian calculation
Posted: June 15th, 2014, 9:31 pm
by bearish
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.