A deep BSDE approach for the simultaneous pricing and delta-gamma hedging of large portfolios consisting of high-dimensional multi-asset Bermudan options Balint Negyesi, Cornelis W. Oosterlee Abstract A deep BSDE approach is presented for the pricing and delta-gamma hedging of high-dimensional Bermudan options, with applications in portfolio risk management. Large portfolios of a mixture of multi-asset European and Bermudan derivatives are cast into the framework of discretely reflected BSDEs. This system is discretized by the One Step Malliavin scheme (Negyesi et al. [2024, 2025]) of discretely reflected Markovian BSDEs, which involves a Γ \Gamma process, corresponding to second-order sensitivities of the associated option prices. The discretized system is solved by a neural network regression Monte Carlo method, efficiently for a large number of underlyings. The resulting option Deltas and Gammas are used to discretely rebalance the corresponding replicating strategies. Numerical experiments are presented on both high-dimensional basket options and large portfolios consisting of multiple options with varying early exercise rights, moneyness and volatility. These examples demonstrate the robustness and accuracy of the method up to 100 100 risk factors. The resulting hedging strategies significantly outperform benchmark methods both in the case of standard delta- and delta-gamma hedging. Keywords: discretely reflected BSDE, deep BSDE, delta-gamma hedging, Greeks, portfolio risk management 1 Introduction In this paper we are concerned with the challenging hedging problem of large portfolios of high-dimensional options with early-exercise features. Consider an investor who is in possession of a portfolio consisting of J many options whose values depend on a set of common risk factors \{X_{t}\}_{0\leq t\leq T} which can be decomposed into a set of tradeable underlying assets \{S_{t}=(S_{t}^{1},\dots,S_{t}^{m})\}_{0\leq t\leq T} and some other non-tradeable component \{\nu_{t}=(\nu_{t}^{1},\dots,\nu_{t}^{d-m})\}_{0\leq t\leq T} , and they together form an Itô process X_{t}\coloneqq(S_{t},\nu_{t}) solving the following stochastic differential equation (SDE) \displaystyle X_{t}=X_{0}+\int_{0}^{t}\mu(s,X_{s})\mathrm{d}s+\int_{0}^{t}\sigma(s,X_{s})\mathrm{d}W_{s}, (1) where \mu:[0,T]\times\mathbb{R}^{d}\to\mathbb{R}^{d} , \sigma:[0,T]\times\mathbb{R}^{d}\to\mathbb{R}^{d\times d} , and \{W_{t}\}_{0\leq t\leq T} a d -dimensional Brownian motion in an appropriate probability space. Fixing some time horizon 0\widetilde{Y}^{j}_{t}}[l^{j}(X_{t})-\widetilde{Y}_{t}^{j}]\eqqcolon\mathfrak{R}^{j}_{y}(t,X_{t},\widetilde{Y}_{t}^{j}),\end{aligned} (6) where \underline{r}_{t}^{j}\coloneqq\sup\{r\in\mathcal{R}^{j}:r\leq t\} , \overline{r}_{t}^{j}\coloneqq\inf\{r\in\mathcal{R}^{j}:r>t\} and g^{j},l^{j}:\mathbb{R}^{d_{j}}\to\mathbb{R} are deterministic mappings corresponding to the terminal condition and (Markovian) lower boundary process, respectively. Equation ( 6 ) together with ( 1 ) forms a discretely reflected FBSDE system which, under appropriate assumptions, admits a unique solution triple, see e.g. [ 19 ] . Reflected BSDEs are inherently related to second-order, semi-linear parabolic, free-boundary PDEs. In fact, under suitable assumptions, they retain a Feynman-Kac type relation similar to ( 5 ) in the standard case, see [ 19 ] . From the financial mathematics perspective, the main relevance of such equations is that they are a natural model for optimal stopping problems, such as Bermudan options, where \mathcal{R}^{j} corresponds to the set of early-exercise dates, g^{j}\equiv l^{j} to the instantaneous payoff, \widetilde{Y}_{t}^{j},Y_{t}^{j},Z_{t}^{j} to the continuation value, option price and option delta at time t , respectively. Notice that ( 6 ) includes the standard, Markovian BSDE framework associated with European options by letting \mathcal{R}^{j}=\{0,T\} . Furthermore, from the numerical point of view, a suitable discretization of ( 6 ) is an approximation of American options in the asymptotic R^{j}\to\infty . Hence, in what follows we refer to all of the options in ( 2 ) as solutions to a discretely reflected FBSDE. Similar to ( 1 ), we define g\coloneq(g^{1};\dots;g^{J}):\mathbb{R}^{d}\to\mathbb{R}^{J} , g\coloneqq(f^{1};\dots;f^{J}):[0,T]\times\mathbb{R}^{d}\times\mathbb{R}^{J}\times\mathbb{R}^{J\times d}\to\mathbb{R}^{J} , \widetilde{Y}_{t}\coloneqq(\widetilde{Y}_{t}^{1};\dots;\widetilde{Y}_{t}^{J}) , Y_{t}\coloneqq(Y_{t}^{1};\dots;Y_{t}^{J}) and Z_{t}\coloneqq(Z_{t}^{1};\dots;Z_{t}^{J}) by the row-wise concatenated solutions of ( 6 ) for each j=1,\dots,J . Therefore, (Y,Z)\in\mathbb{S}^{2}(\mathbb{R}^{J})\times\mathbb{H}^{2}(\mathbb{R}^{J\times d}) satisfy a collection of discretely reflected BSDEs. It is important to notice that even though in this formulation we cast the problem of J options into the framework of vector-valued, discretely reflected BSDEs, this indeed is of mere formal convenience, and the corresponding system is only a collection not a system, i.e. the solution pair (Y^{i},Z^{i}) does not enter the dynamics of (Y^{j},Z^{j}) for i\neq j . This is of fundamental importance, since the well-posedness of multi-dimensional reflected BSDEs remains to be a challenging open problem due to the lack of comparison principles in the vector-valued setting, see [ 31 ] and the references therein. Nevertheless, in the context of our work, there is no cross-dependence between equations of the type ( 6 ), and the resulting collections can safely be treated without the aforementioned theoretical obstacles. Henceforth the system of discretely reflected BSDEs simultaneously representing all options in ( 2 ) reads as follows \displaystyle\begin{aligned} Y_{T}&=\widetilde{Y}_{T}\coloneqq(g^{1}(X_{T}),\dots,g^{J}(X_{T})),\\ \widetilde{Y}_{t}&=\begin{aligned} (Y_{\overline{r}^{1}_{t}}^{1};\dots;Y_{\overline{r}^{J}_{t}}^{J})&+\Big(\int_{t}^{\overline{r}^{1}_{t}}f^{1}(s,X_{s},\widetilde{Y}_{s}^{1},Z_{s}^{1})\mathrm{d}s;\dots;\int_{t}^{\overline{r}^{J}_{t}}f^{J}(s,X_{s},\widetilde{Y}_{s}^{J},Z_{s}^{J})\mathrm{d}s\Big)\\ &-\Big(\int_{t}^{\overline{r}^{1}_{t}}Z_{s}^{1}\mathrm{d}W_{s};\dots;\int_{t}^{\overline{r}^{J}_{t}}Z_{s}^{J}\mathrm{d}W_{s}\Big),\hskip 9.24994ptt\in[\underline{r}^{j}_{t},\overline{r}^{j}_{t}),\end{aligned}\\ Y_{t}&\coloneqq(\mathfrak{R}^{1}_{y}(t,X_{t},\widetilde{Y}_{t}^{1};\dots;\mathfrak{R}_{y}^{J}(t,X_{t},\widetilde{Y}_{t}^{J})\eqqcolon\mathfrak{R}(t,X_{t},\widetilde{Y}_{t}).\end{aligned} (7) The standard Euler discretization of ( 6 ) is done in two steps. First, in case no analytical solution is available, one needs to approximate the forward diffusion in ( 1 ) via suitable discrete time approximations, e.g. an Euler-Maruyama scheme such as below \displaystyle X_{0}^{\pi}=x_{0},\hskip 9.24994ptX_{n+1}^{\pi}=X_{n}^{\pi}+\mu(t_{n},X_{n}^{\pi})\Delta t_{n}+\sigma(t_{n},X_{n}^{\pi})\Delta W_{n},\hskip 9.24994pt\text{for}\hskip 9.24994ptn=0,\dots,N-1. (8) Thereafter, one gathers discrete time approximations to ( 6 ) through a backward recursion of conditional expectations, over a discrete time partition 0=t_{0}\alpha\},\hskip 9.24994pt\text{ES}_{\alpha}(\text{PnL})\coloneqq\mathbb{E}[\text{PnL}|\text{PnL}<\text{VaR}_{\alpha}],\\ \text{SVar}_{-}(\text{PnL})&\coloneqq\mathbb{E}[(\text{PnL}-\mathbb{E}[\text{PnL}])^{2}|\text{PnL}<\mathbb{E}[\text{PnL}]].\end{aligned} (14) (a) delta hedging (b) delta-gamma hedging Figure 1: Comparison between delta- and delta-gamma hedging, given the number of discrete rebalancing dates N . Portfolio consisting of a single European vanilla call with maturity T=1 , strike K=100 , and r=0 , \sigma=0.25 . European vanilla put used as Gamma hedging instrument with maturity 2T , and the same strike. As an illustration between the accuracy of delta-gamma compared to delta hedging in the discrete time rebalancing framework, figure 1 depicts the distribution of the PnL at maturity corresponding to strategies ( 2 ) and ( 11 ), when the corresponding portfolio consists of a single, European vanilla call. In fig. 1 the distribution of the PnL is collected for several equidistant rebalancing dates. As can be seen, by including second-order sensitivities, one gains roughly an order of magnitude accuracy in the variance of the PnL distribution. 3.2 One Step Malliavin schemes As illustrated by figure 1 , equation ( 11 ) brings an improvement to standard delta hedging in the discrete time framework by offsetting second-order terms in the series expansion of the corresponding portfolio value. However, unlike in the case of a vanilla Black-Scholes option, this comes with an additional modelling challenge. In exchange for the additional discrete replication accuracy, ( 12 ) exposes an investor to additional model risk, namely, accurate approximations of the options’ Gammas, which is necessary in order to be able to compute the gamma-hedging weights \beta_{t}^{k} according to the second-order constraints – see right-hand side of ( 12a ). Discretely reflected BSDEs and the Feynman-Kac relations ( 5 ) only provide access to the Deltas and not to Gamma. In order to address this gap in the FBSDE context, we exploit ideas presented in [ 24 , 25 ] and use the One Step Malliavin scheme to collect the necessary approximations of second-order Greeks. In particular, it turns out that under sufficient conditions, see [ 3 , Proposition 5.1] that the Z part of the solution pair of the (discretely) reflected BSDE ( 6 ) can be represented as the solution to a linear, vector-valued BSDE, corresponding to the Malliavin derivatives \{(D_{t}\widetilde{Y}_{u},D_{t}Z_{u})\}_{0\leq t\leq r\leq T} \displaystyle\begin{aligned} \widetilde{Z}_{t}\coloneqq D_{t}\widetilde{Y}_{u}^{j}&=\begin{aligned} &D_{t}\widetilde{Y}_{u}^{j}+\mathbf{1}_{u\in\mathcal{R}^{j}\setminus\{0,T\}}\mathbf{1}_{l^{j}(X_{u})>\widetilde{Y}_{u}^{j}}\\ &+\int_{\underline{r}_{t}^{j}}^{\overline{r}_{t}^{j}}\begin{aligned} \big[&\nabla_{x}f(s,X_{s},\widetilde{Y}_{s}^{j},Z_{s}^{j})D_{t}X_{s}+\nabla_{y}f(s,X_{s},\widetilde{Y}_{s}^{j},Z_{s}^{j})D_{t}\widetilde{Y}_{s}^{j}\\ &+\nabla_{z}f(s,X_{s},\widetilde{Y}_{s}^{j},Z_{s}^{j})D_{t}Z_{s}^{j}\big]\mathrm{d}s-\int_{\underline{r}_{t}^{j}}^{\overline{r}_{t}^{j}}\big(D_{t}Z_{s}^{j}\big)^{T}\mathrm{d}W_{s},\hskip 9.24994ptt\in[0,T],u\in[\underline{r}_{t}^{j},\overline{r}_{t}^{j}),\end{aligned}\end{aligned}\\ Z_{t}^{j}&=D_{t}\widetilde{Y}_{t}^{j}+\mathbf{1}_{t\in\mathcal{R}^{j}}\mathbf{1}_{l^{j}(X_{t})>\widetilde{Y}_{t}^{j}}\big[D_{t}l^{j}(X_{t})-D_{t}\widetilde{Y}_{t}^{j}\big]\eqqcolon\mathfrak{R}^{j}_{z}(t,X_{t},\widetilde{Y}_{t}^{j},D_{t}\widetilde{Y}_{t}^{j}).\end{aligned} (15) Most importantly, the representation in ( 15 ) does not only provide a way to compute the Deltas in form of a linear BSDE, but through the DZ process and the Malliavin chain rule, the solution of ( 15 ) also includes second-order derivatives of the j ’th option price, i.e. Gammas. In light of the Malliavin chain rule – see e.g. [ 26 ] – the DZ process coincides with the formal derivative of the Z process, and one has \displaystyle D_{t}Z_{t}\sigma^{-1}(t,X_{t})=\gamma(t,X_{t})=\nabla_{x}z(t,X_{t}), (16) where Z_{t}=z(t,X_{t}) is the Markovian mapping of the Z process given by the Feynman-Kac formula ( 5 ). Subsequently, this leads to the following expression recovering the Hessian matrix of the value function \displaystyle\text{Hess }v^{j}(t,X_{t})=(\sigma^{-1}(t,X_{t}))^{T}(\gamma(t,X_{t})-\nabla v^{j}(t,X_{t})\nabla\sigma(t,X_{t})). (17) The One Step Malliavin (OSM) scheme is a discretization which simultaneously solves the pair of BSDEs ( 6 ) and ( 15 ). Henceforth, it involves a sequence of discrete time approximations, which – in case of appropriate approximations of the resulting nested, backward recursion of conditional expectations – gives approximations for the stochastic counterparts of options’ prices, Deltas and also Gammas, i.e. all components needed in the discrete time rebalancing of the delta-gamma hedging portfolio in ( 11 ). In particular, given a simultaneous discrete time solution of ( 6 ) and ( 15 ) one can immediately solve the corresponding gamma hedging constraints in ( 12 ). In order to be able to formulate the corresponding deep BSDE approximations, we briefly outline the time discretization of the OSM scheme. The forward diffusion is approximated according to an Euler-Maruyama scheme as in ( 8 ). Thereafter, the Malliavin derivative of the forward diffusion is again approximated by an Euler-Maruyama scheme leading to the following discrete time approximations \displaystyle\begin{split}D_{n}X_{n}^{\pi}&=\sigma(t_{n},X_{n}^{\pi}),\\ D_{n}X_{n+1}^{\pi}&=D_{n}X_{n}^{\pi}+\Delta t_{n}\nabla_{x}\mu(t_{n},X_{n}^{\pi})D_{n}X_{n}^{\pi}+\sum_{k=1}^{d}\nabla_{x}\sigma^{k}(t_{n},X_{n}^{\pi})D_{n}X_{n}^{\pi}\Delta W_{n}^{k},\end{split} (18) where \sigma^{k} is the k th column of the diffusion matrix, and \Delta W_{n}^{k} is the k th element of the Brownian increment vector – see e.g. [ 30 ] . Then a backward recursive sequence of conditional expectations can be formulated for the discrete approximations of the backward equations ( 6 ), ( 15 ) as follows \displaystyle\begin{split}Y_{N}^{j,\pi}&=\widetilde{Y}_{N}^{j,\pi}=g^{j}(X_{N}^{\pi}),\hskip 9.24994ptZ_{N}^{j,\pi}=\widetilde{Z}_{N}^{j,\pi}=\nabla g(X_{N}^{\pi})\sigma(T,X_{N}^{\pi}),\\ \Gamma_{n}^{j,\pi}\sigma(t_{n},X_{n}^{\pi})&\coloneqq D_{n}Z_{n}^{j,\pi}=\begin{aligned} \frac{1}{\Delta t_{n}}\mathbb{E}\big[\Delta W_{n}\big(D_{n}Y_{n+1}^{j,\pi}+\Delta t_{n}f^{D,j}(t_{n+1},\mathbf{X}_{n+1}^{j,\pi},\mathbf{D}_{n}\mathbf{X}_{n+1,n}^{j,\pi}\big)\big]\end{aligned}\\ \widetilde{Z}_{n}^{j,\pi}=D_{n}\widetilde{Y}_{n}^{j,\pi}&=\begin{aligned} \mathbb{E}\big[D_{n}Y_{n+1}^{j,\pi}+\Delta t_{n}f^{D,j}(t_{n+1},\mathbf{X}_{n+1}^{j,\pi},\mathbf{D}_{n}\mathbf{X}_{n+1,n}^{j,\pi}\big],\end{aligned}\\ \widetilde{Y}_{n}^{j,\pi}&=\begin{aligned} &\vartheta_{y}\Delta t_{n}f^{j}(t_{n},X_{n}^{\pi},\widetilde{Y}_{n}^{j,\pi},Z_{n}^{j,\pi})+\mathbb{E}_{n}[Y_{n+1}^{j,\pi}+(1-\vartheta_{y})\Delta t_{n}f^{j}(t_{n+1},X_{n+1}^{\pi},\widetilde{Y}_{n+1}^{j,\pi},Z_{n+1}^{j,\pi})],\end{aligned}\\ Z_{n}^{j,\pi}&=\mathfrak{R}^{j}_{z}(t_{n},X_{n}^{\pi},\widetilde{Y}_{n}^{j,\pi},D_{n}\widetilde{Y}_{n}^{j,\pi}),\hskip 9.24994ptY_{n}^{j,\pi}=\mathfrak{R}^{j}_{y}(t_{n},X_{n}^{\pi},\widetilde{Y}_{n}^{j,\pi}),\end{split} (19) with the following approximation motivated by the Malliavin chain rule and the Feynman-Kac formula \displaystyle D_{n}Y_{n+1}^{j,\pi}=Z_{n+1}^{j,\pi}\sigma^{-1}(t_{n+1},X_{n+1}^{\pi})D_{n}X_{n+1}^{\pi}. (20) Similarly to [ 24 , 25 ] , in the above we use the short hand notations \mathbf{X}_{n}^{j,\pi}\coloneqq(X_{n}^{\pi},\widetilde{Y}_{n}^{j,\pi},Z_{n}^{j,\pi}) , \mathbf{D}_{n}\mathbf{X}_{n+1,n}^{j,\pi}=(D_{n}X_{n+1}^{\pi},D_{n}\widetilde{Y}_{n+1}^{j,\pi},D_{n}Z_{n}^{j,\pi}) and \displaystyle f^{D,j}(t,\mathbf{X}_{n}^{j,\pi},\mathbf{D}_{n}\mathbf{X}_{n+1,n}^{j,\pi})=\nabla_{x}f(t,\mathbf{X}_{n}^{j,\pi})D_{n}X_{n+1}^{\pi}+\nabla_{y}f(t,\mathbf{X}_{n}^{j,\pi})D_{n}\widetilde{Y}_{n+1}^{j,\pi}+\nabla_{z}f(t,\mathbf{X}_{n}^{j,\pi})D_{n}Z_{n}^{\pi}. (21) In particular, combining the Feynman-Kac relations in ( 5 ) with the Malliavin chain rule, one gathers the following one on one correspondence between the stochastic processes in ( 19 ) and the prices and Greeks of the options in the gamma-hedging portfolio in ( 12 ). Indeed, for each option j , \widetilde{Y}^{j},Y^{j} describe the continuation value and price; \widetilde{Z}^{j} – derivative of the continuation value; Z^{j} the Delta an \Gamma the second-order Greeks. In order to recover option Deltas and Gammas, from these processes, one combines ( 5 ) with ( 17 ), to obtain \displaystyle\text{Delta}^{j,\pi}(t_{n},X_{n}^{\pi})=Z_{n}^{j,\pi}\sigma^{-1}(t_{n},X_{n}^{\pi}),\hskip 9.24994pt\text{Gamma}^{j,\pi}(t_{n},X_{n}^{\pi}) \displaystyle=(\sigma^{-1}(t,X_{t}))^{T}(\gamma(t,X_{t})-\nabla v^{j}(t,X_{t})\nabla\sigma(t,X_{t})). (22) As implied by these expressions above, the One Step Malliavin scheme for discretely reflected BSDEs in ( 19 ) provides discrete time approximations for the simultaneous pricing and delta-gamma hedging for each option j in the portfolio ( 11 ). In fact, given appropriate approximations of the conditional expectations in ( 19 ), one can quantify the right-hand sides of ( 12 ) corresponding to first- and second-order Greeks of all associated options. Then the solution of the linear system in ( 12 ) provides the evolution of the corresponding discretely rebalanced replicating portfolio as follows \displaystyle\begin{split}P_{0}^{\Gamma,\pi}=0,\hskip 18.49988ptP_{n}^{\Gamma,\pi}=-\sum_{j=0}^{J}Y^{j,\pi}_{n}+\sum_{i=1}^{m}\alpha_{n}^{i,\pi}\big(S_{n}^{i,\pi}+q_{t_{n}}^{i}S_{n}^{i,\pi}\Delta t_{n}\big)+\sum_{k=1}^{K}\beta^{k,\pi}_{n}u^{k}(t_{n},X_{n}^{\pi})+B_{n}^{\pi},\end{split} (23) for n=0,\dots,N . In the above, B_{n}^{\pi}=e^{r\Delta t_{n}}B_{n-1}^{\pi}-\sum_{i=1}^{m}S_{n}^{i,\pi}(\alpha_{n}^{i,\pi}-\alpha_{n-1}^{i,\pi})-\sum_{k=1}^{K}(\beta^{k,\pi}_{n}-\beta^{k,\pi}_{n-1})u^{k}(t_{n},X_{n}^{\pi}), when n\geq 1 , as the portfolio is self-financing. However, in order to make the scheme implementable in a high-dimensional framework, i.e. whenever the number of underlying risk factors collected in X , or the number of options in the portfolio J is large, one needs to have a method which accurately approximates the conditional expectations in ( 19 ). This is discussed in the following section. 4 Deep BSDE approximations on the portfolio level In order to compute the conditional expectations in ( 9 ) and ( 19 ), accurately and robustly in a high-dimensional framework when d in ( 1 ) or J in ( 2 )-( 11 ) are large, we present a methodology based on deep neural network Monte Carlo regressions which is capable of dealing with such high-dimensional problems. Our formulation is a variant of the backward deep BSDE method. In what follows we extend this backward deep BSDE methodology in [ 24 , 25 ] to the delta ( 3 ) and delta-gamma hedging ( 12 ) framework of the portfolio problem in ( 2 ) and ( 11 ), i.e. the simultaneous approximation of all option prices, Deltas and Greeks j=1,\dots,J . In the rest of the paper, \pi\coloneqq\{0=t_{0}g^{j}(X_{n}^{\pi})}\left[\nabla_{x}g^{j}(X_{n}^{\pi})\sigma(t_{n},X_{n}^{\pi})-\psi^{j}(X_{n}^{\pi}|\theta^{z})\right].\end{aligned} (26) Similarly, given the same approximation for the continuation value, the corresponding option price can be approximated by combining the continuation value with the discrete early exercise strategy implied by the reflection taking place in ( 6 ). The resulting approximations read as follows \displaystyle Y_{n}^{j,\pi}\begin{aligned} &\approx\mathfrak{R}^{j}_{y}(t_{n},X_{n}^{\pi},\varphi^{j}(X_{n}^{\pi}|\theta^{y}))=\varphi^{j}(X_{n}|\theta^{y})+\mathbf{1}_{t_{n}\in\mathcal{R}^{j}\setminus\{0,T\}}\mathbf{1}_{\varphi^{j}(X_{n}^{\pi}|\theta^{y})>g^{j}(X_{n}^{\pi})}\left[g^{j}(X_{n}^{\pi})-\varphi^{j}(X_{n}^{\pi}|\theta^{y})\right].\end{aligned} (27) The approximations in ( 26 ) and ( 27 ) can easily be vectorized over j=1,\dots,J , so that they act simultaneously on the whole row-wise concatenated system of discretely reflected BSDEs in ( 7 ). Then, combining ( 26 ) with the reflection in the continuation value defined in ( 27 ), one can subsequently formulate the following loss function approximating the last conditional expectation in the discrete time recursion in ( 19 ). In particular, we define the following loss function for the Y part of ( 6 ) \displaystyle\mathcal{L}_{n}^{y}(\theta^{y})\coloneqq\begin{aligned} \mathbb{E}\Big[|&\widehat{Y}_{n+1}^{\pi}+(1-\vartheta_{y})\Delta t_{n}f(t_{n+1},\mathbf{X}_{n+1}^{\pi})+\vartheta_{y}\Delta t_{n}f(t_{n},X_{n}^{\pi},\varphi(X_{n}^{\pi}|\theta^{y}),\widehat{Z}_{n}^{\pi})\\ &-\varphi(X_{n}^{\pi}|\theta^{y})-\widehat{Z}_{n}^{\pi}\Delta W_{n}|^{2}\Big].\end{aligned} (28) We emphasize that the approximation above, and its corresponding conditional expectation in ( 19 ), is implicit in the continuation value, not just through the \vartheta_{y}>0 parameter, but also through the reflection occuring in ( 26 ). In fact, the approach in ( 24 ), ( 28 ) approximates the BSDEs in ( 15 ) and ( 6 ), respectively, meaning that the resulting approximations \varphi,\psi correspond to the continuation value and its gradient, respectively. In order to then approximate the option prices, and their derivatives, one needs to approximate the reflection associated with early exercising in the discrete time framework. This is achieved by ( 26 ) and ( 27 ) accordingly. The deep BSDE method outlined above explains all necessary steps one needs to take at a given time step t_{n} locally. Thereafter, the method given by the loss functions ( 24 ) and ( 28 ), is made fully implementable by a backward recursion starting at terminal time, executed as follows. First, given a suitable discretization of the forward SDE and its Malliavin derivative, e.g. an Euler-Maruyama scheme such as ( 8 ) and ( 18 ), one needs to collect the terminal condition \widehat{Y}_{N}^{\pi}=\hat{\tilde{Y}}_{N}^{\pi}=(g^{1}(X_{N}^{\pi}),\dots,g^{J}(X_{N}^{\pi})) and Z_{N}^{\pi}=\tilde{Z}_{N}^{\pi}=(\nabla_{x}g^{1}(X_{N}^{\pi}),\dots,\nabla_{x}g^{J}(X_{N}^{\pi}))\sigma(T,X_{N}^{\pi}) as in ( 19 ). Then, in a backward recursion going from n=N-1 to 0 , one parametrizes the solution pair of the Malliavin BSDE in ( 15 ) at time step n according to \psi(\cdot|\theta^{z}),\chi(\cdot|\theta^{\gamma}) . These parametrizations are optimized according to the loss function \mathcal{L}_{n}^{z}(\theta^{z},\theta^{\gamma}) defined in ( 24 ). Through a suitable minimization procedure such as stochastic gradient descent, one then subsequently gathers appropriate approximations of the optimal parameter set (\widehat{\theta}_{n}^{z},\widehat{\theta}_{n}^{\gamma})\in\argmin_{\theta^{z},\theta^{\gamma}}\mathcal{L}_{n}^{z}(\theta^{z},\theta^{\gamma}) . Setting \displaystyle\widehat{\Gamma}_{n}^{\pi}=\chi(X_{n}^{\pi}|\widehat{\theta}_{n}^{\gamma}),\hskip 9.24994pt\hat{\tilde{Z}}_{n}^{\pi}=\psi(X_{n}^{\pi}|\widehat{\theta}_{n}^{z}) (29) provides approximations for the first and second conditional expectations in ( 19 ). Combining these approximations with the estimations of the discrete reflections given by ( 26 ) and ( 27 ) then gives loss function \mathcal{L}_{n}^{y}(\theta^{y}) at time step t_{n} , that is meant to measure the approximation quality in the continuation values in the discretely reflected BSDE of ( 6 ). A second stochastic gradient descent optimization then estimates the optimal parameter set \widehat{\theta}_{n}^{y}\in\argmin_{\theta^{y}}\mathcal{L}_{n}^{y}(\theta^{y}) , giving approximations for the continuation value at time t_{n} , defined by the last conditional expectation in ( 19 ) \displaystyle\hat{\tilde{Y}}_{n}^{\pi}=\varphi(X_{n}^{\pi}|\widehat{\theta}_{n}^{y}). (30) Finally, combining the approximations of the continuation value \hat{\tilde{Y}}_{n}^{\pi} and its gradient \hat{\tilde{Z}}_{n}^{\pi} with the early exercise decision given by the vectorized expressions in ( 27 ) and ( 26 ) for all j=1,\dots,J , gives the final discrete time approximations for all processes in the pair of backward SDEs in ( 6 ) and ( 15 ) \displaystyle\widehat{Z}_{n}^{\pi}=\mathfrak{R}_{z}(t_{n},X_{n}^{\pi},\hat{\tilde{Y}}_{n}^{\pi},\hat{\tilde{Z}}_{n}^{\pi}),\hskip 9.24994pt\widehat{Y}_{n}^{\pi}=\mathfrak{R}_{y}(t_{n},X_{n}^{\pi},\hat{\tilde{Y}}_{n}^{\pi}). (31) The approximations given by ( 29 ), ( 30 ), ( 31 ) complete the processing of time step t_{n} . The initialization of a stochastic gradient descent optimization has a substantial impact on the speed of convergence and also the final accuracy of the resulting approximations. Argued by continuity in time of the stochastic processes \widetilde{Y},\widetilde{Z} in ( 6 ) and ( 6 ) we therefore initialize the parameter sets of the loss functions \mathcal{L}_{n-1}^{z} and \mathcal{L}_{n-1}^{y} according to the transfer learning trick \displaystyle(\theta^{z},\theta^{\gamma})\leftarrow(\widehat{\theta}_{n}^{z},\widehat{\theta}_{n}^{\gamma}),\hskip 9.24994pt\theta^{y}\leftarrow\widehat{\theta}_{n}^{y},\hskip 18.49988pt\text{ for each }n=N-1,\dots,1. (32) With these initial parameter guesses, all points n=N-2,\dots,0 in time are more efficiently optimized. One then completes the algorithm by carrying out the same procedure in a backward iteration terminating at n=0 . The complete fully-implementable backward deep BSDE algorithm is collected in algorithm 1 . The backward deep BSDE method of Huré et al. [ 18 ] . When only the Deltas are of interest, alternative deep BSDE schemes are applicable in the high-dimensional context, see [ 7 , 18 ] . The RDBDP scheme [ 18 , sec. 3.3] is concerned with the numerical approximation of variational inequalities, which can be considered as a continuous asymptotics for ( 6 ) in the case R\to\infty . Even though, their scheme is only given for a single ( J=1 ) continuously reflected BSDE, in what follows, we naturally extend this to the collection of discretely reflected equations given in ( 7 ). Let us put \varphi(\cdot|\theta^{y}):\mathbb{R}^{d}\to\mathbb{R}^{J} and \psi(\cdot|\theta^{z}):\mathbb{R}^{d}\to\mathbb{R}^{J\times d} for two feedforward, fully-connected neural networks, depending on some potentially non-disjoint parameter sets. In fact, in [ 7 ] , \psi(\cdot|\theta^{z})=\nabla_{x}\varphi(\cdot|\theta^{y})\sigma(t_{n},\cdot) , with \theta^{z}\equiv\theta^{y} . These neural networks are parametrizations of the Markovian conditional expectations of the collection of conditional expectations in ( 9 ) for every j=1,\dots,J in ( 7 ). Using these parametrizations, we define the L^{2} loss function \displaystyle\mathcal{L}_{n}^{\text{Euler}}(\theta^{y},\theta^{z})\coloneqq\begin{aligned} \mathbb{E}\big[|\widehat{Y}_{n+1}^{\pi}-\varphi(X_{n}^{\pi}|\theta^{y})-\Delta t_{n}f(t_{n},X_{n}^{\pi},\varphi(X_{n}^{\pi}|\theta^{y}),\psi(X_{n}^{\pi}|\theta^{z}))+\psi(X_{n}^{\pi}|\theta^{z})\Delta W_{n}|^{2}\big],\end{aligned} (33) which is a function of the total parameter set \Theta\coloneqq(\theta^{y},\theta^{z}) . Herein, we denote the row-wise concatenated solutions of each discretely reflected BSDE as in ( 7 ). As shown in [ 18 , thm. 4.1, 4.4] , a minimizer (\widehat{\theta}^{y},\widehat{\theta}^{z}) of the loss function defined by ( 33 ) provides a simultaneous approximation of the conditional expectations \widetilde{Y}_{n}^{j,\pi} and Z_{n}^{j,\pi} in ( 9 ) given by the following expressions \hat{\tilde{Y}}_{n}^{j,\pi}\approx\varphi^{j}(X_{n}^{\pi}|\theta^{y}),\hskip 9.24994pt\widehat{Z}_{n}^{j,\pi}\approx\psi^{j}(X_{n}^{\pi}|\widehat{\theta}^{z}) , where \varphi^{j},\psi^{j} denote the j ’th row of the output layer of each neural network. In fact, by collecting each discretely reflected BSDE into the system ( 7 ), the loss function ( 33 ) takes a mean-squared loss of all equations in ( 9 ), for every j=1,\dots,J , at the same time. The scheme is made fully-implementable by a similar backward recursion as for the OSM scheme. The main differences between the OSM approximation in algorithm 1 and those of [ 18 , 7 ] is that the One Step Malliavin scheme does not only provide option prices and Deltas, like [ 18 ] , but also second-order Greeks, Gammas, throughout the entire spacetime by the process DZ . This makes the deep BSDE approximations for the OSM scheme suitable for delta-gamma hedging in ( 12 ). Additionally, as shown in [ 24 , 25 ] , the OSM scheme provides more accurate approximations for the Z process in regression Monte Carlo frameworks when the time step size \Delta t_{n} is small or the volatility is high. As we show below – see fig. 5 , 3(b) in particular –, this in fact results in more accurate Deltas, leading to better delta replication with the use of the OSM scheme. 4.2 Delta hedging with OSM Given the deep BSDE approximations in algorithm 1 , one can subsequently solve the delta hedging problem of our investor, which comes down to the discrete time approximation of the hedging weights \alpha in ( 2 ) where t_{n} is in a set of finite rebalancing dates \mathcal{S} . Without loss of generality, we assume that the deep BSDE approximation of the corresponding collection of discretely reflected BSDEs in ( 7 ) is given over a time partition that includes all rebalancing dates, i.e. \mathcal{S}\subseteq\pi(N) . Therefore, combining the first-order condition of the delta hedging weights given by ( 3 ) with the Feynman-Kac formula in ( 5 ), one immediately gathers the following approximations for all option Deltas in the portfolio \displaystyle\widehat{\text{Delta}}^{\pi}_{n}=(\widehat{\text{Delta}}^{1,\pi}_{n},\dots,\widehat{\text{Delta}}_{n}^{J,\pi})=(\widehat{Z}_{n}^{1,\pi}\sigma^{-1}(t_{n},X_{n}^{\pi});\dots;\widehat{Z}_{n}^{J,\pi}\sigma^{-1}(t_{n},X_{n}^{\pi}))=\widehat{Z}_{n}^{\pi}\sigma^{-1}(t_{n},X_{n}^{\pi}), (34) for all t_{n}\in\pi(N) , and in particular in \mathcal{S} . We remark that \widehat{\text{Delta}}_{n}^{\pi}\in\mathbb{R}^{J\times d} as it is the row-wise collection of each contract’s Delta in the portfolio. Plugging this into the first-order condition given by ( 3 ), one subsequently gathers the discrete time approximations of the optimal hedging weights at each rebalancing date t_{n}\in\mathcal{S} \displaystyle\widehat{\alpha}_{n}^{\pi}=\sum_{j=1}^{J}\widehat{\text{Delta}}_{n}^{j,\pi}. (35) Given ( 35 ), on top of the deep BSDE approximations for the option prices in the portfolio \widehat{Y}_{n}^{j,\pi} , the corresponding discretely rebalanced delta hedged replicating portfolio’s value evolves according to the following recursion \displaystyle\widehat{P}_{0}^{\Delta,\pi}=0,\hskip 9.24994pt\widehat{P}_{n}^{\Delta,\pi}=-\sum_{j=1}^{J}\widehat{Y}^{j,\pi}_{n}+\sum_{i=1}^{m}\widehat{\alpha}_{n}^{i,\pi}\big(S_{n}^{i,\pi}+q_{t_{n}}^{i}S_{n}^{i,\pi}\Delta t_{n}\big)+B_{n}^{\pi},\hskip 9.24994pt \displaystyle\text{for }n=0,\dots,N, (36) \displaystyle B_{0}^{\Delta,\pi}=0,\hskip 18.49988ptB_{n}^{\pi}=e^{r\Delta t_{n}}B_{n-1}^{\pi}-\sum_{i=1}^{m}S_{n}^{i,\pi}(\widehat{\alpha}_{n}^{i,\pi}-\widehat{\alpha}_{n-1}^{i,\pi}), \displaystyle\text{for }n=1,\dots,N. (37) Notice that all necessary ingredients for the discrete time rebalancing of the hedging portfolio are included in the OSM approximations of the discretely reflected BSDE ( 6 ), i.e. option prices and Deltas. 4.3 Delta-gamma hedging with OSM The main motivation behind the One Step Malliavin scheme simultaneously solving the BSDEs ( 6 ) and ( 15 ), is that through the numerical resolution of the latter, it includes a \Gamma process which corresponds to second-order Greeks of the associated option prices. In particular, by modeling all options in the portfolio by the One Step Malliavin scheme performed on the row-wise concatenated collection of reflected BSDEs ( 7 ), one simultaneously has approximations of all options’ prices, Deltas and Gammas through \widehat{Y}_{n}^{\pi},\widehat{Z}_{n}^{\pi} and \widehat{\Gamma}_{n}^{\pi} , respectively, with the latter being recovered from the Markovian approximations \Gamma_{n}^{j,\pi}=\gamma^{j,\pi}_{n}(X_{n}^{\pi}) . Through a discrete time expression analogous to ( 17 ), we find \displaystyle\widehat{\text{Gamma}}_{n}^{j,\pi}=(\sigma^{T}(t_{n},X_{n}^{\pi}))^{-1}\left(\widehat{\Gamma}_{n}^{j,\pi}-\widehat{\text{Delta}}^{j,\pi}_{n}\nabla\sigma(t_{n},X_{n}^{\pi})\right), (38) where the approximations \widehat{\text{Delta}}^{j,\pi}_{n} are recovered identically to ( 34 ). Equation ( 38 ) provides discrete time approximations for the right-hand side of the linear system established by the second-order conditions of delta-gamma hedging in ( 12a ). Given a set of Gamma hedging instruments whose Gammas are also available in (semi-)closed form, this makes the discrete time approximation of all terms in the delta-gamma hedging portfolio ( 11 ) possible, after solving the following \absolutevalue{\mathcal{I}}\times K sized linear system \displaystyle\sum_{k=1}^{K}\widehat{\beta}_{n}^{k,\pi}\partial_{li}^{2}u^{k}(t,X_{t}) \displaystyle=\sum_{j=1}^{J}(\widehat{\text{Gamma}}_{n}^{j,\pi})^{li}, \displaystyle il\in\mathcal{I}, (39a) \displaystyle\widetilde{\alpha}^{\pi}_{n} \displaystyle=\sum_{j=1}^{J}\widehat{\text{Delta}}^{j,\pi}_{n}-\sum_{k=1}^{K}\widetilde{\beta}_{t}^{k}\nabla u^{k}(t,X_{t}), \displaystyle 1\leq i\leq d. (39b) Given the deep BSDE approximations of the whole Gamma matrix, the linear system imposed by ( 39 ) has a solution pair \widehat{\beta}_{n}^{\pi},\widehat{\alpha}_{n}^{\pi}\in\mathbb{R}^{K}\times\mathbb{R}^{m} , which solve the discrete time version of the first- and second-order conditions of delta-gamma hedging in ( 12 ). Consequently, after having solved the associated collection of discretely reflected FBSDEs by the OSM scheme, the investor’s task at a rebalancing date is to compute the right-hand sides of ( 39 ), which can easily be done by evaluating the corresponding neural networks \varphi,\psi,\chi at a given realization of the Brownian motion. Subsequently, the investor needs to buy and sell the tradeable risk factors, and the corresponding gamma-hedging securities according to the differences in the hedging weights between two rebalancing dates. The discretely rebalanced, deep BSDE approximated delta-gamma hedging portfolio evolves according to the following discrete time recursion \displaystyle\widehat{P}_{n}^{\Gamma,\pi} \displaystyle=-\sum_{j=0}^{J}\widehat{Y}^{j,\pi}_{n}+\sum_{i=1}^{m}\widehat{\alpha}_{n}^{i,\pi}\big(S_{n}^{i,\pi}+q_{t_{n}}^{i}S_{n}^{i,\pi}\Delta t_{n}\big)+\sum_{k=1}^{K}\widehat{\beta}^{k,\pi}_{n}u^{k}(t_{n},X_{n}^{\pi})+B_{n}^{\pi}, \displaystyle\text{for }n=0,\dots,N, (40) \displaystyle B_{n}^{\pi} \displaystyle=e^{r\Delta t_{n}}B_{n-1}^{\pi}-\sum_{i=1}^{m}S_{n}^{i,\pi}(\widehat{\alpha}_{n}^{i,\pi}-\widehat{\alpha}_{n-1}^{i,\pi})-\sum_{k=1}^{K}(\widehat{\beta}^{k,\pi}_{n}-\widehat{\beta}_{n-1}^{k,\pi})u^{k}(t_{n},X_{n}^{\pi}), \displaystyle\text{for }n=1,\dots,N, (41) with B_{n}^{\pi}=0 . Unlike in the delta case, the replicating portfolio is rebalanced not just by buying and selling the tradeable risk factors S^{i} according to the approximated hedging weights \widehat{\alpha}_{n}^{i,\pi} but also by trading each Gamma hedging instruments according to the difference \widehat{\beta}_{n}^{k,\pi}-\widehat{\beta}_{n-1}^{k,\pi} . The complete algorithm is collected in algorithm 2 . Alternative approaches to Gamma hedging. Given a differentiable function approximation of the associated option prices, one could in principle use automatic differentiation to approximate the corresponding Deltas and Gammas in a discrete time framework. For instance, using the deep backward dynamic programming approach of Huré et al. in [ 18 ] , one has a differentiable approximation of Z in ( 6 ) in the form of the vector-valued function \psi(\cdot|\widehat{\theta}^{z}) . Computing the Jacobian matrix by means of automatic differentiation yields an approximation of the "derivative Z process" , which is analogous to \Gamma in ( 15 ) – see also ( 16 ). Thereafter, plugging \nabla_{x}\psi(\cdot|\widehat{\theta}^{z}) in the place of \Gamma in the formulae ( 17 ), one could obtain a comparable numerical representation of the right-hand side of ( 12a ). We remark that a similar approach is taken in [ 7 ] , where motivated by the Feynman-Kac formula the authors approximate the Z by automatic differentiation on the parametrization of the approximation of the option prices, i.e. \psi=\nabla_{x}\varphi . The problem regarding the automatic differentiation approximations outlined above is two-fold. First, as the Jacobian matrix of \psi does not form part of the loss function in ( 33 ), there is no guarantee that \nabla\psi is an accurate approximation of \nabla_{x}Z – even when \psi approximates Z arbitrarily well. In order to ensure for this to be the case, one would have to augment the loss function in order to account for this, which would result in a similar representation formula as ( 15 ) in the OSM scheme. Regardless of the lack of theoretical guarantees, one can carry out the corresponding automatic differentations and check if the corresponding results yield meaningful Gammas. We found that this in fact is not the case, rendering \nabla_{x}\psi(\cdot|\widehat{\theta}^{z}) inapplicable in the context of delta-gamma hedging. According to our findings, this is already case for low-dimensional problems, and the accuracy of the automatic differentiated Gammas further decreases as d grows. In particular, we refer to figure 3 in [ 24 ] , and figure 3(b) in our upcoming numerical experiments, which both demonstrate this phenomenon. Algorithm 2 Delta-gamma hedging on the portfolio level 1: Deep BSDE approximations of ( 7 ) and ( 15 ) for each j=1,\dots,J \triangleright OSM in algorithm 1 2: \{W_{t_{n}}\}_{0\leq n\leq N} 3: P_{0}^{\Gamma,\pi}\leftarrow 0 4: for n=0,\dots,N-1 do 5: (X_{n}^{\pi},\hat{\tilde{Y}}{}_{n}^{\pi},\hat{\tilde{Z}}{}_{n}^{\pi}) \triangleright deep BSDE approximations 6: compute \widehat{\beta}_{n}^{\pi,k},k=1,\dots,K \triangleright solution to linear system in ( 39a ) 7: compute \widehat{\alpha}_{n}^{\pi} \triangleright via ( 39b ) 8: if n=0 then 9: B_{n}^{\pi}\leftarrow\widehat{Y}_{n}^{j,\pi}-\sum_{i=1}^{m}\widehat{\alpha}_{n}^{\pi,i}S_{n}^{\pi,i}-\sum_{k=1}^{K}\widehat{\beta}_{n}^{k,\pi}u^{k}(t_{n},X_{n}^{\pi}) 10: else 11: update bank account B_{n}^{\pi} \triangleright rebalancing with ( 41 ) 12: end if 13: update portfolio value P_{n+1}^{\Delta,\pi} \triangleright according to ( 40 ) 14: end for 15: \text{PnL}^{\Delta}\leftarrow e^{-rT}P_{N}^{\Delta,\pi}/(\sum_{j=1}^{J}\widehat{Y}_{0}^{j,\pi}) \triangleright compute PnL in ( 13 ) 4.4 About the linear system of second-order constraints The optimal weights with which one has to hold the Gamma hedging instruments u^{k},k=1,\dots,K in ( 11 ) is determined by the solution of the linear system in ( 12a ). The main driver of the computational complexity of gamma hedging stems from the numerical solution of this linear system, which depends not only on the number of gamma hedging instruments K contained in the replicating portfolio, but also on the type of contracts used as hedging instruments. In fact, the linear system in ( 12a ) is a \absolutevalue{\mathcal{I}}\times K sized rectangular system. In the special case when one chooses to offset all upper triangular elements in the Gamma matrix, assigning a single gamma hedging instrument to each gamma and cross-gamma, this results in a system of size (m(m+1)/2)\times(m(m+1)/2) , depending on the number of tradable risk factors. The memory requirements of storing the coefficient matrix of one instance of such a linear system would thus scale \mathcal{O}(m^{4}) , and a naive direct solution of such a linear system would require \mathcal{O}(m^{6}) floating point operations, depending on the number of spatial dimensions. These scaling factors grow substantially in case of large number of risk factors, especially compared to the simple matrix-vector multiplication determining the delta hedging weights in ( 35 ). Nonetheless, one can choose gamma hedging instruments which preserve a special structure of the coefficient matrix in ( 12a ). In fact, in the upcoming numerical experiments for each higher dimensional problem we choose the gamma hedging instruments to be European exchange options. Henceforth, given by the Margrabe formula [ 23 ] , these options admit an analytical closed-form expression not only for the prices, but also for all Greeks up to second order in the Black-Scholes framework – see appendix B . Consequently, the coefficient matrix in ( 12a ) is computed analytically for each Brownian path. Moreover, the second order derivatives \partial_{ij}^{2}u^{k} determine the shape of the coefficient matrix multiplying \beta^{k},k=1,\dots,K . The choice of exchange options implies that each row (or column) of the coefficient matrix in ( 12 ) only includes at most 3 non-zero elements, leading to a sparse linear system which can efficiently be solved by sparse numerical linear algebra methods. In what follows we use the sparse least squares method developed by [ 27 ] . 1 1 1 In particular, the scipy implementation, see documentation . As solving such a large linear system, for a cloud of Monte Carlo simulations – in order to be able to assess the distribution of the corresponding PnL distribution – is computationally expensive, this provides a substantial computational improvement for the delta-gamma hedging strategy in algorithm 2 . Replication errors and computational complexity. The main source of computational complexity of delta-gamma hedging is the deep BSDE optimization of the OSM scheme in algorithm 1 . Nevertheless, we remark that once the replicating portfolio is constructed and the corresponding options are fixed, this step only needs to be done once. It can be done offline, and the resulting discrete time approximations can be used throughout the whole spacetime. With respect to the convergence of the discrete time approximations we refer to [ 18 , 24 ] where it is shown that the deep BSDE approximations converge to the continuous solution triple of the BSDEs with an L^{2} rate of \mathcal{O}(\absolutevalue{\pi}^{1/2}) . These results can be generalized to the vector-valued setting corresponding to the collection of BSDEs in ( 7 ) without any substantial difficulty. In case the forward SDE’s solution is given in closed-form, the replication error of the corresponding delta hedging strategy coincides with those of the deep BSDE approximations. Whereas, when the forward diffusion is approximated by, e.g., an Euler-Maruyama discretization the product term in ( 2 ) will hamper the convergence rate by an appropriate application of Young’s inequality. For a theoretical assessment of the convergence rates of the tracking errors induced by delta ( 2 ) and delta-gamma hedging ( 11 ), we refer to [ 13 ] . Therein, the authors show that the convergence rate of the hedging portfolio depends on the fractional regularity of the payoff g – at least in the European options’ context. In particular, with the use of an equidistant time their results imply the convergence of the variance of the PnL distribution with a rate of \mathcal{O}(h^{0.5}) in case of delta-, and a rate of \mathcal{O}(h^{0.75}) for delta-gamma hedging of European put and call options. Consequently, including the second-order Greeks enabled by the One Step Malliavin scheme in the replicating portfolio ( 11 ) does not only improve replication accuracy by a constant, but in special cases may also result in a higher order convergence rate. 5 Numerical experiments In order to demonstrate the accuracy and robustness of the proposed FBSDE based delta-gamma hedging strategies, numerical experiments are presented. In what follows, we formulate a (discretely reflected) FBSDE system corresponding to each portfolio below. Subsequently, each of these systems is discretized using a fine time grid containing N^{\prime}=100 equally sized intervals, and solved by deep BSDE approximations as in algorithm 1 , including approximations for the associated options’ prices, deltas and gammas throughout the entire spacetime. This step is the most time consuming part of our approach, however, it needs to be emphasized that the training of these neural networks only needs to be done once, offline. Thereafter, the resulting approximations for prices, deltas and gammas can be simply evaluated for each rebalancing date in the updates of the hedging strategies ( 34 ) and ( 38 ), which is fast and efficient. We choose a very fine time partition for the numerical resolution of the FBSDE system in order to be able to use sub-points of it for each rebalancing frequency we consider. In order to ease the presentation, for the OSM scheme in alg. 1 , we fix \vartheta_{y}=1/2 and remark, that results are very similar in case of other choices of \vartheta_{y}\in[0,1] . For each experiment presented below we use fully-connected, feedforward neural networks of L=4 hidden layers with 50 neurons in each layer and hyperbolic tangent activations. For the networks at time step n=N-1 , batch normalization is applied in between each pair of layers, whose parameters are thereafter frozen for preceding time-steps n\hat{\tilde{Y}}_{n}^{j,\pi}. (42) for a given path of the Brownian motion. In other words, \tau^{j} denotes the first time the continuation value is reflected in the discretely reflected FBSDE system in ( 6 ). We approximate continuous Profit-and-Loss densities with a Gaussian kernel density estimate on the discrete Monte Carlo sample. 3 3 3 KDE is implemented by seaborn , using a smoothing parameter of 1.8 – see documentation . 5.1 Example 1: two-dimensional stochastic volatility model #1: Vega #2: Gamma #3: Vomma #4: Vonna T 0.3 0.4 0.3 0.25 K 10 10 9 11 R 1 1 1 1 N 60 80 60 60 Table 1: Example 1. Hedging instruments. Our first example is a single Bermudan put option ( J=1 ), issued on a single asset ( m=1 ) whose price is driven by the well-known Heston model. Since multi-dimensional extensions to the Heston model are known to suffer from the phenomenon of vanishing correlations, we restrict our illustration to the case m=1,d=2 , and remark that the OSM scheme would be similarly applicable in the context appropriate higher-dimensional stochastic volatility models, such as the Wishart model – see e.g. [ 8 , 14 ] . Assuming the market price of volatility risk to be \lambda=0 , the coefficients of the discretely reflected FBSDE system read as follows \displaystyle\begin{split}\mu(t,x=(s;\nu))&=\left(\bar{\mu}s;\kappa(\bar{\nu}-\nu)\right),\hskip 18.49988pt\sigma(t,x=(s;\nu))=\begin{pmatrix}\rho\sqrt{\nu}s&\sqrt{1-\rho^{2}}\sqrt{\nu}\\ 0&\eta\sqrt{\nu}\end{pmatrix},\\ f(t,x=(s;\nu),y,z)&=-ry-(\bar{\mu}-(r-q))z\sigma^{-1}(t,x)s,\hskip 18.49988ptl(x)\equiv g(x=(s;\nu))=\max\left[K-s,0\right],\end{split} (43) with x\in\mathds{R}^{2} . The two risk factors in ( 1 ) are the asset price S=x^{1} , and its stochastic volatility process \nu=x^{2} . The parameters are chosen according to set A in [ 29 , sec.7] , i.e. \bar{\mu}=r=0.1 , q=0 , \kappa=5,\bar{\nu}=0.16,\rho=0.1 and \eta=0.9 . The Feller condition 2\kappa\bar{\nu}\geq\eta^{2} is satisfied and hence the volatility process does not attain zero. As in [ 29 ] , the initial condition of the forward SDE in ( 1 ) is X_{0}=(S_{0},\nu_{0})=(10;0.0625) , and set the option strike to K=10 . We consider a maturity of T=0.25 and equidistant early exercise dates with R=10 , i.e. \mathcal{R}=\{0,0.025,0.05,\dots,0.25\} . In order to demonstrate the method’s robustness with respect to the approximation of the risk factors, we adopt a modified Euler approximation directly on the asset prices and not on log-prices. The coefficients in ( 43 ) are truncated according to [ 17 , 20 ] , in order to ensure that the discrete time approximations of the volatility process do not go below zero either \displaystyle X_{0}=(x_{0},\nu_{0}),\hskip 18.49988ptX_{n+1}^{\pi}=(S_{n+1}^{\pi},\nu_{n+1}^{\pi})=\absolutevalue{(S_{n}^\pi; \nu_n^\pi) + \mu(t_n, X_n^\pi)\Delta t_n + \sigma(t_n, (S_n^\pi; \abs{\nu_n^\pi}))\Delta W_n}, (44) whereas Malliavin derivative is approximated according to ( 18 ). Given the approximations of the forward diffusion, we solve the discretely reflected BSDE ( 6 ) and ( 15 ) corresponding to ( 43 ) by the OSM scheme in algorithm 1 once, with N^{\prime}=50 equally sized time intervals, which through the relations ( 34 ) and ( 38 ) provide approximations for all first- and second-order Greeks. In particular, due to volatility uncertainty, the OSM scheme provides Delta , Vega , Gamma , Vomma and Vanna approximations. So that we can hedge the uncertain volatility, similar to ( 11 ), we augment the replicating portfolio with 4 additional instruments, that offset Vega, Gamma, Vomma and Vanna exposure, respectively. These instruments are all European put options issued on the same asset, with maturities and strikes as in table 1 . In order to sketch the potential of the OSM scheme outside of the Black-Scholes framework, we use algorithm 1 as reference prices and Greeks for the coefficient matrices in the linear system described by ( 47 ) and ( 48 ). Algorithm 1 is run on each European option’s associated BSDE separately, with an equidistant time grid using N intervals as in table 1 . We consider N=1,2,5,10,25,50 rebalancing dates, for all cases. The impact of volatility uncertainty on the hedging with only first-order constraints in ( 35 ) is illustrated by figure 2(a) . Herein, we find that augmenting the replicating portfolio with an additional Vega hedging instrument, offsetting first-order volatility uncertainty according to ( 47 ) results in a significantly sharper PnL distribution. Nevertheless, as demonstrated by figures 2(b) and 2(c) , the delta-vega replicating portfolio entails substantial risk due to the neglection of second-order sensitivities. Augmenting the replicating portfolio with the additional Gamma, Vomma and Vanna hedging securities, one can further improve the replication of the Bermudan put option at \tau , resulting in sharper profit and loss distributions centered around 0 . As seen in fig. 2(c) , offsetting all second-order sentivities with respect to the underlying risk factors improves \text{VaR}_{95} by 30 percentage points. The impact on the choices of second-order Greeks to be offset, determined by the index set \mathcal{I} in ( 48 ) is depicted in figure 3(a) . Three cases are compared depending on the number of second-order Greeks accounting for (i) Gamma hedging ( \mathcal{I}=\{11\} ); (ii) Gamma-Vomma hedging ( \mathcal{I}=\{11,22\} ); (iii) Gamma-Vomma-Vanna hedging ( \mathcal{I}=\{11,12,22,21\} ). As demonstrated by fig. 3(a) , these gradually result in better replication, as more second-order Greeks are taken into account. Table 2 collects the mean and variance for the aforementioned replication strategies in case of N=25 rebalancing dates. In line with the discussion above, we see that offsetting second-order Greeks not only with respect to the asset price but also for the uncertain volatility considerably improves the replication accuracy across all risk metrics. Finally, as discussed in section 4.1 , let us compare the deep BSDE approximations of all above considered option Greeks provided by the One Step Malliavin scheme in alg. 1 to the RDBDP method of [ 18 ] . The left plot of fig. 3(b) compares the delta-vega hedging strategies where the corresponding right-hand sides of ( 47 ) are computed by the OSM and RDBDP schemes, respectively. As we can see, even in this low-dimensional case the OSM scheme brings a marginal improvement in the replication accuracy, indicating that the corresponding first-order Greeks (Deltas and Vegas) are more accurately approximated by the OSM scheme. More importantly, the right side of 3(b) demonstrates the need for the Malliavin representation formula ( 15 ) and its corresponding discrete time approximation by the OSM scheme in order to accurately capture second-order Greeks. Herein, the second-order hedging corresponding to Gamma-Vomma-Vanna hedging ( 48 ) are compared across the OSM and RDBDP schemes, where, for the latter, the right-hand side of ( 48 ) is computed by automatic differentiation. As we can see, automatic differentiation of [ 18 ] does not provide accurate Gammas, Vommas and Vannas, and is rendered inapplicable in the context of second-order hedging, whereas the OSM approximations bring an improvement in the replication accuracy compared to the first-order conditions. (a) Delta vs. Vega (b) Delta vs. Gamma-Vomma-Vanna (c) Delta-Vega vs. Gamma-Vomma-Vanna Figure 2: Example 1. Comparison of first- and second-order hedging strategies in ( 3 ), ( 47 ) and ( 48 ), respectively. N=50 rebalancing dates. Dashed and dotted vertical lines corresponding to \text{VaR}_{95} and \text{ES}_{99} , respectively. Hedging instruments as in table 1 . PnL approximated through an independent Monte Carlo sample of size 2^{14} . (a) Comparison on the set of second-order Greeks accounted for in ( 48 ) with quarterly rebalancing ( N=2 ). (b) Comparison between the One Step Malliavin scheme (alg. 1 ) and the RDBDP approach of [ 18 ] . First- ( 47 ) and second-order ( 48 ) hedging on the left and right, respectively. Figure 3: Example 1. Dashed and dotted vertical lines corresponding to \text{VaR}_{95} and \text{ES}_{99} , respectively. Hedging instruments as in table 1 . PnL approximated through an independent Monte Carlo sample of size 2^{14} . risk measure \text{PnL}_{\tau}^{\Delta} \text{PnL}_{\tau}^{\Delta,\text{Vega}} \text{PnL}_{\tau}^{\Gamma} \text{PnL}_{\tau}^{\Gamma,\text{Vomma}} \text{PnL}_{\tau}^{\Gamma,\text{Vomma},\text{Vanna}} mean 1.2\text{\times}{10}^{-02} 1.8\text{\times}{10}^{-02} 2.0\text{\times}{10}^{-02} 1.9\text{\times}{10}^{-02} 1.9\text{\times}{10}^{-02} variance 1.5\text{\times}{10}^{-01} 9.0\text{\times}{10}^{-02} 1.0\text{\times}{10}^{-02} 8.5\text{\times}{10}^{-03} 7.6\text{\times}{10}^{-03} Table 2: Example 1. Risk measures for different types of replicating portfolios and N=25 rebalancing dates. 5.2 Example 2: single high-dimensional option The high-dimensional examples are given on d=m assets driven by Black-Scholes dynamics under the physical measure. First, we investigate a single Bermudan geometric call option (J=1) , with varying early exercise rights. The coefficients of the corresponding discretely reflected FBSDE system read as follows 4 4 4 we denote element-wise multiplication by \odot \displaystyle\mu(t,x) \displaystyle=\bar{\mu}\odot x,\hskip 9.24994pt\sigma(t,x)=\text{diag}(\bar{\sigma}\odot x)\Sigma, (45) \displaystyle f(t,x,y,z) \displaystyle=-ry-\big(\frac{\bar{\mu}-(r-q)}{\bar{\sigma}}\big)^{T}z\Sigma^{-1},\hskip 9.24994ptl(x)\equiv g(x)=\max\left[\omega\left(\big(\prod_{i=1}^{d}x^{i}\big)^{1/d}-K\right),0\right], (46) with \omega\in\{-1,1\} for put and call options, respectively. In the above, \bar{\mu},\bar{\sigma},q\in\mathbb{R}^{m} are the drift, volatility and continuous dividend yield parameters of each asset, r is the risk free rate and C=\Sigma^{T}\Sigma is the correlation structure between the assets with \Sigma being its Cholesky decomposition. This example appears often in the literature, see e.g. [ 7 , 18 ] , due to its special property in that the general d -dimensional problem can be reduced to a scalar one – for full details see e.g. [ 25 ] . We set the parameters in ( 45 ) according to [ 7 ] , and consider a fixed T=2,X_{0}=100,r=0.0,q=(0.02,\dots,0.02) , \omega=1 , c_{ij}=0.75,i\neq j . We train a deep BSDE solver once, offline for each parameter setting with N^{\prime}=100 equally sized time intervals according to algorithm 1 and use the resulting approximations to recover option prices, Deltas in ( 34 ) and Gammas according to ( 38 ). We emphasize that the OSM scheme provides all Gammas in the high-dimensional framework, including all cross-gammas , i.e. the Gamma in ( 38 ) takes values in \mathbb{R}^{d\times d} . Due to the high-correlation and similarly to example 5.1 – see fig. 3(a) in particular –, we found that it is not sufficient to remove pure second-order sensitivities with respect to each individual asset (\mathcal{I}=\{ii:1\leq i\leq m\}) , as there is a substantial cross-gamma exposure. Therefore, we choose to hedge the whole upper triangular part of the Hessian matrix in ( 12a ) in case of delta-gamma hedging, i.e. \mathcal{I}=\{ij:1\leq i\leq j\leq d\} . In order to be able to compute the coefficient matrix on the left-hand side of the second-order condition ( 12a ), we augment the delta-gamma hedging portfolio ( 11 ) with K=d(d+1)/2 Gamma hedging instruments, as follows • for the diagonal elements in the Gamma matrix (i=j) we choose standard European put options with the same strike and maturity \widetilde{T}=2T ; • for the cross Gamma indices (i\neq j) we choose European exchange calls with strike K^{ij}=1 and maturity \widetilde{T}=2T . This in particular implies the corresponding hedging instruments’ prices, Delta and Gammas are all available in closed form due to the Margrabe formula [ 23 ] – see appendix B . As discussed in section 4.4 , these choices imply that the linear system corresponding to ( 12 ) has a sparse coefficient matrix, and thus the linear system in ( 39a ) can be stored and solved efficiently for a large number of Monte Carlo simulations. We split the discussion of the example into four key aspects: the impact of moneyness (determined by strike K ), early exercising ( R ), strength of volatility (\bar{\sigma}) and dimensionality (d=m) . OTM/ATM/ITM. We fix a European contract (R=1,\mathcal{R}=\{0,T\}) on d=m=50 assets, each with volatility \bar{\sigma}=(0.25,\dots,0.25) and an initial condition of X_{0}=(100,\dots,100) . We consider in-, at- and out-of-the-money strikes with K=90,100,110 , respectively, to investigate the impact of moneyness on the discrete replication accuracy both in case of delta and delta-gamma hedging. Results are collected in figure 4 and table 3 . We see that Gamma hedging significantly outperforms delta hedging in terms of replication accuracy, irrespective of the moneyness. Across all values of moneyness, we found that a fortnightly rebalanced ( N=10 ) delta-gamma hedging strategy achieves the same replication accuracy as a daily rebalanced (N=100) delta strategy. In particular, we find that once rebalanced at least weekly (N=20) the delta-gamma hedging strategy achieves an expected shortfall of less than -0.4 for each moneyness, whereas delta rebalancing with the same frequency yields a much wider Profit-and-Loss distribution with more profound tail risk. All risk measures are collected in table 3 for fortnightly (N=10) rebalanced portfolios in ( 2 ) and ( 11 ). In line with fig. 4 , we find that the discrete replication becomes more difficult as the option is going out-of-the-money. Nonetheless, even in the OTM case, when the position is delta-gamma hedged with higher than monthly ( N=5 ) frequency, the corresponding replication achieves a \text{VaR}_{95} below -0.5 , which is only attained by daily delta rebalancing. The delta-gamma hedged portfolio using alg. 1 and 2 achieves an order of magnitude higher replication accuracy across all risk measures consistently, regardless of the moneyness, in the high-dimensional setting ( d=m=50 ). (a) K=90 (ITM) (b) K=100 (ATM) (c) K=110 (OTM) Figure 4: Example 2 in ( 45 ). Moneyness comparison with weekly rebalancing ( N=20 ). Example 2. Histograms for delta ( 3 ) and delta-gamma replication ( 12 ). Dotted and dashed vertical lines corresponding to \text{VaR}_{95} and \text{ES}_{99} , respectively. Delta Delta-Gamma K=90 K=100 K=110 K=90 K=100 K=110 mean -8.8\text{\times}{10}^{-03} -7.4\text{\times}{10}^{-03} -2.7\text{\times}{10}^{-02} -7.1\text{\times}{10}^{-03} -1.4\text{\times}{10}^{-02} -4.1\text{\times}{10}^{-03} variance 4.4\text{\times}{10}^{-02} 1.3\text{\times}{10}^{-01} 3.3\text{\times}{10}^{-01} 3.7\text{\times}{10}^{-03} 7.9\text{\times}{10}^{-03} 2.7\text{\times}{10}^{-02} \text{VaR}_{95} -3.7\text{\times}{10}^{-01} -6.3\text{\times}{10}^{-01} -1.1\text{\times}{10}^{+00} -7.7\text{\times}{10}^{-02} -1.2\text{\times}{10}^{-01} -2.0\text{\times}{10}^{-01} \text{ES}_{95} -5.2\text{\times}{10}^{-01} -8.6\text{\times}{10}^{-01} -1.5\text{\times}{10}^{+00} -1.4\text{\times}{10}^{-01} -1.9\text{\times}{10}^{-01} -3.3\text{\times}{10}^{-01} semivariance 2.4\text{\times}{10}^{-02} 6.8\text{\times}{10}^{-02} 2.0\text{\times}{10}^{-01} 1.7\text{\times}{10}^{-03} 2.8\text{\times}{10}^{-03} 1.0\text{\times}{10}^{-02} Table 3: Example 2 in ( 45 ). Comparison of risk measures across moneyness. Fortnightly rebalancing (N=10 ). High volatility (OSM versus Huré et al. [ 18 ] ). Next, we assess the impact of the strength of the volatility parameter \bar{\sigma} in ( 45 ). In order to do so, we fix R=1 , consider an ATM strike of K=100 and vary \bar{\sigma} between 0.25,0.5 and 0.75 across all d=m=50 assets, uniformly. The numerical results are given in figure 5 and table 4 . As indicated by [ 24 , 25 ] , the One Step Malliavin scheme in alg. 1 outperforms the reference methods [ 18 , 7 ] in the approximation accuracy of the Z process in ( 6 ), especially in settings of high-volatility and small time steps. This is demonstrated by figure 5(a) . We find that as the strength of the volatility increases the OSM scheme results in gradually more accurate Delta approximations compared to the reference method [ 18 ] , which results in sharper \text{PnL}^{\Delta} distributions. We found similar results in case of other references, such as [ 7 ] . This effect becomes more profound as \bar{\sigma} increases, indicating that the One Step Malliavin scheme is not only useful in the context of second-order sensitivities, but may also result in higher first-order replication accuracy for highly volatile assets. Nonetheless, as shown by figure 5(b) , one can further improve the delta replication accuracy even by offsetting the corresponding second-order sensitivities in ( 11 ) – even for large \bar{\sigma} . We find that offsetting all option Gammas enabled by the OSM scheme, further improves the replication accuracy resulting in an approximately 30 percentage point improvement in value-at-risk and a sharper PnL distribution around 0 . Unsurprisingly, as the volatility increases, the replication accuracy decreases, and one gains even more by delta-gamma hedging. All risk measures are collected in table 4 , when the corresponding discretely rebalanced portfolios are updated daily. Comparing the delta hedging strategies between deep BSDE approximations provided by the OSM scheme and [ 18 ] , we find that algorithm 1 provides higher accuracy in the Delta approximations when the volatility parameter is high, which results in higher replication accuracy. In particular, using the OSM scheme, one gains roughly 3 times lower variance for the PnL distribution around 0 . Additionally, see \bar{\sigma}=(0.5,\dots,0.5) , offsetting the associated Gammas results in an additional order of magnitude accuracy in the variance of the profit and loss distribution. (a) Comparison between Deltas approximated by the OSM scheme (alg. 1 ) and Huré et al. [ 18 ] . Left weekly (N=20) , right daily ( N=100 ) rebalancing. (b) Comparison of delta ( 3 ) and delta-gamma replication ( 12 ). Left weekly (N=20) , right daily ( N=100 ) rebalancing. Figure 5: Example 2 in ( 45 ). Volatility impact comparison for \bar{\sigma}=(0.75,\dots,0.75) . Dotted and dashed vertical lines corresponding to \text{VaR}_{95} and \text{ES}_{99} , respectively. Huré et al. [ 18 ] OSM (alg. 1 ) Delta Delta Gamma \bar{\sigma}=0.5 \bar{\sigma}=0.75 \bar{\sigma}=0.5 \bar{\sigma}=0.75 \bar{\sigma}=0.5 \bar{\sigma}=0.75 mean -4.1\text{\times}{10}^{-03} -3.7\text{\times}{10}^{-02} -6.4\text{\times}{10}^{-03} -8.0\text{\times}{10}^{-02} -5.2\text{\times}{10}^{-03} -8.0\text{\times}{10}^{-02} variance 2.0\text{\times}{10}^{-02} 1.3\text{\times}{10}^{-01} 1.4\text{\times}{10}^{-02} 3.8\text{\times}{10}^{-02} 1.4\text{\times}{10}^{-03} 2.3\text{\times}{10}^{-02} \text{VaR}_{95} -2.4\text{\times}{10}^{-01} -4.0\text{\times}{10}^{-01} -2.1\text{\times}{10}^{-01} -3.8\text{\times}{10}^{-01} -6.8\text{\times}{10}^{-02} -2.6\text{\times}{10}^{-01} \text{ES}_{95} -3.4\text{\times}{10}^{-01} -7.2\text{\times}{10}^{-01} -3.0\text{\times}{10}^{-01} -6.0\text{\times}{10}^{-01} -9.2\text{\times}{10}^{-02} -5.1\text{\times}{10}^{-01} semivariance 1.1\text{\times}{10}^{-02} 8.5\text{\times}{10}^{-02} 7.9\text{\times}{10}^{-03} 3.8\text{\times}{10}^{-02} 7.7\text{\times}{10}^{-04} 4.4\text{\times}{10}^{-02} Table 4: Example 2 in ( 45 ). Comparison of risk measures across different levels of volatility. Delta hedging with OSM in alg. 1 versus Huré et al. in [ 18 ] . Daily rebalancing (N=100 ). Early exercise rights. Let us investigate the impact of early exercising on the corresponding replication accuracies. We consider ATM (K=100) , Bermudan call options as in ( 45 ), issued on d=m=50 underlyings, each admitting a volatility of 0.25 . In order to assess the early exercise right’s impact on the replication accuracy we vary the equidistant early exercise dates taking values R=5,20,100 , which can be associated with monthly, weekly and daily exercise rights, respectively. We remark that the case R=100 can be thought of as a numerical approximation of the American option limit and can thus be directly compared to the results in [ 7 ] . The numerical experiments are summarized in figure 6 and table 5 . As we can see, the OSM hedging strategies are robust and accurate with respect to the number of early exercise dates of the corresponding Bermudan option for both delta- and delta-gamma hedging. In fact, comparing the densities in fig. 6 , we find that, even though the approximation of the corresponding discretely reflected BSDE becomes more challenging, the resulting delta-gamma hedged PnLs are still sharply distributed around 0 . The scales of the vertical axes show that the replication accuracy goes down as R increases (ceteris paribus), due to the larger number of early exercised paths. Comparing the left and right columns we see that the additional second-order constraints yield a substantial improvement to delta hedging. The delta-gamma hedged portfolio achieves a similar profit and loss distribution with only fortnightly rebalancing ( N=10 ) as that of the delta hedging with daily readjusted hedging weights ( N=100 ). Risk measures for all hedging strategies are collected in table 5 for portfolios rebalanced every fortnight ( N=10 ). The delta-gamma hedging strategies enabled by the OSM approximations in algorithm 1 induce close to an order of magnitude improvement in the variance of the associated profit-and-loss distributions compared to mere delta-hedging, irrespective of early-exercise features, in the high-dimensional option setting with d=m=50 underlyings. (a) monthly early exercise ( R=5 ) (b) weekly early exercise ( R=20 ) (c) daily early exercise ( R=100 ) Figure 6: Example 2 in ( 45 ). Increasing early exercises rights, from Bermudan to American. PnL densities for several rebalancing frequencies. Left: delta hedging 3 , right: delta-gamma hedging ( 12 ). Dotted vertical lines corresponding to \text{VaR}_{95} . Delta Delta-Gamma R=5 R=20 R=100 R=5 R=20 R=100 mean 2.4\text{\times}{10}^{-02} 7.5\text{\times}{10}^{-02} 7.9\text{\times}{10}^{-02} 2.9\text{\times}{10}^{-02} 9.1\text{\times}{10}^{-02} 9.7\text{\times}{10}^{-02} variance 1.3\text{\times}{10}^{-01} 1.3\text{\times}{10}^{-01} 1.2\text{\times}{10}^{-01} 1.5\text{\times}{10}^{-02} 3.5\text{\times}{10}^{-02} 3.2\text{\times}{10}^{-02} \text{VaR}_{95} -6.2\text{\times}{10}^{-01} -5.3\text{\times}{10}^{-01} -5.7\text{\times}{10}^{-01} -1.2\text{\times}{10}^{-01} -9.3\text{\times}{10}^{-02} -7.2\text{\times}{10}^{-02} \text{ES}_{95} -9.0\text{\times}{10}^{-01} -8.6\text{\times}{10}^{-01} -8.3\text{\times}{10}^{-01} -2.1\text{\times}{10}^{-01} -1.9\text{\times}{10}^{-01} -1.8\text{\times}{10}^{-01} semivariance 7.7\text{\times}{10}^{-02} 8.2\text{\times}{10}^{-02} 7.4\text{\times}{10}^{-02} 4.7\text{\times}{10}^{-03} 5.7\text{\times}{10}^{-03} 5.8\text{\times}{10}^{-03} Table 5: Example 2 in ( 45 ). Comparison of risk measures across increasing early exercise rights, from monthly to daily exercising. Fortnightly rebalancing ( N=10 ). Dimensionality. The main motivation behind the deep BSDE approximations for the One Step Malliavin scheme in algorithm 1 is to enable the treatment of high-dimensional basket options, issued on many (correlated) underlyings in ( 45 ). We fix R=100 corresponding to the American option limit, and vary the number of risk factors d=m in ( 45 ) between 1,5,20,100 . Recall that these results can directly be compared to all aforementioned results given on 50 assets. The numerical results are collected in figure 7 and table 6 . In figure 7 , we see that the OSM enabled hedging strategies are robust with respect to the number of underlying assets, and both in case of delta and delta-gamma hedging the shape of the corresponding profit-and-loss distributions are similar across d=5,20,100 . Observing the vertical scales from top to bottom, we see that both in the case of first- and second-order hedging, the peak of the distribution decreases, as the associated replication problem becomes more difficult due to dimensionality. Comparing the left and right columns indicates that including the additional second-order constraints in ( 12 ) brings a substantial improvement to the discrete replication accuracy. The delta-gamma hedged strategy reaches the same replication error with an order of magnitude less frequent rebalancing, as the mere delta hedging portfolio. The results above illustrate that delta-gamma replication enabled by OSM achieves a given risk tolerance with significantly less number of rebalancing dates compared to delta hedging, irrespective of the number of underlying assets. This is further demonstrated by figure 8 , where the convergence of \text{VaR}_{95} is plotted against the number of rebalancing dates. As can be seen, for all considered number of underlying assets, the delta-gamma hedging strategy achieves a risk tolerance level of \text{VaR}_{95}\leq 10\% for all rebalancing frequencies higher than N=10 . On the contrary, the delta hedged portfolio does not reach this accuracy, not even in case of daily rebalancing (N=100) . This implies that the approximation errors in alg. 1 are negligible compared to the time discretization. Moreover, in practical applications, where rebalancing is undesirable due to potential transaction costs, the delta-gamma hedging enabled by the Gamma approximations of OSM may achieve a given risk tolerance more efficiently. We collect all risk measures table 6 for fortnightly ( N=10 ) rebalanced replicating portfolios. For each strategy the risk measures grow as d increases. Nonetheless, both in case of delta and delta-gamma replication, the corresponding risk measures are robust with respect to the number of underlying assets. Across all values of d , the Gamma hedging strategies bring an order of magnitude improvement both in the variance and the tail risk measures of the PnL. These numbers demonstrate that the deep BSDE approximation for the OSM scheme efficiently deal with Bermudan basket options in ( 45 ) issued on a large number of underlyings. We emphasize that the second-order sensitivities in the OSM scheme are given by the matrix-valued \Gamma process in ( 19 ) which takes values in \mathbb{R}^{d\times d} , meaning that in case of d=m=100 the OSM scheme accurately approximates 10^{4} gammas simultaneously. (a) d=5 (b) d=20 (c) d=100 Figure 7: Example 2 in ( 45 ). Comparison on dimensionality, increasing number of underlying assets. PnL densities for several rebalancing frequencies. Left: delta hedging 3 , right: delta-gamma hedging ( 12 ). Dotted vertical lines corresponding to \text{VaR}_{95} . (a) d=1 (b) d=5 (c) d=20 (d) d=100 Figure 8: Example 2 in ( 45 ). Comparison on dimensionality, increasing number of underlying assets. Convergence of \text{VaR}_{95} against the discrete number of rebalancing dates in ( 2 ) and ( 11 ). Delta Delta-Gamma d 1 5 20 100 1 5 20 100 mean 4.1\text{\times}{10}^{-03} 1.7\text{\times}{10}^{-03} 1.5\text{\times}{10}^{-02} 3.0\text{\times}{10}^{-02} 1.4\text{\times}{10}^{-03} 3.9\text{\times}{10}^{-03} 1.7\text{\times}{10}^{-02} 3.2\text{\times}{10}^{-02} variance 1.0\text{\times}{10}^{-02} 1.2\text{\times}{10}^{-02} 1.4\text{\times}{10}^{-02} 1.8\text{\times}{10}^{-02} 2.6\text{\times}{10}^{-04} 3.7\text{\times}{10}^{-04} 1.6\text{\times}{10}^{-03} 5.3\text{\times}{10}^{-03} \text{VaR}_{95} -1.6\text{\times}{10}^{-01} -1.7\text{\times}{10}^{-01} -1.7\text{\times}{10}^{-01} -1.7\text{\times}{10}^{-01} -1.5\text{\times}{10}^{-02} -1.9\text{\times}{10}^{-02} -1.9\text{\times}{10}^{-02} -1.8\text{\times}{10}^{-02} \text{ES}_{95} -2.3\text{\times}{10}^{-01} -2.3\text{\times}{10}^{-01} -2.5\text{\times}{10}^{-01} -2.5\text{\times}{10}^{-01} -2.5\text{\times}{10}^{-02} -3.3\text{\times}{10}^{-02} -2.8\text{\times}{10}^{-02} -3.3\text{\times}{10}^{-02} semivariance 4.7\text{\times}{10}^{-03} 5.0\text{\times}{10}^{-03} 6.4\text{\times}{10}^{-03} 6.2\text{\times}{10}^{-03} 9.9\text{\times}{10}^{-05} 1.4\text{\times}{10}^{-04} 1.7\text{\times}{10}^{-04} 2.3\text{\times}{10}^{-04} Table 6: Example 2 in ( 45 ). Comparison of risk measures across increasing early exercise rights, from monthly to daily exercising. Fortnightly rebalancing ( N=10 ). 5.3 Example 3: portfolio of several derivatives with different early exercise rights In order to demonstrate the accuracy and robustness of the proposed hedging strategies in the context of a portfolio of multiple options, in our last example we investigate a high-dimensional portfolio of derivatives. We take d=m=20 Black-Scholes type underlyings under the physical measure as in ( 45 ) , with parameters \bar{\mu}=(0.2,0.19,\dots,0.01) , \bar{\sigma}=(0.4,0.25,0.2,0.15,0.1,\dots,0.4,0.25,0.2,0.15,0.1) , r=0.04 , q=(0,\dots,0) , X_{0}=(100,\dots,100) and pairwise correlation c_{ij}=0.25,i\neq j . We consider a time horizon of T=1 year, over which J=25 Bermudan derivatives are held. The types of contracts are collected in table 7 . contract payoff j=1 geometric put \max[K_{1}-(\prod_{i=1}^{m}x_{i})^{1/m},0] j=2 arithmetic put on (S_{1},\dots,S_{m/2}) \max[K_{2}-2/m\sum_{i=1}^{m/2}x_{i},0] j=3 call on max (S_{m/2+1},\dots,S_{m}) [\max_{i=m/2+1,\dots,m}{x_{i}}-K_{3}]^{+} j=4 cash or nothing \prod_{i=1}^{m}\mathds{1}_{50\leq x_{i}\leq 150} j=5 put on min [K_{5}-\min_{i=m/2+1,\dots,m}x_{i}]^{+} j=6,\dots,25 call [x_{i}-K_{j}]^{+} Table 7: Example 3. Derivatives in the portfolio. In terms of moneyness and early exercise rights, we distinguish three different versions of the portfolio corresponding to 1. Case 1: all ATM (K_{j}=100,j=1,\dots,J) , European (R_{j}=1,j=1,\dots,J) contracts; 2. Case 2: • varying moneyness: K_{1}=100,K_{2}=120,K_{3}=80,K_{5}=50,K_{j}=150,j=6,\dots,25 , • Bermudan options with uniform, monthly early exercise rights: R_{j}=5,j=1,\dots,J ; 3. Case 3: • varying moneyness: K_{1}=100,K_{2}=120,K_{3}=80,K_{5}=50,K_{j}=150,j=6,\dots,25 , • varying early exercise rights: R_{1}=20,R_{2}=5,R_{3}=2,R_{4}=1,R_{5}=10,R_{6}=R_{7}=5,R_{8}=R_{9}=10,R_{10}=\dots=R_{15}=100,R_{16}=2,R_{17}=\dots=R_{19}=20,R_{20}=\dots=R_{25}=100 . For each choice above the solutions of the collection of discretely reflected BSDEs in ( 7 ) take values in \mathbb{R}^{J} , \mathbb{R}^{J\times d} and \mathbb{R}^{J\times d\times d} for the prices, Deltas and Gammas, respectively. Indeed, the Gamma process approximated by the One Step Malliavin scheme in alg. 2 has 10^{4} elements. As this portfolio consists of multiple contracts, which may be exercised at different points in time, we provide the profit and loss distributions at maturity T , instead of \tau in ( 42 ). This means that in case one of the options in ( 2 ) or ( 11 ) is exercised before T , the corresponding payoff is collected and the weights are computed with the remaining derivatives only. The numerical results are collected in figures 9 , 10 and table 8 . Looking at the approximated PnL densities depicted in fig. 9 , we find that the OSM scheme accurately approximates all Deltas and Gammas for all derivatives in the portfolio simultaneously. The replication is most accurate in the case of European contracts without early exercise features, nevertheless, the approximations remain accurate with varying early exercise rights for each contract separately, and also for different levels of moneyness. Comparing the left and right columns, we find that for all three cases outlined above, the gamma hedging strategy yields a substantial improvement in terms of replication accuracy compared to the standard delta hedging. For both first- and second-order hedging, the PnL distributions are distributed around the origin with a decreasing variance as the number of rebalance dates increases. In particular, consistently throughout all examples the gamma hedged strategies reach the same shape of the PnL distribution with fortnightly rebalancing as the delta hedged positions with daily rebalancing. In terms of tail risk, \text{VaR}_{95} is approximately 50 percentage points better across the delta-gamma hedged portfolios. Similar conclusions can be drawn from the histograms collected in the top row of figure 10 . In line with the earlier results, the delta-gamma hedged OSM portfolios significantly outperform standard delta-hedging even for this portfolio of multiple derivatives. This is accentuated with less frequent rebalancing, where the delta-gamma hedging strategies achieve a much sharper PnL in the discrete time framework. These observations hold across all three cases outlined above, irrespective of the derivatives moneyness and early exercise features. This phenomenon is further demonstrated by the bottom of figure 10 . Herein, the convergence of the 95 percentile value-at-risk against the number of rebalancing dates is collected. We find that \text{VaR}_{95} corresponding to the delta-gamma hedged PnL is consistently an order of magnitude smaller than in case of delta hedging, across all different number of rebalancing dates. In other words, any prespecified risk tolerance level – measured e.g. by value-at-risk – is achieved by the delta-gamma hedging strategy in an order of magnitude less frequent rebalancing. In particular, we find that the multi-dimensional portfolio extension of the OSM scheme yields practically identical conclusions as in case of single options, implying that the corresponding deep BSDE approximations truly excel in case of these high-dimensional equations. Finally, risk measures corresponding to each hedging strategy are collected in table 8 for N=2 , i.e. portfolios rebalanced once every quarter. All risk measures confirm our findings above. In particular, delta-gamma hedging the portfolio of Bermudan derivatives brings an order of magnitude improvement compared to delta hedging in terms of the variance of the profit-and-loss distribution at maturity for all three cases of early exercise features and moneyness. Additionally, we find that offsetting second-order sensitivities in ( 12 ) enabled by the Gamma approximations of the One Step Malliavin scheme, brings a substantial improvement also in terms of tail risk measured both by value-at-risk and expected shortfall. In particular, both for the 95 and 99 percentile tails, the delta-gamma hedged distributions provide a factor of 3 improvement compared to the standard delta strategies. In light of the dimensionality considered in this last example, with a portfolio consisting of J=25 derivative contracts issued on d=m=20 underlyings with varying drift and volatility parameters, we can conclude that the deep BSDE approximations of the OSM scheme provide a robust and accurate approximations for all option Greeks in the portfolio up to second order. (a) Case 1: uniformly European, ATM (b) Case 2: uniform monthly (R=5) early exercise rights, mixed moneyness (c) Case 3: varying early exercise rights, mixed moneyness Figure 9: Example 3. PnL densities for several rebalancing frequencies. Left: delta hedging ( 3 ), right: delta-gamma hedging ( 12 ). Dotted vertical lines corresponding to \text{VaR}_{95} . (a) Case 1 (b) Case 2 (c) Case 3 Figure 10: Example 3. Top: histograms for delta ( 3 ) and delta-gamma replication ( 12 ) with quarterly ( N=2 ) rebalancing. Bottom: convergence of \text{VaR}_{95} with respect to the number of rebalancing dates. Dotted and dashed vertical lines corresponding to \text{VaR}_{95} and \text{ES}_{99} , respectively. Delta Delta-Gamma ATM Bermudan Mixture ATM Bermudan Mixture mean -2.6\text{\times}{10}^{-02} -2.2\text{\times}{10}^{-03} 3.0\text{\times}{10}^{-02} -2.9\text{\times}{10}^{-04} 2.9\text{\times}{10}^{-02} 6.0\text{\times}{10}^{-02} variance 2.7\text{\times}{10}^{-02} 1.2\text{\times}{10}^{-01} 1.1\text{\times}{10}^{-01} 1.3\text{\times}{10}^{-03} 1.8\text{\times}{10}^{-02} 1.7\text{\times}{10}^{-02} \text{VaR}_{95} -3.0\text{\times}{10}^{-01} -6.5\text{\times}{10}^{-01} -5.9\text{\times}{10}^{-01} -5.9\text{\times}{10}^{-02} -1.8\text{\times}{10}^{-01} -1.4\text{\times}{10}^{-01} \text{ES}_{95} -4.5\text{\times}{10}^{-01} -1.0\text{\times}{10}^{+00} -9.3\text{\times}{10}^{-01} -7.2\text{\times}{10}^{-02} -3.1\text{\times}{10}^{-01} -2.6\text{\times}{10}^{-01} semivariance 1.7\text{\times}{10}^{-02} 1.1\text{\times}{10}^{-01} 1.0\text{\times}{10}^{-01} 4.5\text{\times}{10}^{-04} 1.2\text{\times}{10}^{-02} 1.0\text{\times}{10}^{-02} Table 8: Example 3. Convergence of \text{VaR}_{95} against the discrete number of rebalancing dates in ( 2 ) and ( 11 ). 6 Conclusion In this paper we proposed a novel deep BSDE based approach for the simultaneous pricing, delta and delta-gamma hedging of large, high-dimensional portfolios of Bermudan options. First, we gave a vector-valued extension to the One Step Malliavin scheme in [ 24 , 25 ] . This way, we casted the pricing, delta- and delta-gamma hedging of a portfolio of Bermudan options into the framework of a system of discretely reflected BSDEs . Subsequently, we proposed a deep BSDE approach for the accurate numerical solution of this collection of equations, which is robust and efficient when the number of underlying risk factors and/or options is large. In fact, our approach includes not only prices and Deltas but also second-order Greeks, Gammas of all options in the portfolio, simultaneously approximated, throghout the entire spacetime. We demonstrated the performance of our algorithm on several examples, highlighting key features of our technique. Our findings suggest that, the hereby proposed OSM approximations outperform reference methods [ 18 , 7 ] even in the context of delta hedging, when the risk factors are highly volatile. Most importantly, by performing delta-gamma hedging enabled by the Gamma approximations of the OSM scheme, we managed to improve on the discrete replication accuracy compared to standard delta hedging. Our results demonstrate that the algorithm is robust and accurate, for different levels of moneyness, high volatility, and early exercise rights up to the American option limit even in case high dimensional basket options issued on d=100 assets. Appendix A Beyond delta-gamma hedging In principle, our framework is more general than mere delta-gamma hedging, as it allows for the treatment of hedging uncertain volatility. In that case, one needs to complete the market with an extra set of securities that have non-vanishing Vegas , such that volatility risk can be hedged, in a similar fashion to ( 11 ) with first-order constraints only. Hence, an appropriate delta-vega hedging strategy on the portfolio ( 11 ) would therefore yield the following first-order conditions \displaystyle\sum_{k=1}^{K}\beta_{t}^{k}\partial_{l}u^{k}(t,X_{t}) \displaystyle=\sum_{j=1}^{J}\partial_{l}v^{j}(t,X_{t}), \displaystyle l=d-m+1,\dots,d, (47a) \displaystyle\alpha_{t}^{i} \displaystyle=\sum_{j=1}^{J}\partial_{i}v^{j}(t,X_{t})-\sum_{k=1}^{K}\beta_{t}^{k}\partial_{i}u^{k}(t,X_{t}), \displaystyle i=1,\dots,m. (47b) Similar to the previous discussion, ( 47 ) only offsets first-order sensitivities of the portfolio with respect to asset prices and uncertain volatility. In order to mitigate replication errors stemming from the discrete rebalancing, one has the conditions determining the optimal hedging weights by appropriate second-order constraints including second-order sensitivities corresponding to not just asset prices (Gammas) but also to uncertain volatility such as Vommas and Vannas . Therefore, in case such second-order sensitivities are also taken into account in the presence of non-hedgeable risk factors such as stochastic volatility, one can impose the following extra second-order conditions \displaystyle\sum_{k=1}^{K}\beta^{k}_{t}\partial_{il}^{2}u^{k}(t,X_{t})=\sum_{j=1}^{J}\partial_{il}^{2}v^{j}(t,X_{t}),\hskip 9.24994ptil\in\mathcal{I}, (48) with some arbitrarily chosen index set \mathcal{I} . Note that in this case ( 48 ) and ( 47a ) together form a linear system of size (d-m+|\mathcal{I}|)\times K . Natural choices for the index set \mathcal{I} include • \mathcal{I}=\{il:1\leq i=l\leq m\} – diagonal elements of the \Gamma matrix are hedged, corresponding to second order sensitivities of the tradeable assets; • \mathcal{I}=\{il:1\leq i,l\leq m\} – the whole \Gamma matrix is hedged, with cross-gammas included; • \mathcal{I}=\{il:m+1\leq i,l\leq d\} – second-order sensitivities with respect to the uncertain volatility, i.e. Vomma s, including cross-vommas, • \mathcal{I}=\{il:1\leq i,l\leq d\} – all second-order Greeks with respect to each underlying risk factor, e.g. including mixed partial derivatives in asset prices and volatilities Vanna s. We emphasize that the focus above on volatility risk is mere illustration. In fact, the abstract FBSDE framework allows for the treatment of second-order Greeks of all types. For instance, one could consider stochastic interest rates and compute the Vera/rhova as the mixed partial derivative with respect to volatility and interest rate; as long as the corresponding risk factor forms part of the Itô diffusion in ( 1 ). As is made clear by the discrete backward recursion in ( 9 ), the only type of second-order Greeks where one needs to take additional measures is derivatives including time, e.g. Charm . Nonetheless, provided that the time partition used for the discrete time resolution of the discretely reflected FBSDE system associated with the portfolio is fine enough, one can approximate such Greeks by finite difference type approximations. 5 5 5 e.g. \text{Charm}_{n}^{\pi}=-\frac{\alpha_{n}^{\pi}-\alpha_{n-1}^{\pi}}{t_{n}-t_{n-1}} Therefore, the framework built on the One Step Malliavin scheme allows for the hedging of all Greeks up to second order, as long as the corresponding risk factors are incorporated in associated discretely reflected FBSDE. Appendix B Margrabe formula with dividends We have the standard Black-Scholes model ( 45 ) in which all assets follow a geometric Brownian motion \displaystyle\mathrm{d}S_{t}^{i}/S_{t}^{i}=(r-q^{i})\mathrm{d}t+\sigma^{i}\mathrm{d}W_{t}^{i},\hskip 9.24994pt1\leq i\leq d=\prod_{j=1}^{J}d_{j}. (49) The Brownian motions are pairwise correlated with a correlation parameter \varrho^{ij} . The Margrabe formula [ 23 ] then gives an explicit, closed-form analytical expression for the price of a European type contract whose payoff is as follows \displaystyle g(t,S)=[S_{T}^{k}-K^{kj}S_{T}^{j}]^{+}, (50) at some terminal time T , where the parameter K^{kj} is an exchange strike. The price of such a contract then satisfies \displaystyle C^{kj}(t,S)=e^{-q^{k}(T-t)}S_{t}^{k}\Phi(d_{1}^{kj}(t,S))-e^{-q^{j}(T-t)}K^{kj}S_{t}^{j}\Phi(d_{2}^{kj}(t,S)), (51) where \Phi denotes the standard normal cumulative distribution function and \displaystyle d_{1}^{kj}(t,S) \displaystyle=\frac{1}{\sigma^{kj}\sqrt{T-t}}\left(\ln(\frac{S_t^k}{K^{kj}S_t^j})+(q_{j}-q_{k}+(\sigma^{kj})^{2}/2)(T-t)\right), (52) \displaystyle d_{2}^{kj}(t,S) \displaystyle=d_{1}^{kj}(t,S)-\sigma^{kj}\sqrt{T-t}, (53) \displaystyle\sigma^{kj} \displaystyle=\sqrt{(\sigma^{k})^{2}+(\sigma^{j})^{2}-2\varrho^{kj}\sigma^{k}\sigma^{j}}. (54) Straightforward computations lead to the first-order derivatives satisfying \displaystyle\partial_{k}C^{kj}(t,S) \displaystyle=e^{-q^{k}(T-t)}\Phi(d_{1}^{kj}(t,S)),\hskip 9.24994pt\partial_{j}C^{kj}(t,S)=-e^{-q^{j}(T-t)}K^{kj}\Phi(d_{2}^{kj}(t,S)). (55) Further differentiation yields the second-order derivatives \displaystyle\partial_{kk}^{2}C^{kj}(t,S) \displaystyle=\frac{e^{-q^{k}(T-t)}}{\sigma^{kj}\sqrt{T-t}}\frac{\phi(d_{1}^{kj}(t,S))}{S_{t}^{k}},\hskip 9.24994pt \displaystyle\partial_{jk}^{2}C^{kj}(t,S)=-\frac{e^{-q_{k}(T-t)}}{\sigma^{kj}\sqrt{T-t}}\frac{\phi(d_{1}^{kj}(t,S))}{S_{t}^{j}}, (56) \displaystyle\partial_{kj}^{2}C^{kj}(t,S) \displaystyle=-\frac{e^{-q_{j}(T-)}}{\sigma^{kj}\sqrt{T-t}}\frac{K^{kj}\phi(d_{2}^{kj}(t,S))}{S_{k}},\hskip 9.24994pt \displaystyle\partial_{jj}^{2}C^{kj}(t,S)=\frac{e^{-q_{j}(T-t)}}{\sigma^{kj}\sqrt{T-t}}\frac{K^{kj}\phi(d_{2}^{kj}(t,S))}{S_{t}^{j}}, (57) where \phi is the standard normal density. Note that \partial_{jk}^{2}C^{kj}(t,S)\equiv\partial_{kj}^{2}C^{kj}(t,S) .