{'fraction_non_alphanumeric': 0.04389226672026531, 'fraction_numerical': 0.01570272850610522, 'mean_word_length': 4.28101366591482, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Robust pricing and hedging via neural SDEs

Mathematical modelling is ubiquitous in the financial industry and drives key decision processes. Any given model provides only a crude approximation to reality and the risk of using an inadequate model is hard to detect and quantify. By contrast, modern data science techniques are opening the door to more robust and data-driven model selection mechanisms. However, most machine learning models are"black-boxes"as individual parameters do not have meaningful interpretation. The aim of this paper is to combine the above approaches achieving the best of both worlds. Combining neural networks with risk models based on classical stochastic differential equations (SDEs), we find robust bounds for prices of derivatives and the corresponding hedging strategies while incorporating relevant market data. The resulting model called neural SDE is an instantiation of generative models and is closely linked with the theory of causal optimal transport. Neural SDEs allow consistent calibration under both the risk-neutral and the real-world measures. Thus the model can be used to simulate market scenarios needed for assessing risk profiles and hedging strategies. We develop and analyse novel algorithms needed for efficient use of neural SDEs. We validate our approach with numerical experiments using both local and stochastic volatility models.


INTRODUCTION
1.1. Problem overview. Model uncertainty is an essential part of mathematical modelling but is particularly acute in mathematical finance and economics where one cannot base models on well established physical laws. Until recently, these models were mostly conceived in a three step fashion: 1) gathering statistical properties of the underlying time-series or the so called stylized facts; 2) handcrafting a parsimonious model, which would best capture the desired market characteristics without adding any needless complexity and 3) calibration and validation of the handcrafted model. Indeed, model complexity was undesirable, amongst other reasons, for increasing the computational effort required to perform in particular calibration but also pricing and risk calculations. With greater uptake of machine learning methods and greater computational power more complex models can now be used. This is due to the fact that arguably the most complicated and computationally expensive step of calibration has been addressed. Indeed, in the seminal paper [Hernandez, 2016] used neural networks to learn the calibration map from market data directly to model parameters. Subsequently, many papers followed [Liu et al., 2019, Ruf and Wang, 2019, Ruf and Wang, 2019, Benth et al., 2020, Gambara and Teichmann, 2020, Sardroudi, 2019, Horvath et al., 2019, Bayer et al., 2019, Bayer and Stemper, 2018, Vidales et al., 2018. However, these approaches focused on the calibration of fixed parametric model, but did not address perhaps even the more important issue which is model selection and model uncertainty.
The approach taken in this paper is fundamentally different. We let the data dictate the model, while still keeping a strong prior on the model form. This is achieved by using SDEs for the model dynamics but instead of choosing a fixed parametrization for the model SDEs we allow the drift and diffusion to be given by an overparametrized neural networks. We will refer to these as Neural SDEs. These are shown to not only provide a systematic framework for model selection, but also, quite remarkably, to produce robust estimates on the derivative prices. Here, the calibration and model selection are done simultaneously. In this sense, model selection is data-driven. Since the neural SDE model is overparametrised, there is a large pool of possible models and the training algorithm selects a model. Unlike in handcrafted models, individual parameters do not carry any meaning. This makes it hard to argue why one model is better than another. Hence the ability to efficiently compute interval estimators, which algorithms in this paper provide, is critical.
In parallel to this work, a similar approach to modelling was taken in [Cuchiero et al., 2020], where the authors considered local stochastic volatility models with the leverage function approximated with a neural network. Their model can be seen as an example of a Neural SDEs.
Let us now consider a probability space (Ω, F, (F t ) t∈[0,T ] , P) and a random variable Ψ ∈ L 2 (F T ) that represents the discounted payoff of a illiquid (path-dependent) derivative. The problem of calculating a market consistent price of a financial derivative can be seen as equivalent to finding a map that takes market data (e.g. prices of underlying assets, interest rates, prices of liquid options) and returns the no-arbitrage price of the derivative. Typically an Itô process (X θ t ) t∈[0,T ] , with parameters θ ∈ R p has been the main component used in constructing such pricing function. Such parametric model induces a martingale probability measure, denoted by Q(θ), which is then used to compute no-arbitrage price of derivatives. The market data (input data) here is represented by payoffs {Φ i } M i=1 of liquid derivatives, and their corresponding market prices {p(Φ i )} M i=1 . We will assume throughout that this price set is free of arbitrage. To make the model Q(θ) consistent with market prices, one seeks parameters θ * such that the difference between p(Φ i ) and E Q(θ * ) [Φ i ] is minimized for all i = 1, . . . , M (w.r.t. some metric). If for all i = 1, . . . , M we have p(Φ i ) = E Q(θ * ) [Φ i ] then we will say the model is consistent with market data (perfectly calibrated). There may be infinitely many models that are consistent with the market. This is called Knightian uncertainty [Knight, 1971, Cohen et al., 2018.
Let M be the set of all martingale measures / models that are perfectly calibrated to market inputs. In the robust finance paradigm, see [Hobson, 1998, Cox andObloj, 2011], one takes conservative approach and instead of computing a single price (that corresponds to a model from M) one computes the price interval (inf Q∈M E Q [Ψ], sup Q∈M E Q [Ψ]). The bounds can be computed using tools from martingale optimal transport which also, through dual representation, yields corresponding super-and sub-hedging strategies, [Beiglböck et al., 2013]. Without imposing further constrains, the class of all calibrated models M might be too large and consequently the corresponding bounds too wide to be of practical use [Eckstein et al., 2019]. See however an effort to incorporate further market information to tighten the pricing interval, [Nadtochiy andObloj, 2017, Aksamit et al., 2020]. Another shortcoming of working with the entire class of calibrated models M is that, in general, it is not clear how to obtain a practical/explicit model out of the measures that yields price bounds. For example, such explicit models are useful when one wants consistently calibrate under pricing measure Q and real-world measure P as needed for risk estimation and stress testing, [Broadie et al., 2011, Pelsser andSchweizer, 2016] or learn hedging strategies in the presence of transactional cost and an illiquidity constrains [Buehler et al., 2019].
Then we can write (1.1) as (1.2) Observe that σ S and σ V encode arbitrary correlation structures between the traded assets and the non-tradable components. Moreover, we immediately see that (e −rt S t ) t∈[0,T ] is a (local) martingale and thus the model is free of arbitrage. In a situation when (b, σ) are defined to be neural networks (see Appendix C), we call the SDE (1.1) a neural SDE and we denote by M nsde (θ) the class of all solutions to (1.1). Note that due to universal approximation property of neural networks, see [Hornik, 1991, Sontag and Sussmann, 1997, Cuchiero et al., 2019, M nsde (θ) contains large class of SDEs solutions. Furthermore, neural networks can be efficiently trained with the stochastic gradient decent methods and hence one can easily seek calibrated models in M nsde (θ). Finally, neural SDE integrate black-box neural network type models with the known and well studied SDE models. One consequence of that is that one can: a) consistently calibrate these under the risk neutral measure as well as the real-world measure; b) easily integrate additional market information e.g constrains on realised variance; c) verify martingale property. We want to remark that for simplicity we work in Markovian setting, but one could consider neural-SDEs with path-dependent coefficients and/or consider more general noise processes. We postpone analysis of theses cases to follow up paper. By imposing suitable conditions on the coefficients (b, σ) we know that unique solution to (1.1) exists, [Krylov, 1980, Chapter 2]. These conditions can be satisfied by neural networks e.g. by applying weight clipping. We denote the law of Given a loss function : R × R → R + , the search for calibrated model can be written as To extend the calibration consistently to the real world measure, assume that we are given some statistical facts (e.g. moments or other distributional properties) that the price process (or the non tradable components) should satisfy). Let ζ : [0, T ] × R d × R p → R n be another parametric function (e.g. neural network) and we extend the parameter space to . We now define a real-world measure P(θ) via the Radon-Nikodym derivative Under appropriate assumption on ζ (e.g. bounded) the measure P(θ) is a probability measure and by using Girsanov theorem we can find Brownian motion (W This is now the Neural SDE model in real-world measure P(θ) and one would like use market data to seek ζ. Let P market denote empirical distribution of market data and (E P market [S i ])M i=1 be a corresponding set statistics one aims to match. These might be autocorrelation function, realised variance or moments generating functions. The calibration to real-world measure, with (b V , σ V , σ S ) being fixed, consists of finding θ * such that But in fact we can write Thus we see that in this framework there needs to be no distinction between a derivative price Φ i and a real-world statistic E P market [S i ]. Hence from now on we will write only about risk-neutral calibrations bearing in mind that methodologically this leads to no loss of generality. Let us connect neural SDEs to the concept of generative modelling, see [Goodfellow et al., 2014, Kingma andWelling, 2013]. Let Q market ∈ M be the true martingale measure (so by definition all liquid derivatives are perfectly calibrated under this measure i.e. E Q market [Φ i ] = p(Φ i ) for all i = 1, . . . , M ). We know that when (1.1) admits a strong solution then for any θ ∈ R p there exists a measurable map G θ : [Karatzas and Shreve, 2012, Corolarry 3.23]. Hence, one can view (1.1) as a generative model that maps µ, the joint distribution of X 0 on R d and the Wiener measure on C([0, T ]; R n ) into Q θ = (G θ t ) # µ. We see that by construction G is a causal transport map i.e transport map that is adapted to filtration (F t ) t∈[0,T ] , see also [Acciaio et al., 2019, Lassalle, 2013.
One then seeks θ * such that G θ * # µ is a good approximation of Q market with respect to user specified metric. In this paper we work with As we shall see in Sections 5.1 and 5.2 there are many Neural SDE models that can be calibrated well to market data and that produce significantly different prices for derivatives that were not part of the calibration data. In practice these would be illiquid derivatives where we require model to obtain prices. Therefore, we compute price intervals for illiquid derivatives within the class of calibrated neural SDEs models.
To be more precise we compute We solve the above constraint optimisation problem by penalisation. See [Eckstein and Kupper, 2019] for related ideas.
1.3. Key conclusions and methodological contributions of this paper. The results in this paper presented below lead to the following conclusions.
i) Neural SDEs provide a systematic framework for model selection and produce robust estimates on the derivative prices. The calibration and model selection are done simultaneously and the thus the model selection is data-driven. ii) With neural SDEs, the modelling choices one makes are: networks architectures, structure of neural SDE (e.g. traded and non-traded assets), training methods and data. For classical handcrafted models the choice of the algorithm for calibrating parameters has not been considered as part of modelling choice, but for machine learning this is one of the key components. See Section 5, where we show how the change in initialisation of stochastic gradient method used for training leads to different prices of illiquid options, thus providing one way of obtaining price bounds. Furthermore even for basic local volalitly model that is unique for continuum of strikes and maturities, produces ranges of prices of illiquid derivatives when calibrated to finite data sets. iii) The above optimisation problem is not convex. Nonetheless, empirical experiments in Sections 5.1-5.2 demonstrate that the stochastic gradient decent methods used to minimise the loss functional D converges to the set of parameters for which calibrated error is of order 10 −5 to 10 −4 for the square loss function. Theoretical framework for analysing such algorithms is being developed in [Šiška and Szpruch, 2020].
iv) By augmenting classical risk models with modern machine learning approaches we are able to benefit from expressibility of neural networks while staying within realm of classical models, well understood by traders, risk managers and regulators. This mitigates, to some extent, the concerns that regulators have around use of black-box solutions to manage financial risk. Finally while our focus here is on SDE type models, the devised framework naturally extends to time-series type models.
The main methodological contributions of this work are as follows.
i) By leveraging martingale representation theorem we developed an efficient Monte Carlo based methods that simultaneously learns the model and the corresponding hedging strategy. ii) The calibration problem does not fit into classical framework of stochastic gradient algorithms, as the mini-batches of the gradient of the cost function are biased. We provide analysis of the bias and show how the inclusion of hedging strategies in training mitigates this bias. iii) We devise a novel, memory efficient randomised training procedure. The algorithm allows us to keep memory requirements constant, independently of the number of neural networks in neural SDEs. This is critical to efficiently calibrate to path dependent contingent claims. We provide theoretical analysis of our method in Section 4 and numerical experiment supporting the claims in Section 5.
The paper is organized as follows. In Section 2 we outline the exact optimization problem, introduce a deep neural network control variate (or hedging strategy), address the process of calibration to single/multiple option maturities and state the exact algorithms. In Section 3 we analyse the bias in Algorithms 1 and 2. In Section 4 we show that the novel, memory-efficient, drop-out-like training procedure for path-dependent derivatives does not introduce bias in the new estimator. Finally, the performance of Neural Local Volatility and Local Stochastic Volatility models is presented in Section 5. Some of the proofs and more detailed results from numerical experiments are relegated to the Appendix. The code used is available at github.com/msabvid/robust nsde.

ROBUST PRICING AND HEDGING
Let : R × R → [0, ∞) be a convex loss function such that min x∈R,y∈R (x, y) = 0. For example we can take (x, y) = |x − y| 2 . Given , our aim is to solve the following optimisation problems: i) Find model parameters θ * such that model prices match market prices: In practice this is equivalent to finding some θ * such that M i=1 (E Q(θ * ) [Φ i ], p(Φ i )) = 0. This is due to inherent overparametrization of Neural SDEs and the fact that ≥ 0 reaches minimum at zero. ii) Find model parameters θ l, * and θ u, * which provide robust arbitrage-free price bounds for an illiquid derivative, subject to available market data: (2. 2) The no-arbitrage price of Ψ over the class of neural SDEs used is then in E Q(θ l, * ) , E Q(θ u, * ) .
in probability. Moreover, the Central Limit Theorem tells us that where σ = Var[Φ] and z α/2 is such that 1 − CDF Z (z α/2 ) = α/2 with Z the standard normal distribution. We see that by increasing N , we reduce the width of the above confidence intervals, but this increases the overall computational cost. A better strategy is to find a good control variate i.e. we seek a random variable Φ cv such that: In the following we construct Φ cv using hedging strategy. Similar approach has recently been developed in [Vidales et al., 2018] in the context of pricing and hedging with deep networks. Martingale representation theorem (see for example Th. 14.5.1 in [Cohen and Elliott, 2015]) provides a general methodology for finding Monte Carlo estimators with the above stated properties (2.3).
If Φ is such that E Q [|Φ| 2 ] < ∞, then there exists a unique process Z = (Z t ) t adapted to the filtration and note that The process Z has more explicit representations using corresponding (possibly path dependent) backward Kolomogorov equation or Bismut-Elworthy-Li formula. Both approaches require further approximation, see [Vidales et al., 2018] and [Vidales et al., 2020]. Here, this approximation will be provided by an additional neural network. Without loss of generality assume that In the remaining of the paper, we will slightly abuse the notation to write Φ indistinctively as both the option and the mapping Consider now a neural network h : [0, T ] × C([0, T ], R d ) × R p → R d with parameters ξ ∈ R p with p ∈ N and define the following learning task, in which θ (the parameters on the Neural SDE model) is fixed: Find In a similar manner one can derive Ψ cv for the payoff of the illiquid derivative for which we seek the robust price bounds. Then (2.2) can be restated as (2.5) The learning problem (2.5) is better than (2.2) from the point of view of algorithmic implementation, as it will enjoy lower Monte Carlo variance and hence will require simulation of fewer paths of the Neural SDE in each step of the stochastic gradient algorithm. Furthermore, when using (2.5) we learn a (possibly abstract) hedging strategy for trading in the underlying asset to replicate the derivative payoff. Since the market may be incomplete this abstract hedging strategy may not be usable in practice. More precisely, since the process X θ will contain tradable as well as non-tradable assets, the control variate for the latter has to be adapted by either performing a projection or deriving a strategy for the corresponding tradable instrument.
To deduce a real hedging strategy recall that X θ = (S θ , V θ ) with S θ being the tradable assets and V θ the non-tradable components. Decompose the abstract hedging strategy as h = (h S , h V ).
then this is a real hedging strategy. Therefore, an alternative approach to (2.4), possibly yielding a better hedge, but worse variance reduction would be to consider finding for some other neural networkh. This is the version we present in Algorithms 1 and 2.
2.2. Time discretization. In order to implement the (2.5) we define partition π of [0, T ] as π := {t 0 , t 1 , . . . , t Nsteps = T }. We first approximate the stochastic integral in (2.4) with the appropriate Riemann sum. Depending on the choice of the neural network architecture approximating σ in the Neural SDE (1.1) we may have σ which grows super-linearly as a function of x. In such a case the moments of the classical Euler scheme are known blow up in the finite time, see [Hutzenthaler et al., 2011], even if moments of the solution to the SDE are finite. In order to avoid blow ups of moments of the simulated paths during training we apply tamed Euler method, see [Hutzenthaler et al., 2012, Szpruch andZhāng, 2018]. The tamed Euler scheme is given by 2.3. Algorithms. We now present the algorithm to calibrate the Neural SDE (1.1) to market prices of derivatives (Algorithm 1) and the algorithm to find robust price bounds for an illiquid derivative (Algorithm 2). Note that during training we aim to calibrate the SDE (1.1), and at the same time, adapt the abstract hedging strategy to minimise the variance (2.4). Therefore, we alternate two optimisations: i) During each epoch, we optimise the parameters θ of the Neural SDE, while the parameters of the hedging strategy ξ are fixed. In order to calculate the Monte Carlo estimator Nsteps n=0 , i = 1, . . . , N trn using tamed Euler scheme on (1.1). Furthermore, we create a copy of the generated paths, denoting them (x π,,i tn ) Nsteps n=0 := (s π,,i tn ,ṽ π,,i tn ) Nsteps n=0 such that eachx π,,i t k does not depend on θ anymore for the purposes of backward propagation when calculating the gradient. The paths (x π,,i tn )

Nsteps n=0
will be used as input to the parametrisation of the abstract hedging strategy h; as a result, in Algorithm 1 during this phase of the optimisation, the purpose of the hedging strategy is reducing the variance of E Q N (θ) [Φ cv ] in order to speed up the convergence of the gradient descent algorithm. ii) During each epoch, we optimise the parameters ξ of the parametrisation of the hedging strategy, while the parameters θ of the Neural SDE are fixed. In both Algorithms 1 and 2 as well as in the numerical experiments, we use the squared error for the nested loss function: (x, y) = |x − y| 2 . Furthermore, the calibration of the Neural SDE to market derivative prices with robust price bounds for illiquid derivative in Algorithm 2 is done using a constrained optimisation using the method of Augmented Lagrangian [Hestenes, 1969], with the update rule of the Lagrange multipliers specified in Algorithm 3.
2.4. Algorithm for multiple maturities. Algorithms 1 and 2 calibrate the SDE (5.3) to one set of derivatives. If the derivatives for which we have liquid market prices can be grouped by maturity, as is the case e.g. for call / put prices, we can use a more efficient algorithm to achieve the calibration.
This follows the natural approach used e.g. in [Cuchiero et al., 2020], and in [Vidales et al., 2018] in the context of learning PDEs, where the networks for b(t, X θ t , θ) and σ(t, X θ t , θ) are split Algorithm 1 Calibration to market European option prices for one maturity Input: π = {t 0 , t 1 , . . . , t Nsteps } time grid for numerical scheme.

ANALYSIS OF THE STOCHASTIC APPROXIMATION ALGORITHM FOR THE CALIBRATION
Nevertheless we know that the classical gradient algorithm, with the learning rates (η k ) ∞ k=1 , η k > 0 for all k, applied to this optimisation problem is given by Under suitable conditions on H and on η k , it is known that θ k converges to a minimiser of h, see [Benveniste et al., 2012]. As E[H(θ k )] can rarely be computed explicitly, the above algorithm is not practical and is replaced with stochastic gradient descent (SGD) given by are independent samples from the distribution of H(θ) and N ∈ N is the size of the mini-batch. In particular N could be one. The choice of a "good" estimator for E[H(θ)] in the context of stochastic gradient algorithms is an active research area research, see e.g. [Majka et al., 2020]. When the estimator of E[H(θ)] is unbiased, the SGD can be shown to converge to a minimum of h, [Benveniste et al., 2012].
3.2. Stochastic algorithm for the calibration problem. Recall that our overall objective in calibration is to minimize some J = J(θ) given by We write We differentiate J = J(θ) and work with the pathwise representation of this derivative (using language from [Glasserman, 2013]). For that we impose the following assumption.
Assumption 3.1. We assume that payoffs G : We refer reader to [Glasserman, 2013, chapter 7] for exact conditions when exchanging integration and differentiation is possible. We also remark that for the payoffs for which the Assumption 3.1 does not hold, one can use likelihood method and more generally Malliavin weights approach for computing greeks, [Fournié et al., 1999]. We don't pursue this here for simplicity.
Writing = (x, y), applying Assumption 3.1 and noting that Hence, if we wish to update θ to someθ in such a way that J is decreased then we need to take (for some γ > 0)θ If we had one network for each time step, leading to some resnet-like-network architecture for the time discretization then it may be more efficient to use a backward equation representation in the training. This representation can be derived using similar analysis as in [Jabir et al., 2019] (see also [Šiška and Szpruch, 2020]). Since the summation plays effectively no role in further analysis we will assume, without loss of generality, that M = 1 and work with the objective Then in the gradient step update we have Since is typically not an identity function, a mini-batch estimator of ∂ θ h(θ), obtained by replacing Q with Q N given by is a biased estimator of ∂ θ h. Nonetheless the bias can be estimated in terms of number of samples N and the variance. The fact the bias is controlled by the variance justifies why it is important to reduce the variance when calibrating the models with stochastic gradient algorithm. An alternative perspective is to view ∂ θ h N (θ) as non-linear function of Q N . It turns out that that there is a general theory studying smoothness and corresponding expansions of such functions of measures and we refer reader to [Chassagneux et al., 2019] for more details.
In Appendix A we provide a result on the bias for a general loss function. For the square loss function the bias is given below.
Theorem 3.2. Let Assumption 3.1 hold. Consider the family of neural SDEs (1.1). For (x, y) = |x − y| 2 , we have Proof. This is an immediate consequence of Theorem A.1.
Hence, we see that by reducing the variance of the first term we are also reducing the bias of the gradient. This justifies superiority of learning task (2.5) over (2.2).

ANALYSIS OF THE RANDOMISED TRAINING
4.1. Case of general cost function . While the idea of calibrating to one maturity at the time described in Section 2.4 works well if our aim is only to calibrate to vanilla options, it cannot be directly applied to learn robust bounds for path dependent derivatives, see (2.2). This is because the payoff of path dependent derivatives, in general, is not an affine function of maturity. On the other hand training all neural networks at every maturity all at once, makes every step of the gradient algorithm used for training computationally heavy.
In what follows we introduce a randomisation of the gradient so that at each step of the gradient algorithm the derivatives with respect to the network parameters are computed at only one maturity at the time while keeping parameters at all other maturities unchanged. This is similar to the popular dropout method, see [Srivastava et al., 2014], that is known to help with overfitting when training deep neural networks but for us the main aim is computational efficiency. Recall how we split the networks for drift and diffusion b(t, X θ Theorem 4.1. Assume ∂ x [b, σ](t, ·, θ) exists and is bounded with (t, θ) fixed and ∂ θ [b, σ](t, x, ·) exists and is bounded with , p(Φ)) and let its randomised gradient be In other words the randomised gradient is an unbiased estimator of (∂ θ h)(θ).
Less stringent assumption on derivatives of b and σ are possible, but we do not want to overburden the present article with technical details.
Proof. It is well known, e.g [Krylov, 1999, Kunita, 1997, that . We introduce process Z as follows Note that Hence the process E U Z θ t (U ) solves the same linear equation as ∂ θ X θ . As the equation has unique solution we conclude that , p(Φ)), and so Recall the randomised gradient Note that due to (4.1)

4.2.
Case of square loss function . Here we show that, in the special case when (x, y) = |x−y| p , randomised gradient as described in Section 4 is an unbiased estimator of the full gradient even in the case when Q is replaced by its empirical measure Q N . Consequently standard theory on stochastic approximation applies. We base the presentation on the case p = 2, as general case works in exact the same way. Let (Ω,F, (F t ) t∈[0,T ] ,P) be a copy of (Ω, F, (F t ) t∈[0,T ] , P). Then we write See also [Cuchiero et al., 2020] for the same observation. The gradient of h is given by To implement the above algorithm one simply needs to generate two independent sets of samples. Furthermore, is an unbiased estimator of (∂ θ h N )(θ).

TESTING NEURAL SDE CALIBRATIONS
All algorithms were implemented using PYTORCH, see [Paszke et al., 2017] and [Paszke et al., 2019]. The code used is available at github.com/msabvid/robust nsde. Our target data (European option prices for various strikes and maturities) is described in Appendix B. We assume that there is one traded asset S = (S t ) t∈[0,T ] . We calibrate to European option prices for maturities of 2, 4, . . . , 12 months and typically 21 uniformly spaced strikes between in [0.8, 1.2].
As an example of an illiquid derivative for which we wish to find robust bounds we take the lookback option

5.1.
Local volatility neural SDE model. In this section we consider a Local Volatility (LV) Neural SDE model. It has been shown by [Dupire et al., 1994] (see also [Gyöngy, 1986]) that if the market data would consist of a continuum of call / put prices for all strikes and maturities then there is a unique function σ such that with the price process dS t = rS t dt + S t σ(t, S t )dW t , S 0 = 1 (5.1) the model prices and market prices match exactly. In practice only some calls / put prices are liquid in the market and so to apply [Dupire et al., 1994] one has to interpolate, in an arbitrage free way, the missing data. The choice of interpolation method is a further modelling choice on top of the one already made by postulating that the risky asset evolution is governed by (5.1).
We will use a Neural SDE instead of directly interpolating the missing data. Let our LV Neural SDE model be given by where S θ t ≥ 0, S θ 0 = 1 and σ : [0, T ] × R × R p → R + allows us to calibrate the model to observed market prices.

5.2.
Local stochastic volatility neural SDE model. In this section we consider a Local Stochastic Volatility (LSV) Neural SDE model. See, for example, [Tian et al., 2015]. As in the Local Volatility Neural SDE model (5.2), we have the risky asset price price process (S t ) t∈[0,T ] , where the drift is equal to the risk-free bond rate r. However, the volatility function in the LSV Neural SDE model now depends on t, S t and a stochastic process is not a traded asset. The model is then given by where θ := {ν, φ, ϕ, v 0 , ρ}, ρ, v 0 ∈ R, as the set of (multi-dimensional) parameters that we aim to optimise so that the model is calibrated to the observed market data.

5.3.
Deep learning setting for the LV and LSV neural SDE models. In the SDE (5.2) the function σ and the SDE (5.3) the functions σ S , b V and σ V are parametrised by one feed-forward neural network per maturity (see Section 2.4 and Appendix C) with 4 hidden layers with 50 neurons in each layer. The non-linear activation function used in each of the hidden layers is the linear rectifier relu. In addition, in σ S and σ V after the output layer we apply the non-linear rectifier softplus(x) = log(1 + exp(x)) to ensure a positive output. The parameterisation of the hedging strategy for the vanilla option prices is also a feed-forward linear network with 3 hidden layers, 20 neurons per hidden layer and relu activation functions. However, in order to get one hedging strategy per vanilla option considered in the market data, the output of h(t k , s i t k ,θ , ξ K j ) has as many neurons as strikes and maturities. Finally, the parameterisation of the hedging strategy for the exotic options price is also a feedforward network with 3 hidden layers, 20 neurons per hidden layer and relu activation functions.
The Neural SDEs (5.2) and (5.3) were discretized using the tamed Euler scheme (2.7) with N steps = 8 × 12 uniform time steps for T = 1 year (i.e. 16 for every 2 months). The number of Monte Carlo trajectories in each stochastic gradient descent iteration was N = 4 × 10 4 and the abstract hedging strategy was used as a control variate.
Finally in the evaluation of the calibrated Neural SDE, the option prices are calculated using N = 4×10 5 trajectories of the calibrated Neural SDEs, which we generated with 2×10 5 Brownian paths and their antithetic paths; in addition we also used the learned hedging strategies to calculate the Monte Carlo estimators with lower variance E Q(θ) [Φ cv i ] and E Q(θ) [Ψ cv ].

Conclusions from calibrating for LV neural SDE.
Each calibration is run 10 times with different initialisations of the network parameters, with the goal to check the robustness of the exotic option price E Q(θ) [Ψ] for each calibrated Neural SDE. The blue boxplots in Figure 5.1 provide different quantiles for the exotic option price E Q(θ) [Ψ] and the obtained bounds after running We make the following observations from calibrating LV Neural SDE: i) It is possible to obtain high accuracy of calibration with MSE of about 10 −9 for 6 month maturity, about 10 −8 for 12 month maturity when the only target is to fit market data. If we are minimizing / maximizing the illiquid derivative price at the same time then the MSE increases somewhat so that it is about 10 −8 for both 6 and 12 month maturities. See Figure 5.1. The calibration has been performed using K = 21 strikes. ii) The calibration is accurate not only in MSE on prices but also on individual implied volatility curves, see Figure 5.2 and others in Appendix D. iii) As we increase the number of strikes per maturity the range of possible values for the illiquid derivative narrows. See Figure F.1 and Tables 1, 2, 3 and 4. The conjecture is that as the number of strikes (and maturities) would increase to infinity we would recover the unique σ given by the Dupire formula that fits the continuum of European option prices. iv) With limited amount of market data (which is closer to practical applications) even the LV Neural SDE produces noticeable ranges for prices of illiquid derivatives, see again Figure 5.1.
In Appendix F we provide more details on how different random seeds, different constrained optimization algorithms and different number of strikes used in the market data input affect the illiquid derivative price.  In Appendix D we present market price and implied volatility fit for constrained and unconstrained calibrations. High level of accuracy in all calibrations is achieved due to the hedging neural network incorporated into model training. 5.5. Conclusions from calibrating for LSV neural SDE. Each calibration is run ten times with different initialisations of the network parameters, with the goal to check the robustness of the exotic option price E Q(θ) [Ψ] for each calibrated Neural SDE. The blue boxplots in Figure 5.3 provide different quantiles for the exotic option price E Q(θ) [Ψ] and the obtained bounds after running all the experiments 10 times. We make the following observations from calibrating LSV Neural SDE: i) We note that our methods achieve high calibration accuracy to the market data (measured by MSE) with consistent bounds on the exotic option prices. See Figure 5.3. ii) The calibration is accurate not only in MSE on prices but also on individual implied volatility curves, see Figure 5.4 and others in Appendix E. iii) The LSV Neural SDE produces noticeable ranges for prices of illiquid derivatives, see again  5.6. Hedging strategy evaluation. We calculate the error of the portfolio hedging strategy of the lookback option at maturity T = 6 months, given by the empirical variance The histogram in Figure 5.6 is calculated on N = 400 000 different paths and provides the values of s, We obtain E N [s 2 ] = 1.6 × 10 −3 . Finally, we study the effect of the control variate parametrisation on the learning speed in Algorithm 1. Figure 5.6 displays the evolution of the Root Mean Squared Error of two runs of calibration to market vanilla option prices for two-months maturity: the blue line using Algorithm 1 with simultaneous learning of the hedging strategy, and the orange line without the hedging strategy. We recall that from Section 2.4, the Monte Carlo estimator ∂ θ h N (θ) is a biased estimator of ∂ θ h(θ) An upper bound of the bias is given by Corollary 3.2, that shows that by reducing the variance of Monte Carlo estimator of the option price then the bias of ∂ θ h N (θ) is also reduced, yielding better convergence behaviour of the stochastic approximation algorithm. This can be observed in Figure 5 Šiška, D., and Szpruch, L. (2020). Learning solutions to path dependent PDEs with signatures and LSTM networks. In preparation.

APPENDIX A. BOUND ON BIAS IN GRADIENT DESCENT
We complete the analysis from Section 3.2 for a general loss function here.
Theorem A.1. Let Assumption 3.1 hold. Consider the family of neural SDEs (1.1). We have If in addition we assume that the loss function is three times differentiable in the first variable with all its derivatives bounded, then Next, by adding and subtracting ∂ x (E Q [Φ cv (X θ )], p(Φ)) and using the Cauchy-Schwarz inequality we have This concludes the proof of (A.1). To prove (A.2), we view ∂ θ h N (θ) as function of ) and expand into its Taylor series around Hence, using Cauchy-Schwarz inequality The proof is complete.

APPENDIX B. DATA USED IN CALIBRATION
We used Heston model to generate prices of calls and puts. The model is It is well know that for this model a semi-analytic formula can be used to calculate option prices, see [Heston, 1997] but also [Albrecher et al., 2007]. The choice of parameters below was used to generate target model calibration prices. Options with bi-monthly maturities up to one year with varying range of strikes were used as market data for Neural SDE calibration. The call / put option prices were obtained from the Heston model using Monte Carlo simulation with 10 7 Brownian trajectories. We use bimonthly maturities up to one year for considered calibrations. Varying range of strikes is used among different calibrations. See Figure B.1 for the resulting "market" data.

APPENDIX C. FEED-FORWARD NEURAL NETWORKS
Feed-forward neural networks are functions constructed by composition of affine map and non-linear activation function. We fix a locally Lipschitz activation function a : R → R as ReLU function a(z) = (0, z) + and for d ∈ N define A d : R d → R d as the function given, for . We fix L ∈ N (the number of layers), l k ∈ N, k = 0, 1, . . . L − 1 (the size of input to layer k) and l L ∈ N (the size of the network output). A fully connected artificial neural network is then given by θ = ((W 1 , B 1 ), . . . , (W L , B L )), where, for k = 1, . . . , L, we have real l k−1 × l k matrices W k and real l k dimensional vectors B k . The artificial neural network defines a function R(·, θ) : R l 0 → R l L given recursively, for We will call such class of fully connected artificial neural networks DN . Note that since the activation functions and architecture are fixed the learning task entails finding the optimal θ ∈ R P where p is the number of parameters in θ given by    .174 TABLE 1. Impact of initialisation and constrained optimization algorithms on prices of an illiquid derivative (lookback call) implied by LV neural SDE calibrated to vanilla prices with K = 11 strikes: k 1 = 0.9, k 2 = 0.92, ..., k 11 = 1.1 for each maturity.