betaFeedback

WorksComputer Science

Adversarial Training for Deep Hedging in Nonstationary Markets

Abstract

Deep hedging learns trading policies from historical or simulated market trajectories, yet under nonstationarity these training paths may not represent future market conditions. We propose WRAP (Wasserstein-Reweighting Adversarial Perturbation), a drift-aware adversarial training framework derived from a two-budget distributionally robust optimization (DRO) formulation. The formulation is anchored to a weighted empirical reference distribution whose fixed baseline weights are chosen to balance sampling uncertainty against temporal drift. Around this reference distribution, the ambiguity set addresses two complementary forms of distributional misspecification by allowing an adversary to reweight the observed trajectories subject to a ϕϕ-divergence constraint and perturb their paths subject to an optimal-transport (OT) constraint. We derive a joint first-order expansion in which the leading-order increase over the nominal expected loss decomposes into a reweighting contribution determined by the dispersion of hedging losses across trajectories and a transport contribution determined by the sensitivity of the loss to path perturbations. This expansion yields an explicit finite-dimensional adversarial attack that replaces the distributional inner supremum with a tractable first-order approximation. Across stationary and nonstationary Heston dynamics and a generalized affine diffusion (GAD), the experiments show complementary benefits from reweighting and transport, with joint adversarial training providing the largest gains under nonstationarity.

Introduction

A hedging strategy dynamically trades financial assets to reduce the risk associated with a contingent claim. Deep hedging parameterizes such strategies with neural networks and learns the resulting sequence of trading decisions from simulated or historical market trajectories [15]. The out-of-sample performance of the learned policy therefore depends critically on whether the training distribution represents the market conditions encountered over the hedging horizon. Unlike a static prediction, a hedge consists of a sequence of state-dependent trading decisions, so changes in market dynamics may affect positions throughout the life of the claim [17, 25]. A policy may consequently achieve a low in-sample hedging loss yet remain vulnerable to market dynamics poorly represented in the training data.

Corresponding author: [email protected]

Distributionally robust optimization (DRO) and adversarial training protect a policy against perturbations around a prespecified empirical distribution. Maintaining a representative training distribution is particularly difficult under nonstationarity, where returns, volatility, and dependence structures evolve over time [44, 1, 16]. A larger historical sample reduces sampling uncertainty but also includes older observations that may be less representative of the next hedging period, whereas emphasizing recent observations improves temporal relevance at the cost of greater sampling variability. Constructing the reference distribution entails a fundamental trade-off between statistical precision and temporal relevance. Robust deep hedging under nonstationarity must therefore address two questions: how should the reference distribution be constructed from temporally heterogeneous observations, and how should the hedge be protected against residual misspecification around that distribution?

We distinguish three channels through which the training distribution may fail to represent the next hedging period. First, historical trajectories differ in their temporal relevance, as older observations may be less informative about future market dynamics. Second, the reference distribution may assign inappropriate probability mass to the sampled trajectories or the regimes they represent. Third, future trajectories may differ from those observed in the training sample. We address these channels through non-uniform baseline weights, adversarial probability reweighting, and optimal-transport perturbations, respectively. The baseline weights are selected independently of the hedging losses and determine the drift-aware center of the ambiguity set. Adversarial reweighting depends on the current policy and reallocates probability mass toward trajectories on which that policy incurs high losses, whereas optimal-transport perturbations move the trajectories themselves in locally adverse directions. These three components constitute our main contributions, summarized as follows.

Drift-aware reference distributions for deep hedging. We provide a statistical foundation for constructing reference distributions from nonstationary market data. Our finite-sample guarantees separate sampling uncertainty, governed by the effective sample size induced by the baseline weights, from temporal misspecification, governed by a weighted drift index that captures the influence assigned to older observations. This decomposition formalizes the trade-off between statistical precision and temporal relevance and provides a basis for calibrating the Wasserstein radius to both weight concentration and temporal drift.

First-order expansion of the robust objective. We derive a joint first-order expansion of the worst-case hedging loss under probability and trajectory misspecification. The expansion shows that the ϕ\phi-divergence component penalizes the dispersion of hedging losses across trajectories (variance), whereas the optimal-transport component penalizes the sensitivity of the hedging loss to perturbations of market paths (variation). We further show that a structured empirical attack attains the same first-order value as the full two-budget robust problem.

WRAP: two-budget distributional adversarial training. Building on this expansion, we introduce the Wasserstein–Reweighting Adversarial Perturbation (WRAP), an implementable training method for the two-budget robust problem. The two budgets govern complementary deviations from the drift-aware reference distribution: adversarial probability reweighting and trajectory perturbations. The latter are defined through a time- and component-weighted ground metric that permits separate scaling across trading dates and market variables. We derive a one-step attack from the first-order solution and study a multistep variant that iteratively refines the adversarial distribution.

Existing approaches address individual components of this problem. Closest to our setting, He et al. [28] develop Wasserstein attacks for deep hedging, Keehan et al. [30] construct drift-aware Wasserstein sets around weighted empirical laws, and Namkoong & Duchi [39] use ϕ\phi-divergence DRO to adversarially reweight fixed empirical observations.

Several approaches combine likelihood and optimal-transport perturbations, including holistic robustness, joint OT–divergence constructions, and OT-regularized divergences [9, 14, 35, 12]. We derive a joint first-order expansion for a sequential, path-dependent objective and construct an explicit transport-and-reweighting attack that is first-order accurate for the full DRO problem. Appendix § 9 provides the extended literature discussion.

Deep Hedging Under Nonstationarity

We consider a discrete-time financial market with trading dates t=0,…,Tt = 0, \ldots, T. The market contains rr tradable assets with price process S=(St)t=0TS = (S_t)_{t=0}^{T}, where St∈RrS_t \in\mathbb{R}^{r}. The observed market process X=(Xt)t=0TX = (X_t)_{t=0}^{T} is a random element of an admissible trajectory space Ξ⊆Rd(T+1)\Xi\subseteq\mathbb{R}^{d(T+1)}. Here Xt∈RdX_t \in\mathbb{R}^{d} contains the tradable asset prices together with any exogenous market features used for hedging, such as volatility estimates or macroeconomic indicators; in particular, d≥rd \ge r. We take StS_t to be the first rr components of XtX_t and write X0:t:=(X0,…,Xt)X_{0:t} := (X_0, \ldots, X_t). Given NN observed or simulated market trajectories, we denote the nn-th trajectory by Xn=(Xn,0,…,Xn,T)∈ΞX_n = (X_{n,0}, \ldots, X_{n,T}) \in\Xi.

The agent aims to hedge a contingent claim with terminal payoff function Φ:Ξ→R\Phi: \Xi\to\mathbb{R} at maturity. Let θ=(θ0,…,θT−1)∈Θ⊆RkT\theta= (\theta_0, \ldots, \theta_{T-1}) \in\Theta\subseteq\mathbb{R}^{kT} parametrize TT neural networks. At time t=0,…,T−1t = 0, \ldots, T-1, the network parametrized by θt\theta_t maps X0:tX_{0:t} to holdings δtθ(X0:t)∈Rr\delta^{\theta}_{t}(X_{0:t}) \in\mathbb{R}^{r} and thus depends on θ\theta only through θt\theta_t. Since each decision depends only on the observed history X0:tX_{0:t}, the strategy is non-anticipative and fully characterized by θ∈Θ\theta\in\Theta. Assuming a self-financing strategy and a fixed initial premium p0∈Rp_0 \in\mathbb{R} for selling the derivative, the terminal profit and loss (PnL) is given by

PnL⁡(θ,X)=p0+∑t=0T−1δtθ(X0:t)T(St+1−St)−Φ(X).(1)\operatorname{PnL}(\theta, X) = p_0 + \sum_{t=0}^{T-1} \delta^{\theta}_{t}(X_{0:t})^{\mathsf{T}}(S_{t+1} - S_t) - \Phi(X). \tag*{(1)}

Following Buehler et al. [15], the risk of the terminal profit and loss ZZ is assessed through an Optimized Certainty Equivalent (OCE) risk measure [6, 7],

ρ(Z)=inf⁡m∈R{m+E[ℓ(−Z−m)]},(2)\rho(Z) = \inf_{m \in\mathbb{R}} \left\{m + \mathbb{E}\left[\ell(-Z-m)\right]\right\}, \tag*{(2)}

where ℓ:R→R\ell: \mathbb{R} \to\mathbb{R} is a convex, nondecreasing loss function satisfying ℓ(0)=0\ell(0) = 0 and ℓ(u)≥u\ell(u) \ge u for all u∈Ru \in\mathbb{R}. To train a hedging policy, we optimize jointly over the hedging network parameters and the OCE offset by setting ϑ=(θ,m)∈Θ×R\vartheta= (\theta, m) \in\Theta\times\mathbb{R} and defining the pathwise deep-hedging loss

ℓDH(ϑ;X):=m+ℓ(−PnL⁡(θ,X)−m).(3)\ell_{\mathrm{DH}}(\vartheta; X) := m + \ell(-\operatorname{PnL}(\theta, X) - m). \tag*{(3)}

The numerical experiments consider Conditional Value at Risk (CVaR) and entropic risk (cf. Appendix § 12.§ 1). Let P(Ξ)\mathcal{P}(\Xi) denote the set of Borel probability measures on Ξ\Xi. For a reference measure μ∈P(Ξ)\mu\in\mathcal{P}(\Xi), we train a nominal deep-hedging model by optimizing

min⁡ϑ∈Θ×REX∼μ[ℓDH(ϑ;X)].(4)\min_{\vartheta\in\Theta\times\mathbb{R}} \mathbb{E}_{X \sim\mu}\left[\ell_{\mathrm{DH}}(\vartheta; X)\right]. \tag*{(4)}

Further details on the market setup and regularity are provided in Appendix § 10.§ 1.

Trajectory Space and Wasserstein Robust Value

The training problem in (4) evaluates the hedge under a fixed reference law μ\mu. To account for distribution shifts and sampling error, we replace this fixed law with a Wasserstein ambiguity set centered at μ\mu. Specifying the Wasserstein ambiguity set requires a transportation cost between market trajectories. We therefore equip the admissible trajectory set Ξ⊆Rd(T+1)\Xi\subseteq\mathbb{R}^{d(T+1)} with an anisotropic path metric that allows these costs to vary across market variables and trading dates. Let p∈(1,∞)p \in(1,\infty), fix time weights κt>0\kappa_t > 0 for t=0,…,Tt = 0,\ldots,T, and component scales λi>0\lambda_i > 0 for i=1,…,di = 1,\ldots,d. For an observed trajectory X∈ΞX \in\Xi and a perturbed trajectory X^∈Ξ\widehat{X} \in\Xi, define

dκ,λ(X,X^):=(∑i=1d(λimax⁡t=0,…,Tκt∣Xti−X^ti∣)p)1/p.(5)d_{\kappa,\lambda}(X,\widehat{X}) := \left(\sum_{i=1}^{d}\left(\lambda_i\max_{t=0,\ldots,T}\kappa_t\left|X_t^i-\widehat{X}_t^i\right|\right)^p\right)^{1/p}. \tag*{(5)}

The inner ℓ∞\ell_\infty term measures the largest weighted displacement over time within each component, while the outer ℓp\ell_p norm aggregates these component-wise displacements. The scales λi\lambda_i and weights κt\kappa_t control how perturbations across market variables and trading dates enter the transportation cost. We impose the following condition on the resulting metric space, which ensures finite pp-th moments for all probability laws on Ξ\Xi with respect to dκ,λd_{\kappa,\lambda}.

Assumption 2.1 (Path space). The admissible trajectory set Ξ\Xi, equipped with the metric dκ,λd_{\kappa,\lambda} in (5), is a Polish metric space with finite diameter: diam⁡κ,λ(Ξ):=sup⁡X,X^∈Ξdκ,λ(X,X^)<∞\operatorname{diam}_{\kappa,\lambda}(\Xi) := \sup_{X,\widehat{X}\in\Xi} d_{\kappa,\lambda}(X,\widehat{X}) < \infty.

For p∈(1,∞]p \in(1,\infty], let WpW_p denote the pp-Wasserstein distance induced by dκ,λd_{\kappa,\lambda}. For a reference law μ∈P(Ξ)\mu\in\mathcal{P}(\Xi) and radius ε≥0\varepsilon\ge0, define the Wasserstein ambiguity set as the ball Bε(μ):={η∈P(Ξ):Wp(η,μ)≤ε}\mathcal{B}_\varepsilon(\mu):=\{\eta\in\mathcal{P}(\Xi): W_p(\eta,\mu) \le\varepsilon\}. The Wasserstein robust value VϑV_\vartheta and the associated deep-hedging problem are

inf⁡ϑ∈Θ×R{Vϑ(ε):=sup⁡η∈Bε(μ)EX∼η[ℓDH(ϑ;X)]}.(6)\inf_{\vartheta\in\Theta\times\mathbb{R}}\left\{V_\vartheta(\varepsilon):=\sup_{\eta\in\mathcal{B}_\varepsilon(\mu)}\mathbb{E}_{X\sim\eta}\left[\ell_{\mathrm{DH}}(\vartheta;X)\right]\right\}. \tag*{(6)}

Drift-Aware Coverage of the Next-Period Market Law

Under temporal nonstationarity, the reference law and Wasserstein radius should reflect the evolution of the data-generating distribution. Let X1,…,XN∈ΞX_1,\ldots,X_N \in\Xi denote historical trajectories ordered from oldest to most recent, with Xn∼Pn∈P(Ξ)X_n \sim P_n \in\mathcal{P}(\Xi), and let PN+1P_{N+1} denote the unknown next-period market law. We model temporal drift through a uniform bound ϱ\varrho on one-step changes in the market law.

Assumption 2.2 (Nonstationary sampling and bounded drift). The trajectories X1,…,XNX_1,\ldots,X_N are independent, with Xn∼PnX_n \sim P_n for n=1,…,Nn=1,\ldots,N. Moreover, there exists ϱ≥0\varrho\ge0 such that

W∞(Pn,Pn+1)≤ϱ,n=1,…,N.W_\infty(P_n,P_{n+1}) \le\varrho,\qquad n=1,\ldots,N.

References

  1. [1]Andrew Ang and Allan Timmermann. Regime changes and financial markets. Annual Review of Financial Economics, 4(1):313–337, 2012.
  2. [2]M. Avellaneda, A. Levy, and A. Parás. Pricing and hedging derivative securities in markets with uncertain volatilities. Applied Mathematical Finance, 2(2):73–88, 1995.DOI
  3. [3]Xingjian Bai, Guangyi He, Yifan Jiang, and Jan Obłoj. Wasserstein distributional robustness of neural networks. In Advances in Neural Information Processing Systems, volume 36, pp. 26322–26347, 2023.arxiv.org/abs/2306.09844
  4. [4]Daniel Bartl, Samuel Drapeau, Jan Obłój, and Johannes Wiesel. Sensitivity analysis of Wasserstein distributionally robust optimization problems. Proceedings of the Royal Society A, 477(2256):20210176, 2021.DOI
  5. [5]Güzin Bayraksan and David K Love. Data-driven stochastic programming using phi-divergences. In The Operations Research Revolution, INFORMS TutORials in Operations Research, pp. 1–19. INFORMS, 2015.DOI
  6. [6]Aharon Ben-Tal and Marc Teboulle. Expected utility, penalty functions, and duality in stochastic nonlinear programming. Management Science, 32(11):1445–1466, 1986.
  7. [7]Aharon Ben-Tal and Marc Teboulle. An old-new concept of convex risk measures: The optimized certainty equivalent. Mathematical Finance, 17(3):449–476, 2007.
  8. [8]Aharon Ben-Tal, Dick Den Hertog, Anja De Waegenaere, Bertrand Melenberg, and Gijs Rennen. Robust solutions of optimization problems affected by uncertain probabilities. Management Science, 59(2):341–357, 2013.
  9. [9]Amine Bennouna, Bart Van Parys, and Ryan Lucas. Holistic robust data-driven decisions. arXiv preprint arXiv:2207.09560, 2022.arxiv.org/abs/2207.09560
  10. [10]Amine Bennouna, Ryan Lucas, and Bart Van Parys. Certified robust neural networks: Generalization and corruption resistance. In International Conference on Machine Learning, pp. 2092–2112. PMLR, 2023.arxiv.org/abs/2303.02251
  11. [11]Omar Besbes, Yonatan Gur, and Assaf Zeevi. Non-stationary stochastic optimization. Operations Research, 63(5):1227–1244, 2015.
  12. [12]Jeremiah Birrell and Reza Ebrahimi. Optimal transport regularized divergences: Application to adversarial robustness. SIAM Journal on Mathematics of Data Science, 7(4):1801–1827, 2025.arxiv.org/abs/2309.03791
  13. [13]Jose Blanchet and Karthyek Murthy. Quantifying distributional model risk via optimal transport. Mathematics of Operations Research, 44(2):565–600, 2019.arxiv.org/abs/1604.01446
  14. [14]Jose Blanchet, Daniel Kuhn, Jiajin Li, and Bahar Taskesen. Unifying distributionally robust optimization via optimal transport theory. arXiv preprint arXiv:2308.05414, 2023.arxiv.org/abs/2308.05414
  15. [15]Hans Buehler, Lukas Gonon, Josef Teichmann, and Ben Wood. Deep hedging. Quantitative Finance, 19(8):1271–1291, 2019.
  16. [16]Agostino Capponi, Chengpiao Huang, J Antonio Sidaoui, Kaizheng Wang, and Jiacheng Zou. The nonstationarity-complexity tradeoff in return prediction. arXiv preprint arXiv:2512.23596, 2025.arxiv.org/abs/2512.23596
  17. [17]Rama Cont. Model uncertainty and its impact on the pricing of derivative instruments. Mathematical Finance, 16(3):519–547, 2006.
  18. [18]Rama Cont, Mihai Cucuringu, Renyuan Xu, and Chao Zhang. Tail-GAN: Learning to simulate tail risk scenarios. Management Science, 72(4):2917–2936, 2025.
  19. [19]John Duchi, Tatsunori Hashimoto, and Hongseok Namkoong. Distributionally robust losses for latent covariate mixtures. Operations Research, 71(2):649–664, 2023.arxiv.org/abs/2007.13982
  20. [20]John C Duchi, Peter W Glynn, and Hongseok Namkoong. Statistics of robust optimization: A generalized empirical likelihood approach. Mathematics of Operations Research, 46(3):946–969, 2021.arxiv.org/abs/1610.03425
  21. [21]Darrell Duffie, Damir Filipović, and Walter Schachermayer. Affine processes and applications in finance. Annals of Applied Probability, 13(3):984–1053, 2003.
  22. [23]Rui Gao and Anton J. Kleywegt. Distributionally robust stochastic optimization with Wasserstein distance. Mathematics of Operations Research, 48(2):603–655, 2023.arxiv.org/abs/1604.02199
  23. [24]Rui Gao, Xi Chen, and Anton J. Kleywegt. Wasserstein distributionally robust optimization and variation regularization. Operations Research, 72(3):1177–1191, 2022.arxiv.org/abs/1712.06050
  24. [25]Paul Glasserman and Xingbo Xu. Robust risk measurement and model risk. Quantitative Finance, 14(1):29–58, 2014.DOI
  25. [26]Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015.arxiv.org/abs/1412.6572
  26. [28]Guangyi He, Tobias Sutter, and Lukas Gonon. Distributional adversarial attacks and training in deep hedging. In Advances in Neural Information Processing Systems, volume 38, pp. 131893–131925, 2025.arxiv.org/abs/2508.14757
  27. [29]Steven L. Heston. A closed-form solution for options with stochastic volatility with applications to bond and currency options. Review of Financial Studies, 6(2):327–343, 1993.
  28. [30]Dominic ST Keehan, Edward J Anderson, and Wolfram Wiesemann. Don’t look back in anger: Wasserstein distributionally robust optimization with nonstationary data. arXiv preprint arXiv:2510.18566, 2025.arxiv.org/abs/2510.18566
  29. [31]Daniel Kuhn, Soroosh Shafiee, and Wolfram Wiesemann. Distributionally robust optimization. Acta Numerica, 34:579–804, 2025.DOI
  30. [32]Henry Lam. Robust sensitivity analysis for stochastic systems. Mathematics of Operations Research, 41(4):1248–1275, 2016.arxiv.org/abs/1303.0326
  31. [33]Henry Lam. Recovering best statistical guarantees via the empirical divergence-based distributionally robust optimization. Operations Research, 67(4):1090–1105, 2019.arxiv.org/abs/1605.09349
  32. [34]Yannick Limmer and Blanka Horvath. Robust hedging GANs: Towards automated robustification of hedging strategies. Applied Mathematical Finance, 31(3):164–201, 2024.DOI
  33. [35]Zhenyuan Liu, Bart PG Van Parys, and Henry Lam. Smoothed f-divergence distributionally robust optimization. arXiv preprint arXiv:2306.14041, 2023.arxiv.org/abs/2306.14041
  34. [36]Eva Lütkebohmert, Thorsten Schmidt, and Julian Sester. Robust deep hedging. Quantitative Finance, 22(8):1465–1480, 2022.
  35. [37]Terry J Lyons. Uncertain volatility and the risk-free synthesis of derivatives. Applied Mathematical Finance, 2(2):117–133, 1995.DOI
  36. [38]Peyman Mohajerin Esfahani and Daniel Kuhn. Data-driven distributionally robust optimization using the Wasserstein metric: Performance guarantees and tractable reformulations. Mathematical Programming, 171(1):115–166, 2018.arxiv.org/abs/1505.05116
  37. [39]Hongseok Namkoong and John C Duchi. Stochastic gradient methods for distributionally robust optimization with f-divergences. In Advances in Neural Information Processing Systems, volume 29, pp. 2208–2216, 2016.
  38. [40]R Tyrrell Rockafellar and Stanislav Uryasev. Optimization of conditional value-at-risk. Journal of Risk, 2(3):21–41, 2000.DOI
  39. [41]R Tyrrell Rockafellar and Stanislav Uryasev. Conditional value-at-risk for general loss distributions. Journal of Banking & Finance, 26(7):1443–1471, 2002.DOI
  40. [43]Aman Sinha, Hongseok Namkoong, and John Duchi. Certifying some distributional robustness with principled adversarial training. In International Conference on Learning Representations, 2018.arxiv.org/abs/1710.10571
  41. [44]Cătălin Stărică and Clive Granger. Nonstationarities in stock returns. Review of Economics and Statistics, 87(3):503–522, 2005.DOI
  42. [45]Bart PG Van Parys, Peyman Mohajerin Esfahani, and Daniel Kuhn. From data to decisions: Distributionally robust optimization is optimal. Management Science, 67(6):3387–3402, 2021.arxiv.org/abs/1704.04118
  43. [46]Jie Wang, Rui Gao, and Yao Xie. Sinkhorn distributionally robust optimization. Operations Research, 74(3):1581–1603, 2025.
  44. [47]Magnus Wiese, Robert Knobloch, Ralf Korn, and Peter Kretschmer. Quant GANs: Deep generation of financial time series. Quantitative Finance, 20(9):1419–1440, 2020.
  45. [48]David Wu and Sebastian Jaimungal. Robust risk-aware option hedging. Applied Mathematical Finance, 30(3):153–174, 2023.arxiv.org/abs/2303.15216

Paper details

vlnc:W_6fqv42xe
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

generative AI tools

View statement
Looking for related papers…
Contents