CHAPTER 11Discussion and Limitations
Before we apply our AAD library to instrument our simulation code from Part II, we briefly discuss some important aspects and limitations of AAD that will guide our work.
11.1 INPUTS AND OUTPUTS
We minimized AAD overhead as much as possible thanks to efficient memory management, and we minimize it further in Chapter 15 with expression templates, but AAD overhead cannot be eliminated. Even if we did not apply operator overloading or a tape, and manually coded adjoint computations along with the calculation code, AAD differentiation would still take around three times the cost of one calculation, as seen in Chapter 8. We come close to this theoretical limit with an automatic approach in Chapter 15.
AAD is only relevant when the number of inputs is large (certainly larger than four), as is almost always the case for financial valuation. With a low number of inputs, bumping is generally faster.
Further, AAD computes the differentials of one scalar result in constant time in the number of differentials, but the differentials of multiple results take linear time in the number of results. This is the case even when the calculation itself takes constant time or close in the number of the results, when all results are computed together and share a vast fraction of the computations, like when pricing multiple products in a simulation over the same paths. Differentiation still takes linear time, because the back-propagation of adjoints must be conducted ...
Get Modern Computational Finance now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.