456
Views
9
CrossRef citations to date
0
Altmetric
Research Papers

Stochastic automatic differentiation: automatic differentiation for Monte-Carlo simulations

ORCID Icon
Pages 1043-1059 | Received 10 Aug 2017, Accepted 14 Nov 2018, Published online: 18 Jan 2019
 

Abstract

In this paper we re-formulate the automatic differentiation (and in particular, the backward automatic differentiation, also known as adjoint automatic differentiation, AAD) for random variables. While this is just a formal re-interpretation it allows one to investigate the algorithms in the presence of stochastic operators like expectation, conditional expectation or indicator functions.

We then specify the algorithms to efficiently incorporate non-pathwise operators (like conditional expectation operators). Under a comparably mild assumption it is possible to retain the simplicity of the backward automatic differentiation algorithm in the presence of conditional expectation operators. This simplifies important applications like - in mathematical finance - the application of backward automatic differentiation to the valuation of Bermudan options or calculation of xVA's.

We give the proof for a generalized version of the result. We then discuss in detail how the framework allows dramatic reduction of the memory requirements and improves the performance of a tapeless implementation of automatic differentiation (while the implementation brings advantages similar to ‘vector AAD’ (sometimes called tape compression) for free, it allows improvements beyond this. We present the implementation aspects and show how concepts from object-functional programing, like immutable objects and lazy evaluation enable additional reductions of the memory requirements.

JEL classification:

Acknowledgments

We are grateful to Amine Chaieb and Marco Noll for stimulating discussions.

Disclosure statement

No potential conflict of interest was reported by the author.

Notes

† On a 64 bit system a memory address requires the same storage space as an IEEE 754 double precision floating point number.

† Although this assumption may be non-trivial in general, it is trivial if we consider Ω to be a discrete (Monte-Carlo) sampling space.

‡ Speaking of matrices, for derivatives, right multi-plication is replaced by left-multiplication, but for path-wise operators fm the derivative is self-adjoint.

† We have E(X)=E(E(XFt)) and E(AE(BFt)Ft)=E(AFt)E(BFt).

‡ For example (possibly slightly oversimplified): For small x we have that 1+x is a good approximation of exp(x), and 1=(/x)(1+x) is still a comparably good approximation for (/x)exp(x)=exp(x), but 0=(2/x2)(1+x) is maybe not a good approximation for (2/x2)exp(x)=exp(x).

† Although this assumption may be non-trivial in general, it is trivial if we consider Ω to be a discrete (Monte-Carlo) sampling space.

† Here we refer to the result stated in Section 1.1.1 where Mf refers to the memory requirement of the valuation and Tf refers to the computation time requirement of the valuation.

† In so called ‘managed’ languages, like Java, the virtual machine will free the memory used to store an object, once there is no other references held to the object (cyclic references may be detected and removed).

‡ This design is utilized in Citationfinmath.net since it first release (2004).

† The backward algorithm is constructing the snell envelope.

‡ Since there is no shift size, the is no dependency on the shift size and we get a horizontal line.

† We use a LIBOR Market Model in normal specification dL(Tj,Tj+1;t)=μj(t)dt+σj(t)dWj, with σj(t)σi,j for tit<ti+1 where L(Tj,Tj+1;t) denotes the forward rate for the period [Tj,Tj+1] observed at time t and the model vegas are the partial derivatives with respect to σi,j.

‡ The results may be reproduced by running the unit test LIBORMarketModelNormalAADSensitivitiesTest in Citationfinmath.net.

14 It is this random variable, which is propagated by the algorithm in Theorem 1 and the initial value z/x is the the unit random variable 1.

Log in via your institution

Log in to Taylor & Francis Online

PDF download + Online access

  • 48 hours access to article PDF & online version
  • Article PDF can be downloaded
  • Article PDF can be printed
USD 53.00 Add to cart

Issue Purchase

  • 30 days online access to complete issue
  • Article PDFs can be downloaded
  • Article PDFs can be printed
USD 691.00 Add to cart

* Local tax will be added as applicable

Related Research

People also read lists articles that other readers of this article have read.

Recommended articles lists articles that we recommend and is powered by our AI driven recommendation engine.

Cited by lists all citing articles based on Crossref citations.
Articles with the Crossref icon will open in a new tab.