Login  Register

Re: 答复: Adjoint Greeks

Posted by Alexander Sokol on Mar 03, 2015; 8:02am
URL: http://quantlib.414.s1.nabble.com/Adjoint-Greeks-tp16147p16296.html

Hi Peter:

My impression currently is that keeping track of AD vs. non-AD variables manually and designing the code to compile with two different types of variables in different classes is going to be very cumbersome, and not necessarily effective in terms of performance. By the time we get to the slow part of the calculation such as lattice and Monte Carlo, the variables in the time slice will all have to be AD variables. If this is the case, then getting typedef to QlDouble, which in turn contains AD<double> as a data member, is the easiest and fastest way to get the entire library supporting AD. In fact, the conversion is already done and we are about to release the code on GitHub - currently testing and resolving the remaining issues with conversion of InterestRate to Real.

I also think the work only just begins, because using AD effectively with Monte Carlo and other numerical techniques will require considerable amount of additional engineering - so we are still far from having an effective AD implementation for e.g. XVA or other numerical calculations where additional speed is most important. The version of the code with typedef only gets us to the starting line for that effort.

Alex