This PR adds a set of new samples for calculating sensitivities with XAD in QuantLib. They are adaptions of the original QuantLib Examples to demonstrate XAD usage.
Benchmarking
Further, benchmarking performance versus the plain double version of the same sample is now possible for 4 of the samples. Performance for plain pricing as well as sensitivities calculation is measured, averaged over a number of iterations. Using the added CMake option QLXAD_DISABLE_AAD allows to switch to double-only mode, where the same sample is compiled without XAD support. Therefore, performance versus plain double evaluation and also versus a finite-difference based sensitivity calculation can be measured.
New Tests
The adjoint test suite has also been extended to include more pricers, comparing XAD-based sensitivities to finite difference to ensure correct results.
CI/CD
The CI/CD workflow has been adapted to build on all platforms with both XAD enabled and disabled, to ensure the code is working in call cases.
New Samples
This PR adds a set of new samples for calculating sensitivities with XAD in QuantLib. They are adaptions of the original QuantLib Examples to demonstrate XAD usage.
Benchmarking
Further, benchmarking performance versus the plain
double
version of the same sample is now possible for 4 of the samples. Performance for plain pricing as well as sensitivities calculation is measured, averaged over a number of iterations. Using the added CMake optionQLXAD_DISABLE_AAD
allows to switch todouble
-only mode, where the same sample is compiled without XAD support. Therefore, performance versus plaindouble
evaluation and also versus a finite-difference based sensitivity calculation can be measured.New Tests
The adjoint test suite has also been extended to include more pricers, comparing XAD-based sensitivities to finite difference to ensure correct results.
CI/CD
The CI/CD workflow has been adapted to build on all platforms with both XAD enabled and disabled, to ensure the code is working in call cases.