A semi-static replication approach to efficient hedging and pricing of callable IR derivatives

We present a semi-static hedging algorithm for callable interest rate derivatives under an affine, multi-factor term-structure model. With a traditional dynamic hedge, the replication portfolio needs to be updated continuously through time as the market moves. In contrast, we propose a semi-static hedge that needs rebalancing on just a finite number of instances. We show, taking as an example Bermudan swaptions, that callable interest rate derivatives can be replicated with an options portfolio written on a basket of discount bonds. The static portfolio composition is obtained by regressing the target option's value using an interpretable, artificial neural network. Leveraging on the approximation power of neural networks, we prove that the hedging error can be arbitrarily small for a sufficiently large replication portfolio. A direct, a lower bound, and an upper bound estimator for the risk-neutral Bermudan swaption price is inferred from the hedging algorithm. Additionally, closed-form error margins to the price statistics are determined. We practically demonstrate the hedging and pricing performance through several numerical experiments.


Introduction.
To date, the valuation of path-dependent derivatives, such as Bermudanor American-style options, remains a challenge due to the absence of analytical pricing formulas. This challenge has become particularly pronounced since the implementation of the Basel accords, by which the computation of risk-measures such as value-at-risk, expected shortfall and various value-adjustments has become a central requirement for many financial institutions [27]. As these measures are typically simulation-based quantities, the search for efficient and accurate pricing techniques is as relevant as ever. For callable derivative contracts, practitioners resort to numerical approximation schemes, of which many have been proposed in the literature. Traditional examples include tree-based methods, such as [17], [6], [10], and PDE-based methods, such as [8], [41], [28].
If the risk factors that drive the product-value are high-dimensional, the traditional methods are no longer feasible. Within such multi-factor frameworks, Monte Carlo methods tend to be a popular alternative. Classic regression-based algorithms have been proposed by [14], [46], and [40]. Using the iterative dynamic programming formulation of path-dependent options, they approximate the continuation values at each exercise opportunity with ordinary least-square regression. Their method gives rise to an exercise policy that yields a lower bound to the true price. Upper bounds can be generated by considering a dual-formulation of the risk-neutral value, as is proposed by [31], and [44]. The estimation of these bounds, however, relies on expensive nested simulations [2]. Regression with systems of basis functions other than polynomials have been studied in [38], alongside their rate of convergence and estimation for the corresponding regression error. Although classic regression-based schemes may be accurate for computing today's option price, they can be less precise in generating forward values along the Monte Carlo paths, which is addressed by for example [35].
Apart from pricing, hedging is a challenging aspect of trading path-dependent derivatives. The traditional dynamic hedge is achieved by constructing a replicating portfolio that is rebalanced continuously through time as the market moves. In contrast, a static hedge is a portfolio of assets that mirrors the value of a contract without the need of updating the portfolio-composition. The weights of the portfolio are so to speak static. Such a hedge can be favoured over a dynamical strategy for several reasons. Frequently updating a portfolio can be expensive if the transaction costs for the individual assets are high. Another reason is that dynamic hedges can suffer from severe hedging errors in case of sudden market movements as a consequence of discrete rebalancing.
A static hedge formulation for exotic equity options has been proposed in the literature by for example [7], [11], [12] and [13]. The main concept is to construct an infinite portfolio of short-dated European options with a continuum of different strike-prices. A different, but comparable approach is proposed in [19]. Here a portfolio of European options with a continuum of different maturities is constructed to replicate the boundary and terminal conditions of exotic derivatives, such as knock-out options. Static replication of an Americanstyle option is challenging as it involves a time-dependent exercise boundary, giving rise to a free boundary problem. In [16], this problem is addressed by combining European options with multiple strikes and maturities, and in [39] a semi-static hedge is constructed using neural network approximations.
Little attention has been given to this topic in the field of interest rate (IR) modelling. Where equity options depend on the realization of a stock, IR derivatives depend on the realization of a full term-structure of interest rates, pushing the complexity of the hedging problem. The articles of [43] and [29] are among the few contributions to the literature, treating static replication of guaranteed annuity options, and CMS swaps, caps and floors respectively with a portfolio of European swaptions. In our work we extend the literature by addressing the replication and pricing problem of path-dependent IR derivatives.
We focus on the replication of Bermudan swaptions under an affine term-structure shortrate model. First, we show that such a contract can be semi-statically hedged by a portfolio of short-maturity IR options, such as discount bond options. While a static hedge is never updated and a dynamic hedge requires continuous updating, our semi-static hedge is updated on a finite number of instances, i.e. at each monitor date of the contract. After rebalancing, the replication portfolio mirrors the contract's value until the next monitor date, after which it terminates. Its pay-off will be similar to that of the contract if it is exercised or will absorb the costs to set up a new hedge in case it is continued. In particular, we show that under a one-factor model, an options portfolio written on a single discount bond suffices to achieve an accurate hedge. Under a d-dimensional multi-factor model, we propose that options written on a basket of discount bonds representing d maturities are required to account for the yield curve's temporal complexity.
Secondly, we prove that with a sufficiently large hedge portfolio, any desired level of accuracy in replication can be achieved. We do so by reformulating the optimization related to the hedging problem as a fitting procedure of a shallow, artificial neural network (ANN). This allows us to utilize the tremendous developments that have recently been achieved in machine learning, which has spiked in popularity amongst both researchers and practitioners over the past decade. An often raised drawback to ANN applications in quantitative finance is the lack of interpretability and their "black-box" nature. However, in our approach, the ANN's structure is chosen deliberately to represent the pay-off of a standard derivative portfolio. Training the free parameters can therefore be interpreted as searching the weights and strikes of this portfolio. Additionally, we suggest specific ANN designs allowing the portfolio to be priced analytically. An essential result is that, not only the time-zero, but any future value approximation of the contract can be obtained in closed-form by simply pricing this portfolio.
Our contribution to the existing literature is threefold. First, we propose semi-static hedging strategies for Bermudan swaptions under a multi-factor short-rate model. In the onefactor case, we argue that replication can be achieved with an options portfolio written on a single discount bond. In the d-dimensional case, replication can be achieved with an options portfolio written on a basket of discount bonds. Second, we propose a direct estimator, a lower and an upper bound estimate to the contract's value, which is implied by the semistatic hedge. The lower bound value results from applying a non-optimal exercise strategy on an independent set of Monte Carlo paths. The upper bound is based on the dual formulation of [31] and [44], which in contrast to other work can be obtained without resorting to expensive nested simulations. Thirdly, we prove that any desired level of accuracy can be achieved in the hedge and valuation, due to the approximating power of interpretable ANNs. We provide clear, analytic error margins to the price estimates and the related lower and upper bounds. All the mentioned statistics are illustrated and benchmarked in representative numerical examples.
The paper is organised as follows: Section 2 introduces the mathematical setting, describes the modelling framework and provides the problem formulation. Section 3 provides a thorough introduction to the algorithm, motivates the use and interpretation of neural networks and treats the regression procedure. Section 4 introduces the lower bound and upper bound estimates to the true option price. In section 5 we introduce the error bounds on the direct, lower bound and upper bound estimates brought forth by the algorithm. We finalize the paper by illustrating the method through several numerical examples in section 6 and providing a conclusion in section 7.
2. Mathematical background. In this section we describe the general framework for our computations and give a detailed introduction to the Bermudan swaption pricing problem.

Model formulation.
We fix a finite time-horizon T > 0 and consider a stochastic economy defined on the time-interval [0, T ]. Let (Ω, F, P) denote a complete probability space with F a sigma-algebra on Ω. We denote by F = {F t : 0 ≤ t ≤ T } an augmented filtration on Ω such that F T := F, representing the information generated by the economy up to time t. We assume that the market is complete and free of arbitrage. Following the work of [30] we denote by Q the risk-neutral measure equivalent to P, to which the unique no-arbitrage price of any attainable contingent claim is associated. As the numéraire related to Q we consider the bank account B defined as where the stochastic process r(t) denotes the risk-free instantaneous short-rate. By letting B(0) = 1, B(t) represents the time-t value of one unit of currency invested in the money-market at time zero. Following the notation of [9], we denote by P (T 1 , T 2 ) the time-T 1 risk-neutral value of a zero-coupon bond maturing at date T 2 , which is given by We assume that the dynamics of the short-rate r are captured by an affine term-structure model, in accordance with the set-up introduced in [20] and [18]. The short-rate itself is therefore considered to be an affine function of a -possibly multi-dimensional -latent factor x t , i.e.
with ω 1 , ω 2 denoting a scalar and a vector of time-dependent coefficients respectively. We furthermore assume that the stochastic process {x t } t∈[0,T ] is a bounded Markov process that takes values in R d , which represents all market influences affecting the state of the short-rate. Let the dynamics of x t be governed by an SDE of the form are taken to satisfy the standard regularity conditions by which the SDE in 2.2 admits a strong solution. In this article we will limit ourselves to the subclass of affine, Gaussian term-structure models. We do so by imposing that the instantaneous drift µ is an affine function of the latent factors x t and that the diffusion is a deterministic function of time. As a result, x t yields a Gaussian process and the zero-coupon bond prices have a closed-form expression of the form where the deterministic coefficients A(T 1 , T 2 ) ∈ R and B(T 1 , T 2 ) ∈ R d can be found by solving a system of ODEs, which are of the form of the well-known Ricatti equations; see [20] or [22] for details. We focus on this subclass as it is still rich enough for many risk-related applications, but on the other hand is analytically very tractable. Not only does it yield an explicit expression for the discount bond, but also for European options on discount bonds (see [9]). This will prove to be a convenient property for the techniques introduced in the subsequent sections.
2.2. The Bermudan swaption pricing problem. We consider the pricing problem of a Bermudan swaption. A Bermudan swaption is a contract that gives the holder the right to enter a swap with fixed maturity at a number of predefined monitor dates. Should the holder at any of the monitor dates decide to exercise the option, the holder immediately enters the underlying swap. The lifetime of this swap is assumed to be equal to the time between the exercise date and a fixed maturity date T M .
As an underlying we take a standard interest rate swap that exchanges fixed versus floating cashflows. For simplicity we will assume that the contract is priced in a single-curve framework and that cashflow schemes of both legs coincide, yielding fixing dates T f = {T 0 , . . . , T M −1 } and payment dates T p = {T 1 , . . . , T M }. However, we stress that the algorithm is applicable to any industry standard contract specifications and is not limited to the simplifying assumptions that are made here. The time-fraction between two consecutive dates is denoted as ∆T m = T m − T m−1 . Let N be the notional and K the fixed rate of the swap. Assuming the holder of the option exercises at T m , the payments of the swap will occur at T m+1 , . . . , T M .
We consider the class of pricing problems, where the value of the contract is completely determined by the Markov process {x t } t∈[0,T ] in R d as defined in section 2. Let h m : R d → R be the F Tm -measurable function denoting the immediate pay-off of the option if exercised at time T m . Although the methodology holds for any generalization of the functions h m , we will consider those in accordance with the contract specifications described above. This means that the functions h m are assumed to be given by where the indicator δ = 1 infers a payer and δ = −1 infers a receiver swaption. The swap rate S m,M and the annuity A m,M are defined in the same fashion as [9], given by the expressions where the function F denotes the simply compounded forward rate given by the expression for any j ∈ {1, . . . , M }. For details we refer to [9]. Now let T denote the set of all discrete stopping times with respect to the filtration F, taking values on the grid T f ∪ {∞}. Define the function h τ as In this notation, τ (ω) = ∞ indicates that the option is not exercised at all. We aim to approximate the time-zero value of the Bermudan swaption, which satisfies the following equation Finding the optimal exercise strategy τ is typically a non-trivial exercise. Numerical approximations for V (0) can however be computed by considering a dynamical programming formulation as given below, which is shown to be equivalent to 2.4 in for example [24]. Let t ∈ (T m , T m+1 ] for some m ∈ {0, . . . , M − 2} and denote by V (t) the value of the option, conditioned on the fact that it is not yet exercised prior to t. This value satisfies the equation (see [24]) We refer to the random variables C m (t) := B(t)E Q V (T m+1 ) B(T m+1 ) F t as the hold or continuation values. It represents the expected value of the contract if it is not being exercised up until t, but continues to follow the optimal policy thereafter. Approximations of the dynamic formulation are typically obtained by a backward iteration based on simulations of the underlying riskfactors. Objective is then to determine the continuation values as a function of the state of the risk-factor x t . Popular numerical schemes based on regression have been introduced in for example [14] and [40].
Based on approximations of the continuation values, the optimal policy τ can be computed as follows. Assume that for a given scenario ω ∈ Ω, the risk-factor takes the values Then the holder should continue to hold the option if C m (T m ) > h m (x m ) and exercise as soon as C m (T m ) ≤ h m (x m ). In other words, the exercise strategy can be determined as Should for some scenario the continuation value be bigger than the immediate pay-off for each monitor date, then τ (ω) = ∞ and the option expires worthless.

3.
A semi-static hedge for Bermudan swaptions. The main concept of the method that we propose is to construct static hedge portfolios that replicate the dynamical formulation in 2.5 between two consecutive monitor dates. In this section we introduce the algorithm for a Bermudan swaption that is priced under a multi-factor affine term-structure model. The methodology utilizes a regress-later technique in which the intermediate option values are regressed against simple IR assets, such as discount bonds. The regression model is chosen deliberately to represent the pay-off of an options portfolio written on these assets. An important consequence is that the hedge can be valued in closed-form. For an introduction to regress-later approaches, we refer to [25].
3.1. The algorithm. The regress-later algorithm is executed in an iterative manner, backward in time. The outcome is a set of option portfolios {Π M −1 , . . . , Π 0 } written on pre-selected IR assets. To be more precise, the algorithm determines the weights and strikes of each portfolio Π m , such that it closely mirrors the Bermudan swaption after its composition at T m−1 until its expiry at T m . The pay-off of Π m exactly meets the cost of composing the next portfolio Π m+1 or the Bermudan's pay-off in case it is exercised. The methodology yields a semi-static hedging strategy as the portfolio compositions are constant between two consecutive moni-tor dates. Hence there is no need for continuous rebalancing, as is the case for a dynamic hedging strategy. The algorithm can roughly be divided into three steps, presented below. Algorithm 3.1 summarizes the method.
Sample the independent variables. We start by sampling N realizations of the risk-factor x t on the time grid T = {T 0 , . . . , T M −1 }. These realizations will serve as an input for the regression data. We will denote the data points asx := x n T 0 , . . . , x n . Different sample methodologies could be used, such as: • Take a standard quadrature grid for each monitor date T m , associated with the transition density of the risk-factor. For example, if x t has Gaussian dynamics one could consider the Gauss-Hermite quadrature scaled and shifted in accordance with the mean and variance of x t . See for example [47]. • Discretize the SDE of the risk-factor and sample by the means of an Euler or Milstein scheme. Make sure that sufficiently coarse time-stepping grid is used, which includes the M monitor dates. See for example [37] for details. Secondly we select an asset that will serve as the independent variable for the regression. We will denote this asset as z m (t). The choice for z m can be arbitrary, as long as it meets the following conditions: • The asset z m (T m ) should be a square integrable random variable that is F Tm measurable, taking values in R d . • The risk-neutral price of z m (t) should be only dependent on the current state of the risk-factor and be almost surely unique. That is, the mapping x Tm → z m |x Tm should be continuous and injective. This is required to guarantee a well-defined parametrization of the option-value. Examples for z m would be a zero-coupon bond, a forward Libor rate or a forward swap rate. For each sampled realization of the risk-factor, the corresponding realization of the asset value will be computed and denoted asẑ := z n 0 , . . . , z n M −1 N n=1 . This will serve as the regression data in the following step.
Regress the option value against an IR asset. In this phase we compose replication portfolios Π 0 , . . . , Π M −1 , by fitting M regression functions G 0 , . . . , G M −1 . We consider functions of the form G m : R d → R, which assign values in R to each realization of the selected asset z m . Fitting is done recursively, starting at T M −1 , moving backwards in time, until the first exercise opportunity T 0 . Approximations of the Bermudan swaption value at each monitor date serve as dependent variable. At the final monitor date, the value of the contract (given it has not been exercised) is known to be Now assume that for some monitor date T m we have an approximation of the contract valuẽ V T m ; x n Tm ≈ V T m ; x n Tm . Let ξ m ∈ R p for some p ∈ N denote the vector of the unknown regression parameters. The objective is to determine ξ m such that with the smallest possible error. This is done by formulating and solving a related optimization problem. In this case we choose to minimize the expected square error, given by There is no exact analytical expression available for the expectation of 3.1. However, it can be approximated using the sampled regression data, giving rise to an empirical loss function L given by The weight-functionw is implied by the risk-factor sampling method of choice. Ifx is sampled through Monte Carlo, the weights are constantw(x) = 1 N . Ifx is sampled as a standard quadrature, the functionw denotes the related quadrature weights, see [47]. The parameters ξ m are then the result of the fitting procedure, such that If the regression model is chosen accordingly, G m (z m ) represents the pay-off at T m of a derivative portfolio Π m written on the selected asset z m . Details on suggested functional forms of G m , asset selection for z m and fitting procedures are subject of subsection 3.2.
Compute the continuation value. Once the regression is completed, the last step is to compute the continuation value and subsequently the option value at the monitor date preceding to T m . For each scenario n = 1, . . . , N we approximate the continuation value as As G m is chosen to represent the pay-off of a derivative portfolio Π m written on z m , we argue that computing C m−1 is in fact equivalent to the risk-neutral pricing of Π m . In other words we haveC In subsection 3.2 we treat examples for which Π m can be computed in closed-form. Finally the option value at the preceding monitor date T m−1 is given bỹ The steps are repeated recursively until we have a representation G 0 of the option value at the first monitor date. An estimator of the time-zero option value is given bỹ We refer to this approximation as the direct estimator.
A neural network approach to G m . In this section we propose to represent the regression functions G m as shallow, artificial neural networks. We discuss some approaches to the neural network design and its interpretation as a static hedge portfolio. In particular we specifically propose to utilize networks with a single hidden layer, employing the ReLU activation function to facilitate this interpretation. The choices that are presented here are adapted to a framework of Gaussian risk-factors, such as presented in section 2. The method however lends itself to be generalized to a broader class of models, by considering an appropriate adjustment to the input or structure of each neural network. Our motivation for a neural network representation of G m is twofold. First, it allows us to utilize the optimization algorithms that have been developed in this field. Second, by the virtue of the universal approximation theorem [33] we can reach any level of accuracy for the replication within a compact domain of the risk-factor (see section 5).
3.2.1. The 1-factor case. First we discuss the case d = 1. Let m ∈ {0, . . . , M − 1}. As a regression function we consider a fully-connected, feed-forward neural network with one hidden layer, denoted as G m : R → R. The design with only a single hidden layer is chosen deliberately to facilitate the network's interpretation. As an input to the network (the asset z m ) we select a zero-coupon bond, which pays one unit of currency at T M . Our motivation for this choice is that both discount bonds and European options on discount bonds admit closed-form pricing formulas. The network is given the following structure.
• The first layer consists of a single node. As a property of the one-factor model, all the spot-rates at some future instance {R(T m , T ), T ∈ [T m , T ]} are perfectly correlated through the single variable x Tm . A 1D input layer taking P (T m , T M ) as input is hence rich enough to identify the option valueṼ (T m ). The hidden layer has q ∈ N hidden nodes. The affine transformation acting between the first two layers is denoted A 1 : R → R q and is of the form As an activation function ϕ : R q → R q acting on the hidden layer we take the ReLUfunction, given by The ReLU activation is chosen deliberately as it corresponds to the pay-off function of a European option. • The output of the network aims to estimate contract valueṼ m ∈ R and therefore contains only a single node. We consider a linear transformation acting between the second and last layer A 2 : R q → R, given by On top of that we apply the linear activation, which comes down to an identity function, mapping x to itself. Combined together, the network is specified to satisfy and the trainable parameters can be presented by the list The architecture is graphically visualized in Figure 1.
Interpretation of the neural network. Now that we specified the structure of the neural network, we will discuss how each function G m can be interpreted as a portfolio Π m . In the one-dimensional case, G m can be expressed as follows We can regard this as the pay-off of a derivative portfolio Π m written on the asset z m (in our case the zero-coupon bond P (T m , T M )). The portfolio contains q derivatives that each have a terminal value equal to w 2,j max {w 1,j z m + b j , 0}. In total we can recognize four types of products, which depend on the signs of w 1,j and b j . Keep in mind that z m := P (T m , T M ) is positive by default.
1. If w 1,j > 0 and b j > 0, we have which is the pay-off of a forward contract on w 2,j w 1,j units in z m and w 2,j b j units of currency. 2. If w 1,j > 0 and b j < 0, we have which is the pay-off corresponding to w 2,j w 1,j units of a European call option written on z m , with strike price which is the pay-off corresponding to −w 2,j w 1,j units of a European put option written on z m , with strike price b j −w 1,j . 4. If w 1,j < 0 and b j < 0, we have which clearly represents a worthless contract. The sign of the coefficient w 2,j indicates if one has a short or long position of the product in the portfolio. Hence, under the assumption of a frictionless economy, the absence of arbitrage and the Markov property for z m , the portfolio Π m replicates the original Bermudan contract over the period (T m−1 , T m ]. As the portfolio composition is constant between two consecutive monitor dates, the method described here can be interpreted as a semi-static hedging strategy. To see why the above statement is true, simply consider n bonds P (T m , T m + δ 1 ), . . . , P (T m , T m + δ n ) and note that the following relation holds . . .
Since we have that rank(B(T m )) = min{n, d} it follows that if n < d the image of B does not span the whole risk-factor space, whereas if n > d the image of B is still equal to the case n = d.
Concluding on the argument above, it would be an obvious choice to take a d−dimensional vector of bonds as the input and generalize the architecture of G m by increasing the inputdimension (i.e. the number of nodes in the first layer) from 1 to d. A problem that would occur however, is that Π m then represents a derivatives portfolio written on a basket of bonds, by which the tractability of pricing Π m would be lost. Therefore we suggest two alternatives to the design of G m , intended to preserve the analytical valuation potential of Π m .
The basic specifications of the neural network will remain similar to the 1-factor case. We consider a feed-forward neural network with one hidden layer of the form G m : R d → R.
• The first layer consists of d nodes and the hidden layer has q ∈ N hidden nodes. The affine transformation and activation acting between the first two layers are denoted A 1 : R d → R q and ϕ : R q → R q respectively given by • The output contains a single node. A linear transformation acts between the second and last layer A 2 : R q → R, together with the linear activation, given by • The network is given by G m (·) := A 2 • ϕ • A 1 Suggestion 1: A locally connected neural network. The outcome of each node in the hidden layer represents the terminal value of a derivative written on the asset z m , which together compose the portfolio Π m . In the d−dimensional case the outcome of the j th node ν j can be expressed as which corresponds to the pay-off of an arithmetic basket option with weights w j1 , . . . w jd and strike price b j . Such an exotic option is difficult to price. To overcome this issue we constrain the matrix w 1 to only admit a single non-zero value in each row. Let the number of hidden nodes be a multiple of the input dimension, i.e. q = n · d for some n ∈ N. The matrix w 1 is set to be of the form The architecture is graphically depicted in Figure 2a. As a result, the outcome of each node ν j again represents a European option or forward written on a single bond, which can be priced in closed-form (see Appendix A.1). We can recognize two drawbacks to this approach. First, the number of trainable parameters for a fixed number of hidden nodes is much lower compared to the fully connected case. This can simply be overcome by increasing q. Second, as the network is not fully connected, the universal approximation theorem no longer applies to G m . Therefore we have no guarantee the approximation errors can be reduced to any desirable level. Our numerical experiments however indicate that the approximation accuracy of this design is not inferior to that of a fully connected counterpart of the same dimensions; see section 6.
Suggestion 2: A fully connected neural network. Our second approach does not entail altering the structure or weights of the network, but suggests to take a different input. We hence consider a fully connected, feed-forward neural network with one hidden layer of the form G m : R d → R. The architecture is graphically depicted in Figure 2b. However as an input, we use the log of n bonds, i.e.
As a result, each node ν j can be compared to the payoff of a geometric basket option written on n assets z m equal to log of P (t, T m + δ j ). Under the assumption that the dynamics of the risk-factor x t are Gaussian, these options can be priced explicitly as we will show in Appendix A.2.
An advantage of this approach is that it employs a fully-connected network which by the virtue of the universal approximation theorem [33] can yield any desired level of accuracy. A drawback is that the financial interpretation of the network as a replicating portfolio is not as strong as in suggestion 1, due to the required log in the payoff.

3.3.
Training of the neural networks. In this section we specify some of the main considerations related to the fitting procedure of the algorithm. The method requires the training of M shallow feed-forward networks as specified in subsection 3.2, which we denote G 0 , . . . , G M −1 . Our numerical experiments indicated that normalization of the training-set strongly improved the networks' fitting accuracy. Details for pre-processing the regression data are treated in Appendix B.
Optimization. The training of each network is done in an iterative process, starting with G M −1 working backwards until G 0 . The effectiveness of the process depends on several standard choices related to neural network optimization, of which some are listed below.
• As optimizer we apply AdaMax [36], a variation to the commonly used Adam algorithm. This is a stochastic, first-order, gradient-based optimizer that updates weights inversely proportional to the L ∞ -norm of their current and past gradients; whereas Adam is based on the L 2 -norm. Our experiments indicate that AdaMax slightly outperforms comparable algorithms in the scope of our objectives. • The batch size, i.e. the number of training points used per weight update, is set to a standard 32. The learning rate, which scales the step size of each update, is kept in the range 0.0001-0.0005. • For the initial network, G M −1 , we use random initialization of the parameters. If the considered contract is a payer Bermudan swaption, we initialize the (non-zero) entries of w 1 i.i.d. unif(0, 1) and the biases b i.i.d. unif(−1, 0). In the case of a receiver contract, it's the other way around. The weights w 2 are initialized i.i.d. unif(−1, 1).
• For the subsequent networks, G M −2 , . . . , G 0 , each network G m is initialized with the final set of weights of the previous network G m+1 . • As a training set for the optimizer we use a collection of 20,000 data-points. Some specific choices for the hyperparameters are motivated by a convergence-analysis presented in Appendix C.
4. Lower and upper bound estimates. The algorithm described in subsection 3.1, gives rise to a direct estimator of the true option price V . The accuracy of this estimator depends on the approximation performance of the neural networks at each monitor date. Should each regression yield a perfect fit, then the estimation error would automatically be zero. In practice however, the loss function, defined in (3.2), never fully converges to zero. As the networks are trained to closed-form exercise and continuation values, error measures such as MSE and MAE can be easily obtained. Especially the mean absolute errors provide a strong indication of the error bounds on the direct estimator (see section 5).
Although convergence errors put solid bounds on the accuracy of the estimator, they are typically quite loose. Therefore they give rise to non-tight confidence bounds. To overcome this issue we introduce a numerical approximation to a tight lower and upper bound to the true price, in the same spirit as [39]. These should provide a better indication of the quality of the estimate.

The lower bound.
We compute a lower bound approximation by considering the non-optimal exercise strategyτ implied by the continuation values estimates introduced in subsection 3.1. We defineτ as whereC m refers to the approximated continuation value given in 3.3. A strict lower bound is now given by where hτ corresponds to the definition given in 2.3. The term on the right is obtained by changing the measure from Q to the T M −forward measure Q T M [23]. Under the risk-neutral measure the lower bound can be estimated by simulating a fresh set of scenarios of the riskfactorx := x n t 1 , x n t 2 , . . . , x n T M n = 1, . . . , N . Letr n j denote the corresponding realizations of the short-rate. An approximation of the discounting term is obtained as The estimate of L is then given byL For accurate approximation of the discount term, a coarse discretization of the simulation grid is required (see [9]), which is computationally demanding. An alternative is to simulate the fresh set of scenarios under the T M -forward measure instead. Denote by P n (t, T M ) the zero-coupon bond realization corresponding to x n t and compute the approximation as As a consequence there is no need to simulate the numéraire as there is an analytical expression available for P n (τ n , T M ).

The upper bound.
We compute an upper bound by considering a dual formulation of the price expression 2.4 as proposed in [31] and [44]. Let M denote the set of all Martingales is obtained by observing that the following inequality holds (see [31]), for any M t ∈ M. To find a suitable Martingale that yields a tight bound, we consider the Doob-Meyer decomposition of the true discounted option price process V (t) B(t) . As the price process is a supermartingale, we can write where Y t denotes a Martingale and Z t a predictable, strictly decreasing process such that Z 0 = 0. Note that equation 4.4 attains an equality if we set M t = Y t , i.e. the Martingale part of the option price process. The bound will hence be tight if we consider a Martingale M t that is close to the unknown Y t . Let G m (·) denote the neural networks induced by the algorithm. In the spirit of [2] and [39] we construct a Martingale on the discrete time grid {0, T 0 , . . . , T M −1 } as follows. (4.5) Clearly, the process {M Tm } M −1 m=0 yields a discrete Martingale as Furthermore, the process M t as defined above will coincide with Y t if the approximation errors in G m (·) equal zero, hence yielding an equality in 4.4. Note that the recursive relation in 4.5 can be rewritten as We can now estimate the upper bound by again simulating a set of scenarios of the risk-factor x n t 1 , x n t 2 , . . . , x n T M n = 1, . . . , N and approximate U (0) under the risk-neutral measure as where the discounting term is estimated as in 4.3. In a similar fashion, the upper bound can be approximated under the T M −forward measure. In that case the risk-factor should be simulated under Q T M and the numéraire B(t) be replaced by P (t, T M ). By doing so we again avoid the need to approximate the numéraire on a coarse simulation grid. Note that by the deliberate choice of G m (·), all the conditional expectations appearing in 4.6 can be computed in closed-form (see Appendix A). Hence, there is no need to resort to nested simulations, in contrast to for example [2] and [3]. Especially if simulations are performed under the T M −forward measure, both lower and upper bound estimations can be obtained at minimal additional computational cost.

Error analysis.
In this section we analyze the errors of the semi-static hedge, the direct estimator, the lower bound estimator and the upper bound estimator, which are induced by the imprecision of the regression functions G 0 , . . . , G M −1 . We show that for a sufficiently large hedging portfolio, the replication error will be arbitrarily small. Furthermore, we will provide error margins for the price estimators in terms of the regression imprecision. We thereby show that the direct estimator, lower bound and upper bound will converge to the true option price as the accuracy of the regressions increases. Cornerstone to the subsequent theorems is the universal approximation theorem, as presented in for example [33]. Given thatṼ is a continuous function on the compact set I d , it guarantees that for each m ∈ {0, . . . , M − 1} there exists a neural network G m such that for arbitrary ε > 0. In other words, the regression error can be kept arbitrarily small on any compact domain of the risk-factor. 5.1. Accuracy of the semi-static hedge. In the theorem below we prove that the semistatic hedge can reach any desired level of accuracy. Let T f = {T 0 , . . . , T M −1 } denote the set of monitor dates. Recall that it is assumed that the risk-factors follow a Markovian process and that the market is free of arbitrage and frictionless. For the following theorem we additionally assume that x t ∈ I d for some compact set I d ⊂ R d . As I d can be arbitrarily large, this assumption is loose enough to account for a vast majority of the risk-factor scenarios in a standard Monte Carlo sample. On top of that, I d can be chosen sufficiently large such that  For the inductive step, assume that for some T m+1 ∈ T f , an approximationṼ (T m+1 ) of the price is given, satisfying We will show that it follows that for all t ∈ [T m , T m+1 ) First consider the case t ∈ (T m , T m+1 ). It follows that In the last expression above, the first term is bounded due to the induction hypothesis, i.e.
The second term is bounded by assumption, i.e.
there exists a network G m+1 (·), such that If on the other hand t = T m we have that , h m (x) in the expression above, we can distinguish 4 cases for each x ∈ I d , which are We conclude that by induction on m = M − 1, . . . , 0 that

5.2.
Error of the direct estimator. Theorem 5.1 bounds the hedging-error of the semistatic hedge in terms of the maximum regression errors. This implicitly provides an error margin to the direct estimator under the aforementioned assumptions. Although universal approximation theorem guarantees that the supremum-errors can be kept at any desired level, in practice they are substantially higher than for example the MSEs or MAEs of the regression function. This is due to inevitable fitting imprecision outside or near the boundaries of the finite training sets. In the following theorem we propose that the error of the direct estimator can be bounded in terms of the discounted MAEs of the neural networks. These quantities are generally much tighter than the supremum-errors and are typically easier to estimate.
The proof of the theorem follows a similar line of thought as the proof of Theorem 5.1. As the direct estimator at time-zero depends on the expectation of the continuation value at T 0 , we can show by an iterative argument that the overall error is bounded by the sum of the mean absolute fitting errors at each monitor date. The error-bound in the direct estimator therefore scales linearly with the number of exercise opportunities. For a complete proof we refer to Appendix D.
F Tm , h m (x Tm ) denotes the estimator at date T m . Then the error inṼ is bounded as given below V (0) −Ṽ (0) < M ε 5.3. Tightness of the lower bound estimate. A lower bound L(t) to the true price can be computed by considering the non-optimal exercise strategy, implied by the direct estimator (see subsection 4.1). This relies on the stopping time In the following theorem we propose that the tightness of L(0) can be bounded by the discounted MAEs of neural network approximations.
The proof of the theorem relies on the fact that conditioned on any realization ofτ and τ , the expected difference between L(0) and V (0) is bounded by the sum of the mean absolute fitting errors at the monitor dates betweenτ and τ . In the proof we therefore distinguish between the eventsτ < τ andτ > τ . Then, by an inductive argument we can show that the bound on the spread between L(0) and the true price scales linearly with the number of exercise opportunities. For a complete proof we refer to Appendix E.
F Tm , h m (x Tm ) denotes the estimator at date T m . Then the spread between V (0) and L(0) is bounded as given below

Tightness of the upper bound estimate.
An upper bound U (t) to the true price can be computed by considering a dual formulation of the dynamic pricing equation [31], see subsection 4.2. From a practical point of view, the difference between the upper bound and the true price can be interpreted as the maximum loss an investor would incur due to hedging imprecision resulting from the algorithm [39]. The overall hedging error at some monitor date T m is the result of all incremental hedging errors occurring from rebalancing the portfolio at preceding monitor dates. As the incremental hedging errors can be bounded by the sum of the expected absolute fitting errors, we propose that the tightness of U (t) can be bounded by the discounted MAEs of the neural networks and scales at most quadratically with the number of exercise opportunities.
The proof follows a similar line of thought as presented in [2]. There it is noted that the difference between the dual formulation of the option and its true price is difficult to bound. Here we make a similar remark and propose a theoretical maximum spread between U (0) and V (0) that is relatively loose. Our numerical experiments however indicate that the upper bound estimate is much tighter in practice. For a complete proof we refer to Appendix F.
F Tm , h m (x Tm ) denotes the estimator at date T m . Then the spread between V (0) and U (0) is bounded as given below Numerical experiments. In this section we treat several numerical examples to illustrate the convergence, pricing and hedging performance of our proposed method. We will Parameter a σ f (0, t) Value 0.01 0.01 0.03 Table 1: Parameters 1F Hull-White model start by considering the price estimate of a vanilla swaption contract in a 1-factor model. This is a toy-example by which we can demonstrate the accuracy of the direct estimator in comparison to exact benchmarks. We continue with price estimates of Bermudan swaption contracts in a 1-factor and a 2-factor framework. The performance of the direct estimator will be compared to the established least-square regression method (LSM) introduced in [40], fine-tuned to an interest rate setting as described in [21]. Additionally we will approximate the lower-and upper bound estimates as described in section 4 and show that they are well inside the error-margins introduced in section 5. Finally we will illustrate the performance of the static hedge for a swaption in a 1-factor model and a Bermudan swaption in a 2-factor model. For the 1-factor case we can benchmark the performance by the analytic delta-hedge for a swaption, provided in [32]. A T 0 × T M contract (either European swaption or Bermudan swaption) refers to an option written on a swap with a notional amount of 100 and a lifetime between T 0 and T M . This means that T 0 and T M −1 are the first and last monitor date respectively in case of a Bermudan. The underlying swaps are set to exchange annual payments, yielding year-fractions of 1 and annual exercise opportunities. All examples that are illustrated here have been implemented in python, using the Quant-Lib library [1] for standard pricing routines and Keras with Tensorflow backend [15] for constructing, fitting and evaluating the neural networks.
6.1. 1-factor swaption. We start by considering a swaption contract under a one dimensional risk-factor setting. The direct estimator of the true V (0) swaption price is computed similar to a Bermudan swaption, but with only a single exercise possibility at T 0 . Therefore only a single neural network per option needs to be trained to compute the option price. We have used 64 hidden nodes and 20,000 training-points, generated through Monte Carlo sampling. We assume the risk-factor to be captured by the Hull-White model with constant mean-reversion parameter a and constant volatility σ. The dynamics of the shifted mean-zero process [9] are hence given by For simplicity we consider a flat time-zero instantaneous forward rate f (0, t). The risk-neutral scenarios are generated using a discrete Euler scheme of the process above. Parameter values that were used in the numerical experiments are summarized in Table 1. Figures 3a and 3b show the time-zero option values in basis points (0.01%) of the notional for a 5Y ×10Y and a 10Y ×5Y payer swaption as a function of the moneyness. The moneyness is defined as S K , where K denotes the fixed strike and S the time-zero swap rate associated with the underlying swap. The exact benchmarks are computed by an application of Jamshidian's decomposition [34]. The relative estimate errors are shown in Figures 3c and 3d. We observe a close agreement between the estimates and the reference prices. The errors are in the order of several basis points of the true option price. In the current setting the results presented serve mostly as a validation of the estimator. We however point out that this algorithm for swaptions is applicable in general frameworks, such as multi-factor, dual-curve or nonoverlapping payment schemes, for which exact routines are no longer available.
6.2. 1-factor Bermudan swaption. As a second example we consider a Bermudan swaption contract. The same dynamics for the underlying risk-factor are assumed as discussed in the previous paragraph, using the parameter settings of Table 1. Monte Carlo scenarios are generated based on a discretised Euler scheme associated to the SDE in 6.1, taking weekly time-steps.
We first demonstrate the convergence property of the direct estimator, that is implied by the replication portfolio. We consider a 1Y × 5Y Bermudan swaption with strike K = 0.03. For this analysis, the neural networks were trained to a set of 2000 Monte Carlo generated training points. Figure 4a shows the direct estimator as a function of the number of hidden nodes in each neural network, alongside an LSM-based benchmark. In Figure 4b the error with respect to the LSM estimate is shown on a logscale. We observe that the direct estimator converges to the LSM confidence interval or slightly above, which is in accordance with the fact that LSM is biased low by definition. The analysis indicates that a portfolio of 16 discount bond options is sufficient to achieve a replication of similar accuracy as the LSM benchmark. Table 2 depicts numerical pricing results for a 1Y × 5Y , 3Y × 7Y and 1Y × 10Y receiver Bermudan swaption. For each contract we consider different levels of moneyness, setting the fixed rate K of the underlying swap to respectively 80%, 100% and 120% of the time-zero swap rate. The estimations of the direct, the upper bound and the lower bound statistics are again reported alongside LSM-based benchmarks. Here, the neural networks have 64 hidden nodes and are fitted using a training set of 20,000 points. The lower and upper bound estimates, as well as the LSM estimates, are based on simulation runs of 200,000 paths each. The given lower and upper bounds are Monte Carlo estimates of the statistics defined in 4.2 and 4.4 and are therefore subject to standard errors, which are reported in parentheses. The reference LSM results have been generated using 1, x, x 2 as regression basis functions for approximating the continuation values. The standard errors and confidence intervals are obtained from ten independent Monte Carlo runs. The choice for hyperparameter settings is motivated by the analysis of Appendix C.
The spreads between the lower and upper bound estimates provide a good indication of the accuracy of the method. For the current setting we obtain spreads in the order of several basis points up a few dozen of basis points. The lower bound estimate is typically very close to the LSM estimate, which itself is also biased low. Their standard errors are of the same order of magnitude. The upper bound estimates prove to be very stable and show a variance that is roughly two orders of magnitude smaller compared to that of the lower bound. The direct estimate is occasionally slightly less accurate. This can be explained by the fact that it depends on the accuracy of the regression over the full domain of the risk-factor, whereas for the lower bound only a high accuracy near the exercise boundaries is required. Figure 5 presents the mean absolute error of each neural network after fitting as a function of the network's index. The errors are displayed in basis points of the notional. We observe that the errors are the smallest at maturity and tend to increase with each iteration backward in time.
That the errors at the final monitor date are virtually zero can be explained by the fact that the pay-off at T M −1 is given by which can be exactly captured by a network with only a single hidden node. With each step backwards, the target function is harder to fit, yielding larger errors. We observe MAEs up to one basis point of the notional amount. The empirical lower-upper bound spreads remain well within the theoretical error margins provided in subsections 4.1 and 4.2. The spreads are mostly much lower than the sum of the MAEs, indicating that the bound estimates are in practice significantly tighter than their theoretical maximum spread.   sumed to follow a G2++ model [9]. Monte Carlo scenarios are generated based on a discretised Euler scheme, taking weekly time-steps, based on the SDE below.
where W 1 and W 2 are correlated Brownian motions with d W 1 , W 2 t = ρdt. Parameter values that were used in the numerical experiments are summarized in Table 3. We again start by demonstrating the convergence property of the direct estimator, for both the locally-connected and the fully-connected neural network designs as specified in subsection 3.2.2. The same 1Y × 5Y Bermudan swaption with strike K = 0.03 is used and the networks are each fitted to a set of 6400 training points. Figure 6a shows the direct estimator as a function of the number of hidden nodes in each neural network, alongside an LSM-based benchmark. In Figure 6b the error with respect to the LSM estimate is shown on a logscale. We observe a similar convergence behaviour, where the direct estimators approach the LSM benchmark within the 95% confidence range. Here it is noted that a portfolio of 8 discount bond options is already sufficient to achieve a replication of similar accuracy as the LSM estimator. Table 4 depicts numerical results for a 1Y ×5Y , 3Y ×7Y and 1Y ×10Y receiver Bermudan swaption, for different levels of moneyness. We again report the direct, the upper bound and the lower bound estimates for both neural network designs. In this case, all networks have 64 hidden nodes and are fitted to training sets of 20,000 points. As before, the lower bound, the upper bound and the LSM estimates are the result of 10 independent Monte Carlo simulations of 200,000 scenarios. For the LSM algorithm we used 1, x 1 , x 2 , x 2 1 , x 1 x 2 , x 2 2 as basis-functions. Note that the number of monomials grows quadratically with the dimension of the state space and with that the number of free parameters. For our method, this number 0.07 0.08 0.015 0.008 -0.6 0.03 Table 3: Parameters 2F G2++ model grows at a linear rate. Choices for the hyperparameters are again based on the analysis of Appendix C. The results under the 2-factor case share several features with the 1-factor results. We observe spreads between the lower and upper bounds ranging from several basis-points up to a few dozen basis points of the option price. The lower bound estimates turn out very close to the LSM estimates and the same holds for their standard errors. The upper bounds are again very stable with low standard errors and the direct estimator appears slightly less accurate. If we compare the locally-connected to the fully-connected case, we observe that the results are overall in close agreement, especially the lower and upper bound estimates. This is remarkable given that the fully-connected case gives rise to more trainable parameters, by which we would expect a higher approximation accuracy. In the 2-factor setting, the ratio of free parameters for the two designs is 3 : 4. Figure 7 shows the mean absolute errors of the neural networks after fitting. The MAEs for the locally-connected networks are in blue; the fully-connected are in red. All are represented in basis points of the notional amount. We observe that the errors are mostly in the same order of magnitude as the one-dimensional case. The figures indicate that the locally-connected networks slightly outperform the fully-connected networks in terms of accuracy, although this does not appear to materialize in tighter estimates of the lower and upper bounds. For the locally-connected case we again observe that the errors are virtually zero at the last monitor date, for the same reasons as in the 1-factor setting. In the fully-connected representation, an exact replication might not exist, resulting in larger errors. We conjecture that this effect partially carries over to the networks at preceding monitor dates. The empirical lower-upper bound spreads remain well within the theoretical error margins, as the spreads are in all cases lower than the sum of the MAEs. Hence also for the two-factor setting we find that the bound estimates are tighter in practice than their theoretical maximum spreads.
6.4. Performance semi-static hedge. Finally, we consider the hedging problem of a vanilla swaption under the 1-factor model and a Bermudan swaption under the 2-factor model.

1-factor swaption.
Here we compare the performance of a static versus a dynamic hedge in the 1-factor model. As an example, we take a 1Y × 5Y European receiver swaption at different levels of moneyness. The model set-up is similar to that in subsection 6.2, using the same set of parameters reported in Table 1. In the static hedge case, the option contract writer aims to hedge the risk using a static portfolio of zero-coupon bond options and discount bonds. The replicating portfolio is composed using a neural network with 64 hidden nodes, optimized using 20,000 training-points generated through Monte Carlo sampling. The portfolio is composed at time-zero and kept until the expiry of the option at t = 1 year. In the dynamic hedge case, the delta-hedging strategy is applied. The replicating portfolio is composed of units of the underlying forward-starting swap and investment in the money-market. The dynamic hedge involves the periodic rebalancing of the portfolio. The delta for a receiver (a) Convergence price (b) Convergence pricing error Figure 6: Convergence of the direct estimator for the 1Yx5Y Bermudan swaption price as a function of hidden node count, with respect to the LSM benchmark under a 2-factor model.
swaption under the Hull-White model (see [32]) is given by where Φ denotes the CDF of a standard normal distribution, c j = ∆T j K for j = 1, . . . , M − 1 and c M = 1 + ∆T M K. The function ν(t, T ) denotes the instantaneous volatility of a discount bond maturing at T , which under Hull-White is given by ν(t, T ) := σ a 1 − e −a(T −t) . We validated the analytic expression above with numerical approximations of the Delta obtained by bumping the yield curve. Within the simulation, the dynamic hedge portfolio is rebalanced on a daily basis between time-zero and expiry of the option. In this experiment that means it is updated on 255 instances at equidistant monitor dates.
The performance of both hedging strategies is reported in Table 5. The results are based on 10,000 risk-neutral Monte Carlo paths. The hedging error refers to the difference between the option's pay-off at expiry and the replicating portfolio's final value. The quantities are reported in basis points of the notional amount. The empirical distribution of the hedging error is shown in Figure 8. We observe that overall the static hedge outperforms the dynamic   hedge in terms of accuracy, even though it involves only a quarter (64 versus 255) of the trades. Although it is not visible in Figure 8b, the static strategy does give rise to occasional outliers in terms of accuracy. These are associated with scenarios that reach or exceed the boundary of the training set. These errors are typically of a similar order of magnitude as the errors observed in the dynamic hedge. The impact of outliers can be reduced by increasing the training-set and thereby broadening the regression-domain.

2-factor Bermudan swaption.
Here we demonstrate the performance of the semistatic hedge for a 1Y × 5Y receiver Bermudan swaption under a 2-factor model. We compare the accuracy of the hedging strategy utilizing a locally-connected versus a fully-connected neural network. In the former, the replication portfolio consists of zero-coupon bonds and zero-coupon bond options. In the latter, the Bermudan is replicated with options written on hypothetical assets with a pay-off equal to the log of a zero-coupon bond (see subsection 3.2.2). The model set-up is similar to that in subsection 6.3, using the same set of parameters reported in Table 3. Both network are composed with 64 hidden nodes and optimized using 20,000 training-points generated through Monte Carlo sampling. The portfolio is set-up at time-zero and updated at each monitor-date of the Bermudan until it is either exercised or expired. We assume that the holder of the Bermudan swaption follows the exercise strategy implied by the algorithm, i.e. the option is exercised as soon asC m (T m ) ≤ h m (x Tm ). When a monitor date T m is reached, the replication portfolio matures with a pay-off equal to G m (z m (T m )).
In case the Bermudan is continued, the price to set up a new replication portfolio is given byṼ    semi-static hedge (HE) is therefore computed as F Tm , h m (x Tm ) denotes the direct estimator at date T m andτ denotes the stopping time, as defined in 4.1.
The performance of the strategies related to locally-and fully-connected neural networks is reported in   is shown in Figure 9. We observe that both approaches yield an accuracy in the same order of magnitude, although the locally-connected case slightly outperforms the fully-connected case. This is in line with expectations, as the fitting performance of the locally-connected networks is generally higher. For similar reasons as the 1-factor case, the hedging experiments give rise to occasional outliers in terms of accuracy. These outliers can be in the order of several dozens of basis points. Again, the impact of outliers can be reduced by broadening the regression-domain.

7.
Conclusion. This paper has featured a semi-static hedging algorithm for callable interest rate derivatives under an affine, multi-factor term-structure model. As such we present a novel contribution to the literature, where little work is done concerning the static replication of path-dependent interest rate derivatives. Taking Bermudan swaptions as example, we have demonstrated that these products can be replicated with an options portfolio written on a basket of discount bonds. The static portfolio composition is obtained by regressing the target option's value using a shallow, artificial neural network. For established regression methods, such as LSM, the choice of basis functions is arbitrary. In our approach, the chosen basis functions are motivated by their representation of the replicating portfolio's pay-off, yielding interpretable neural networks. Apart from a hedging application, the algorithm gives rise to a direct estimator of the contract price. An upper bound and lower bound estimate to this price valuation can be computed at a minimal additional computational cost. The LSM approach requires expensive nested simulations to obtain such bounds, which can be avoided here. An important contribution is that we prove strict theoretical error margins to the earlier mentioned price statistics. These margins are based on simple metrics, such as the mean absolute error of the neural network fit, which is easily measured. The performance of the semi-static hedge is justified by established benchmarks. Illustrative examples focussing on convergence, hedging and pricing are provided for a 1-factor and a 2-factor model, which are popular amongst practitioners.
As a look-out for further research, we consider applying the algorithm to the computation of counterparty credit risk-measures and various value-adjustments. These metrics typically rely on generating a forward value-and sensitivity-profiles of (exotic) derivative portfolios. We see the semi-static hedging approach combined with the simple error analysis as an effective tool to address the computational challenges associated with these risk measures.
Disclosure. The opinions expressed in this work are solely those of the authors and do not represent in any way those of their current and past employers. No potential conflict of interest was reported by the authors.
risk-factor dynamics discussed in subsection 2.1. This concerns a linear shift of the canonical representation of the latent factors as presented in [18]. We write x t := (x 1 (t), . . . , x n (t)) , where each component x i denotes a mean-reverting zero-mean process. The risk-neutral dynamics are assumed to satisfy . . .
where W denotes a standard d-dimensional Brownian motion with independent entries. By settingσ i (t) := d j=1 σ 2 ij (t), the process above can be rewritten in terms of one-dimensional Itô processes [45] of the form A.1. The continuation value with locally connected NN. We consider the network G m (·), which is trained to approximateṼ (T m ). Let t ∈ [T m−1 , T m ). In order to obtaiñ V (t), we need to evaluate E Q e − Tm t r(u)du G m (x Tm ) F t . As G m (·) represents the linear combination of the outcome of q hidden nodes, we will focus on the conditional expectation of hidden node i ∈ {1, . . . , q}. Our aim is then to compute the following The map ϕ : R → R denotes the ReLU function defined as ϕ(x) = max{x, 0}. The weightvector w i (corresponding to hidden node i) and P(T m ) are defined as Recall that as a characteristic of the affine term-structure model, the random variable P (t, T ) can be expressed as for deterministic functions A and B i , which are available in closed-form (see [9]). By the structure of the network, the weight-vector is constraint to have only a single non-zero entry, which we will denote to have index k. Therefore we can rewrite As we argued before, if w k i and b i are both non-negative, H i (t) denotes the value of a forward contract. In that case we have If on the other hand b i < 0 < w k i or w k i < 0 < b i , we are dealing with a European call or put option respectively. Closed-form expressions for European bond options are available based on Black's formula and have been treated extensively in the literature; see for example [42], [22] or [9]. In our case we have where Φ denotes the CDF of a standard normal distribution and we define In the expression above, the function ν(t, T ) ∈ R d refers to the instantaneous volatility at time t of a discount bond maturing at T . Under the dynamics of A.1, ν is given by The continuation value with fully connected NN. Once again, we consider the network G m (·), focus on the outcome of hidden node i ∈ {1, . . . , q} and let t ∈ [T m−1 , T m ). Now our aim is to evaluate the conditional expectation below, which by a change of numéraire argument can be rewritten as where the expectation on the right is taken under the T m -forward measure, taking P (t, T m ) as numéraire. The weight-vector w i (corresponding to hidden node i) and log P(T m ) are defined as We set the input-dimension equal to the number of risk-factors (i.e. d = n). Therefore we can write In order to compute the conditional expectation of A.4, a change of measure is required to obtain the dynamics of x 1 , . . . , x n under the T m −forward measure. Consider the Radon-Nikodym derivative process [4], defined by where ν refers to to the instantaneous volatility of the numéraire, given in A.3. The dynamics of the risk-factors under Q Tm can be obtained by an application of Girsanov's theorem [42]. Denote by σ i (t) := (σ i1 (t), . . . , σ id (t)) the i th row of the volatility matrix of x t and letW Tm i be Brownian motions under Q Tm then a i (u)du ds, then the SDE above solves to (A.5) It follows that as a property of the Itô integral, the risk-factors (x 1 (T m ), . . . , x n (T m )) as presented in A.5, conditional on F t , have a multivariate normal distribution under Q Tm . Their mean vector, and co-variance matrix are respectively given by As a result it should be clear the the random variable Y := w i log P(T m ) is normally distributed with mean and variance given respectively by As a result we can compute where the conditional expectation on the right hand side can be expressed in closed-form following a similar analysis as presented in [42].
and denote by ξ ∼ N (0, 1) a standard normal random variable. Then it follows that where φ denotes the standard normal density function and Φ the standard normal cumulative density function.
Appendix B. Pre-processing the regression-data. A procedure that significantly improves the fitting performance of the neural networks is the normalization of the trainingdata. Linear rescaling of the input to the optimizer is a common form of data pre-processing [5]. In the case of a multivariate input, the variables might have typical values in different orders of magnitude, even though that does not reflect their relative influence on determining the outcome [5]. Normalizing the scale avoids that the impact of certain input is prioritized over other input. Also, the transfer of the final weights in G m+1 to the initialization of G m is more effective as the target variables are of roughly the same size at each time-step. In the default situation, the average continuation values would change in magnitude and the risk-factor distribution would grow with each passing of a monitor date.
Another argument for pre-processing the input is that large data values, typically induce large weights. Large weights can lead to exploding network outputs in the feed-forward process [26]. Furthermore can it cause an unstable optimization of the network, as extreme gradients can be very sensitive to small perturbations in the data [26].
In practice we propose the following rescaling of the data. Denote bŷ We then perform a simple element-wise linear transformation to obtain the scaled dataẑ † and Proof. First we fix some notation.
• Let V m := V (T m ) denote the true price of the bermudan swaption at T m conditioned on the fact it is not yet exercised.
which is induced by Jensen's inequality. For the inductive step, assume that for some m ∈ {0, . . . , M − 1} we have that The expectation in (D.2) can be rewritten using the triangular inequality The second term in D.3 is by assumption bounded by ε. Note that the first term in D.3 can be bounded as For the final step, note that if m = M − 1 we have We conclude by induction on m that V (0) −Ṽ (0) < M ε Appendix E. Proof of Theorem 5.3.
Proof. We consider the following three events: {τ =τ }, {τ <τ } and {τ >τ }. Note that We will bound the three terms above one by one. Bounding E 1 : Starting with the event {τ =τ }, we observe that we can write where the inequality follows from the fact that the direct estimator has the propertyṼ (T m ) = max{C m , h m } ≥ h m . Now we will show by induction that E 2 < (M − 1)ε. First, observe that A 0 ≡ B 0 . Second, note that for any m ∈ {0, . . . , M − 1} we have that (E.1) The first equality follows from the fact thatṼ (T m ) =C m in the eventτ > T m . The second equality follows from the tower rule in combination with the fact that 1 Bm is F Tm −measurable.
The final inequality follows from an application of the triangle inequality. The first term in E.1 is by assumption bounded by ε. The second term in E.1 can be rewritten by observing that 1 Bm := 1 B 1 m + 1 B 2 m := 1 {τ ≤Tm∧τ =T m+1 } + 1 {τ ≤Tm∧τ >T m+1 } . We have that Furthermore we have that 1 B 2 m + 1 A m+1 = 1 B m+1 . Therefore we can infer that Together with the fact that A 0 ≡ B 0 , we conclude by induction on m that where the second equality follows from the fact that the direct estimator has the propertỹ V (τ ) = hτ . Now we will show by induction that E 3 < (M − 1)ε. Note that for any m ∈ {0, . . . , M − 1} we have that The first inequality follows from the fact thatṼ (T m ) = max{C m , h m } ≥C m . The subsequent equality follows from the tower rule in combination with the fact that 1 Bm is F Tm −measurable.
The final inequality follows from an application of the triangle inequality. The first term in E.2 is by assumption bounded by ε. The second term in E.2 can be rewritten by observing that 1 Bm := 1 B 1 m + 1 B 2 m := 1 {τ ≤Tm∧τ =T m+1 } + 1 {τ ≤Tm∧τ >T m+1 } . We have that where the inequality follows from the fact thatṼ (T m+1 ) = max{C m+1 , h m+1 } ≥ h m+1 . Furthermore we have that 1 B 2 m + 1 A m+1 = 1 B m+1 . Therefore we can once again infer that Together with the fact that A 0 ≡ B 0 , we again conclude by induction on m that Proof. The discounted true price process is a supermartingale under Q. Therefore we have that V (t) B(t) = Y t + Z t for a Martingale Y t and a predictable process Z t , which starts at zero (i.e. Z 0 = 0) and is strictly decreasing. Define a difference process on T , given by e Tm = V (Tm)−Gm(zm)

B(Tm)
. We can rewrite Martingale M t as defined in 4.6 in terms of e t as follows: Substituting the expression for M t into the definition of U (0) yields