IDEAS home Printed from https://ideas.repec.org/a/eee/apmaco/v510y2026ics0096300325004059.html

On deep learning for computing the dynamic initial margin and margin value adjustment

Author

Listed:
  • Villarino, Joel P.
  • Leitao, Alvaro

Abstract

The present work addresses the challenge of training neural networks for Dynamic Initial Margin (DIM) computation in counterparty credit risk, a task traditionally burdened by the high costs associated with generating training datasets through nested Monte Carlo (MC) simulations. By condensing the initial market state variables into an input vector, determined through an interest rate model and a parsimonious parameterization of the current interest rate term structure, we construct a training dataset where the labels are future realizations, generated with a single MC path, of the Initial Margin (IM) variable. Since DIM is defined as the conditional expectation of IM, the latter can be understood as noisy and unbiased samples of DIM, allowing the application of deep learning regression techniques to its computation. To this end, a multi-output neural network structure is employed to handle DIM as a time-dependent function, facilitating training across a mesh of monitoring times. This methodology offers significant advantages: it reduces the dataset generation cost to a single MC execution and parameterizes the neural network by initial market state variables, obviating the need for repeated training. Experimental results demonstrate the approach’s convergence properties and robustness across different interest rate models (Hull-White and Cox-Ingersoll-Ross) and portfolio complexities, validating its general applicability and efficiency in more realistic scenarios.

Suggested Citation

  • Villarino, Joel P. & Leitao, Alvaro, 2026. "On deep learning for computing the dynamic initial margin and margin value adjustment," Applied Mathematics and Computation, Elsevier, vol. 510(C).
  • Handle: RePEc:eee:apmaco:v:510:y:2026:i:c:s0096300325004059
    DOI: 10.1016/j.amc.2025.129679
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0096300325004059
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.amc.2025.129679?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to

    for a different version of it.

    References listed on IDEAS

    as
    1. Longstaff, Francis A & Schwartz, Eduardo S, 2001. "Valuing American Options by Simulation: A Simple Least-Squares Approach," The Review of Financial Studies, Society for Financial Studies, vol. 14(1), pages 113-147.
    2. Francisco G'omez Casanova & 'Alvaro Leitao & Fernando de Lope Contreras & Carlos V'azquez, 2024. "Deep Joint Learning valuation of Bermudan Swaptions," Papers 2404.11257, arXiv.org.
    3. J. Michael Harrison & Stanley R. Pliska, 1981. "Martingales and Stochastic Integrals in the Theory of Continous Trading," Discussion Papers 454, Northwestern University, Center for Mathematical Studies in Economics and Management Science.
    4. Damiano Brigo & Agostino Capponi & Andrea Pallavicini, 2014. "Arbitrage-Free Bilateral Counterparty Risk Valuation Under Collateralization And Application To Credit Default Swaps," Mathematical Finance, Wiley Blackwell, vol. 24(1), pages 125-146, January.
    5. Harrison, J. Michael & Pliska, Stanley R., 1981. "Martingales and stochastic integrals in the theory of continuous trading," Stochastic Processes and their Applications, Elsevier, vol. 11(3), pages 215-260, August.
    6. J. H. Hoencamp & S. Jain & B. D. Kandhai, 2024. "A static replication approach for callable interest rate derivatives: mathematical foundations and efficient estimation of SIMM–MVA," Quantitative Finance, Taylor & Francis Journals, vol. 24(3-4), pages 409-432, February.
    7. Asif Lakhany & Amber Zhang, 2021. "Efficient ISDA Initial Margin Calculations Using Least Squares Monte-Carlo," Papers 2110.13296, arXiv.org.
    8. Cornelis W Oosterlee & Lech A Grzelak, 2019. "Mathematical Modeling and Computation in Finance:With Exercises and Python and MATLAB Computer Codes," World Scientific Books, World Scientific Publishing Co. Pte. Ltd., number q0236, February.
    9. Shuaiqiang Liu & Anastasia Borovykh & Lech A. Grzelak & Cornelis W. Oosterlee, 2019. "A neural network-based framework for financial model calibration," Papers 1904.10523, arXiv.org.
    10. Cox, John C. & Ingersoll Junior, Jonathan E. & Ross, Stephen A., 2007. "A theory of the term structure of interest rates," RAE - Revista de Administração de Empresas, FGV-EAESP Escola de Administração de Empresas de São Paulo (Brazil), vol. 47(2), April.
    11. Hull, John & White, Alan, 1990. "Pricing Interest-Rate-Derivative Securities," The Review of Financial Studies, Society for Financial Studies, vol. 3(4), pages 573-592.
    12. Annaert, Jan & Claes, Anouk G.P. & De Ceuster, Marc J.K. & Zhang, Hairui, 2013. "Estimating the spot rate curve using the Nelson–Siegel model," International Review of Economics & Finance, Elsevier, vol. 27(C), pages 482-496.
    13. Nelson, Charles R & Siegel, Andrew F, 1987. "Parsimonious Modeling of Yield Curves," The Journal of Business, University of Chicago Press, vol. 60(4), pages 473-489, October.
    14. Andrea Pallavicini & Daniele Perini & Damiano Brigo, 2011. "Funding Valuation Adjustment: a consistent framework including CVA, DVA, collateral,netting rules and re-hypothecation," Papers 1112.1521, arXiv.org, revised Dec 2011.
    15. Luca Capriotti & Yupeng Jiang & Andrea Macrina, 2017. "AAD and least-square Monte Carlo: Fast Bermudan-style options and XVA Greeks," Algorithmic Finance, IOS Press, vol. 6(1-2), pages 35-49.
    16. Claudio Albanese & Stéphane Crépey & Rodney Hoskinson & Bouazza Saadeddine, 2021. "XVA analysis from the balance sheet," Quantitative Finance, Taylor & Francis Journals, vol. 21(1), pages 99-123, January.
    17. Shuaiqiang Liu & Álvaro Leitao & Anastasia Borovykh & Cornelis W. Oosterlee, 2021. "On a Neural Network to Extract Implied Information from American Options," Applied Mathematical Finance, Taylor & Francis Journals, vol. 28(5), pages 449-475, September.
    18. Patrick Hagan & Graeme West, 2006. "Interpolation Methods for Curve Construction," Applied Mathematical Finance, Taylor & Francis Journals, vol. 13(2), pages 89-129.
    19. Longstaff, Francis A & Schwartz, Eduardo S, 2001. "Valuing American Options by Simulation: A Simple Least-Squares Approach," University of California at Los Angeles, Anderson Graduate School of Management qt43n1k4jb, Anderson Graduate School of Management, UCLA.
    20. Blanka Horvath & Aitor Muguruza & Mehdi Tomas, 2021. "Deep learning volatility: a deep neural network perspective on pricing and calibration in (rough) volatility models," Quantitative Finance, Taylor & Francis Journals, vol. 21(1), pages 11-27, January.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Joel P. Villarino & 'Alvaro Leitao, 2024. "On Deep Learning for computing the Dynamic Initial Margin and Margin Value Adjustment," Papers 2407.16435, arXiv.org.
    2. Francisco G'omez Casanova & 'Alvaro Leitao & Fernando de Lope Contreras & Carlos V'azquez, 2024. "Deep Joint Learning valuation of Bermudan Swaptions," Papers 2404.11257, arXiv.org.
    3. Bueno-Guerrero, Alberto & Moreno, Manuel & Navas, Javier F., 2015. "Stochastic string models with continuous semimartingales," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 433(C), pages 229-246.
    4. Griselda Deelstra & Lech A. Grzelak & Felix L. Wolf, 2022. "Accelerated Computations of Sensitivities for xVA," Papers 2211.17026, arXiv.org, revised Jan 2024.
    5. Alessandro Gnoatto & Athena Picarelli & Christoph Reisinger, 2020. "Deep xVA solver -- A neural network based counterparty credit risk management framework," Papers 2005.02633, arXiv.org, revised Dec 2022.
    6. Duffie, Darrell, 2003. "Intertemporal asset pricing theory," Handbook of the Economics of Finance, in: G.M. Constantinides & M. Harris & R. M. Stulz (ed.), Handbook of the Economics of Finance, edition 1, volume 1, chapter 11, pages 639-742, Elsevier.
    7. Robert A. Jarrow, 2009. "The Term Structure of Interest Rates," Annual Review of Financial Economics, Annual Reviews, vol. 1(1), pages 69-96, November.
    8. Yang Chang, 2014. "A Consistent Approach to Modelling the Interest Rate Market Anomalies Post the Global Financial Crisis," PhD Thesis, Finance Discipline Group, UTS Business School, University of Technology, Sydney, number 2-2014, January-A.
    9. Mark Broadie & Jerome B. Detemple, 2004. "ANNIVERSARY ARTICLE: Option Pricing: Valuation Models and Applications," Management Science, INFORMS, vol. 50(9), pages 1145-1177, September.
    10. Fergusson, Kevin, 2020. "Less-Expensive Valuation And Reserving Of Long-Dated Variable Annuities When Interest Rates And Mortality Rates Are Stochastic," ASTIN Bulletin, Cambridge University Press, vol. 50(2), pages 381-417, May.
    11. Lim, Terence & Lo, Andrew W. & Merton, Robert C. & Scholes, Myron S., 2006. "The Derivatives Sourcebook," Foundations and Trends(R) in Finance, now publishers, vol. 1(5–6), pages 365-572, April.
    12. repec:uts:finphd:40 is not listed on IDEAS
    13. Dai, Qiang & Singleton, Kenneth J., 2003. "Fixed-income pricing," Handbook of the Economics of Finance, in: G.M. Constantinides & M. Harris & R. M. Stulz (ed.), Handbook of the Economics of Finance, edition 1, volume 1, chapter 20, pages 1207-1246, Elsevier.
    14. Burnecki, Krzysztof & Giuricich, Mario Nicoló & Palmowski, Zbigniew, 2019. "Valuation of contingent convertible catastrophe bonds — The case for equity conversion," Insurance: Mathematics and Economics, Elsevier, vol. 88(C), pages 238-254.
    15. Anders B. Trolle & Eduardo S. Schwartz, 2009. "A General Stochastic Volatility Model for the Pricing of Interest Rate Derivatives," The Review of Financial Studies, Society for Financial Studies, vol. 22(5), pages 2007-2057, May.
    16. He, Jie-Cao & Hsieh, Chang-Chieh & Huang, Zi-Wei & Lin, Shih-Kuei, 2023. "Valuation of callable range accrual linked to CMS Spread under generalized swap market model," International Review of Financial Analysis, Elsevier, vol. 90(C).
    17. Ting-Jung Lee & W. Brent Lindquist & Svetlozar T. Rachev & Abootaleb Shirvani, 2025. "Option-Implied Zero-Coupon Yields: Unifying Bond and Equity Markets," Papers 2512.10823, arXiv.org.
    18. Robert J. Elliott & Tak Kuen Siu, 2016. "Pricing regime-switching risk in an HJM interest rate environment," Quantitative Finance, Taylor & Francis Journals, vol. 16(12), pages 1791-1800, December.
    19. Beliaeva, Natalia & Nawalkha, Sanjay, 2012. "Pricing American interest rate options under the jump-extended constant-elasticity-of-variance short rate models," Journal of Banking & Finance, Elsevier, vol. 36(1), pages 151-163.
    20. Xiao Lin, 2016. "The Zero-Coupon Rate Model for Derivatives Pricing," Papers 1606.01343, arXiv.org, revised Feb 2022.
    21. Martin B. Haugh & Leonid Kogan, 2004. "Pricing American Options: A Duality Approach," Operations Research, INFORMS, vol. 52(2), pages 258-270, April.

    More about this item

    Keywords

    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:eee:apmaco:v:510:y:2026:i:c:s0096300325004059. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Catherine Liu (email available below). General contact details of provider: https://www.journals.elsevier.com/applied-mathematics-and-computation .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.