top of page

Next-Generation Counterparty Credit Risk and XVA Modeling:

AI and Quantum Computing





Course on counterparty risk modeling in a financial institution that covers the following objectives:


  • Explain the recent Basel III directives on counterparty risk default capital charge, IMM and standard approaches

  • As well as the recent Basel III directives for the risk capital charge of Credit Value Adjustment CVA under the basic and standard approach.

  • Recent methodologies to calculate the XVA and the necessary adjustments in the pricing of Over The Counter OTC derivatives related to counterparty risk, financing, collateral and capital are exposed.

  • Models are explained to calculate the Debit Value Adjustment DVA, and other adjustments such as LVA, FVA, CollVA, KVA and XVA.

  • Methodologies are shown to estimate the parameters used in the CVA such as the probability of default PD, severity of loss LGD and Credit Spread using structural models and reduced form models.

  • Explain the modeling of current exposure and the main metrics used such as potential future exposure and expected exposure.

  • Present methodologies for calculating the Wrong Way Risk WWR

  • Evaluate some of the most used derivatives in banking.

  • Present counterparty risk validation techniques for CVA and Expected Exposure.

  • Explain CVA and XVA counterparty risk stress testing model.​​


    • Show traditional and innovative artificial intelligence methodologies such as Deep Learning and machine learning to value derivatives, estimate exposures, calculate CVA and XVA.



    • Quantum mechanics is well known for speeding up statistical sampling processes over classical techniques. In quantitative finance, statistical sampling comes up in many use cases.

    • Quantitative algorithms for the calculation of the Credit Value Adjustment (CVA) are explained, and we expose opportunities and challenges of the quantum advantage.

    • We address how to obtain a quantum advantage over the Monte Carlo simulation in the pricing of derivatives.

    • We explain numerical analyzes to show the quantum acceleration, with respect to economic capital, on classical Monte Carlo simulations.

    • Quantum machine learning explained.

    • Use of tensor networks to improve the speed of neural networks.




This program is designed for directors, managers, consultants, regulators, auditors, and counterparty credit risk analysts, as well as professionals who are implementing the Basel III regulatory agreements. It is relevant for those who work in banks, savings banks, and other companies that are exposed to credit risk. The program assumes prior knowledge of Statistics and Probability, as well as proficiency in using Excel.


Price: 6 900 € 


  • Europe: Mon-Fri, CEST 16-19 h


  • America: Mon-Fri, CDT 18-21 h

  • Asia: Mon-Fri, IST 18-21 h






Level: Advanced


Duration: 30 h




  • Presentations PDF

  • Exercises in Excel, R , Python, Jupyterlab y Tensorflow



Next-Generation Counterparty Credit Risk and XVA Modeling:

AI and Quantum Computing 



Anchor 10

Quantum Computing and Artificial Intelligence

​Module -1: Quantum Computing and Algorithms (Optional)

  • Future of quantum computing in banking

  • Is it necessary to know quantum mechanics?

  • QIS Hardware and Apps

  • quantum operations

  • Qubit representation

  • Measurement

  • Overlap

  • matrix multiplication

  • Qubit operations

  • Multiple Quantum Circuits

  • Entanglement

  • Deutsch Algorithm

  • Quantum Fourier transform and search algorithms

  • Hybrid quantum-classical algorithms

  • Quantum annealing, simulation and optimization of algorithms

  • Quantum machine learning algorithms

  • Exercise 1: Quantum operations

Module 0: Deep Learning 


  • Definition and concept of deep learning

  • Why now the use of deep learning?

  • Neural network architectures

  • activation function

    • sigmoidal

    • Rectified linear unit

    • hypertangent

    • Softmax

  • Multilayer Perceptron

  • Using Tensorflow

  • Using Tensorboard

  • R deep learning

  • Python deep learning

  • Typology of Neural Networks

    • feedforward network

    • Convolutional Neural Networks CNN

    • Recurrent Neural Networks RNN

  • Use of deep learning in banking

  • cost function

  • Gradient descending optimization

  • Use of deep learning for the IRRBB and ALM

  • Deep Learning Software​

  • Deployment software: Nvidia and Cuda

  • Hardware, CPU, GPU and cloud environments

  • Deep Learning for valuation of derivatives

  • Stochastic Differential Equations

  • Optimization models

  • Advantages and disadvantages of deep learning

  • Exercise 2: Deep learning in banking

Counterparty Credit Risk

Module 1: Counterparty Credit risk requirements in Basel III

  • Counterparty credit risk

  • Financial transactions

  • CCR: the risk of counterparty default

  • CVA: credit valuation adjustment

  • Basel I, II and III regulations

  • CVA Risk Capital Charges

  • Approaches Credit Value Adjustment (CVA)

    • The basic approach (BA-CVA)

    • The standardized approach (SA-CVA)

  • Counterparty Risk Capital (CCR)

    • Measurement of exposure for derivatives: SA-CCR

    • Measurement of exposure for derivatives: IMM-CCR

Module 2: Counterparty Credit Risk Management


  • Definition and Concepts

  • Counterparty risk in OTC

  • Counterparty risk in Repos and Securities

  • Counterpart risk participants

  • Credit Exposure

  • PD, LGD, Parent Migration and Credit Spread

  • MtM and Replacement Cost

  • Counterparty Risk Mitigation

  • Measurement and adjustments

  • credit limits

  • Definition and CVA concept

  • Counterparty risk hedges

  • Counterparty risk portfolio

Main Derivatives used in Banking

Module 3: Interest Rate Futures and Options


  • OTC derivatives and organized markets

  • Futures and Swaps

  • Forward Rate Agreements (FRAs)

  • Hedging Strategies with Interest Rate Futures

  • Interest Rate Swaps (IRS)

  • Overnight Index Swaps (OIS)

    • Risk-free rate vs OIS

    • OIS zero curve

    • OIS vs Libor

    • Funding risk

    • CVA and DVA

  • Interest rate options

    • Bond Options

    • Caplets/Caps

    • Floorlets/Floors

    • swaptions

    • Necklace

    • reverse necklace

  • Valuation models

    • Pricing caps and floors using Black`s Model

    • Pricing with trinomial trees

    • Pricing of Caps and Floors using the Libor Market Model

  • Exercise 3: IRS Valuation in Excel

  • Exercise 4: Pricing of caps and floors Black`s model in Python

  • Exercise 5: Swaption Pricing in Excel

  • Exercise 6: Caplet and Swaption Libor Market Model in Python

  • Exercise 7: Bond Options Trinomial Tree in Excel


Module 4: Other Derivatives used in Banking


  • Variable Income Derivatives

    • Variable Income Options

    • Equity Swaps

    • Organized Market Options

  • Fixed Income Derivatives

    • Fixed income forwards

  • Exchange rate derivatives

    • Cross Currency Swap

    • exchange rate options

  • Credit Derivatives

    • Credit Default Swap CDS

  • Exercise 8: Pricing Cross Currency Swap

  • Exercise 9: Equity Option Pricing in Python

  • Exercise 10: Pricing CDS in R

Counterparty Credit Risk Exposure

Module 5: Internal model to measure counterparty risk exposure

  • Counterparty risk exposure modeling

    • MtM+Add on

    • Monte Carlo simulation

  • Potential Future Exposure (PFE)

  • Expected Exposure (EE)

  • Maximum PFE

  • Expected positive exposure

  • negative exposure

  • Effective expected positive exposure

  • Factors: maturity, payment frequencies, optionalities and default

  • PFE of Interest Rate Swaps, Swaptions and CDS

  • Netting impact on exposure

  • Collateralized exposure modeling

  • Collateral modeling

  • Unilateral Margin Agreement

  • Bilateral Margin Agreement

  • Collateralized Exposure Profiles

  • Collateralized PFE

  • collateralized EE

  • Exercise 11: MtM Simulation of IRS Securities

  • Exercise 12: Interest rate simulation using CIR and Vacicek model to determine IRS MtM. PFE and EE estimation

  • Exercise 14: Estimating EE and EPE Swaptions in Excel with VBA

  • Exercise 15: Estimation of collateralized and uncollateralized PE and EPE

Traditional and Quantum Deep Learning for

Derivatives Pricing and Counterparty Credit Risk Exposure

Module 6: Neural Networks for pricing derivatives


  • Deep Learning to value derivatives

  • Deep Learning to estimate exposure

  • Monte Carlo vs. Deep Learning

  • Neural Networks (Neural Networks NN)

  • Derivatives Valuation

  • Perceptron Training

  • Backpropagation algorithm

  • training procedures

  • Tuning NN

  • NN display

  • Advantages and disadvantages

  • Exercise 16: Deep Learning to assess the Black-Sholes model

  • Exercise 17: Deep Learning for Bermuda Option valuation

  • Exercise 18: Deep Learning to estimate Expected Exposure


Module 7: Advanced Machine Learning for measuring volatility and exotic options

  • Deep Learning in volatility

  • Pricing and calibration

  • Local Volatility

  • implied volatility surfaces

  • Valuation of exotic options

  • derivatives pricing

  • Greek estimate

  • Exercise 19: Deep Learning Volatility

Module 8: Quantum Machine Learning

  • What is quantum machine learning?

  • Qubit and Quantum States

  • Quantum Automatic Machine Algorithms

  • quantum circuits

  • Support Vector Machine

  • Support Vector Quantum Machine

  • Variational quantum classifier

  • Training quantum machine learning models

  • Quantum Neural Networks

  • Quantum GAN

  • Quantum Boltzmann machines

  • Exercise 20: Traditional Machine Learning and Quantum Machine Learning to value a derivative

Module 9: Tensor Networks for Machine Learning


  • What are tensor networks?

  • Quantum Entanglement

  • Tensor networks in machine learning

  • Tensor networks in unsupervised models

  • Tensor networks in SVM

  • Tensor networks in NN

  • NN tensioning

  • Application of tensor networks in credit scoring models

  • Exercise 21: Derivatives valuation model using Neural Networks versus neural network tensorization

Quantum Computing Finance

​Module 10: Quantum Computational Finance

  • Derivatives pricing

  • Monte Carlo to value derivatives

  • Quantum algorithms for derivatives

  • European option pricing using quantum algorithms

  • Basket Options Pricing Using Quantum Algorithms

  • Quantum generative antagonistic networks

  • Exercise 22: Pricing of derivatives using Monte Carlo versus quantum algorithms

  • Exercise 23: Basket Options Pricing using classical deep learning and quantum deep learning


Credit Value Adjustment

Module 11: Structural Models of Default Probability of Default


  • Merton's model

  • Physical Probability of Default

  • Black-Scholes-Merton model

  • Black–Cox model

  • Vasicek–Kealhofer model

  • CDS Pricing

  • Curves in liquidity and non-liquidity conditions

  • CDS Implied EDF

  • CDS Spreads

  • Fair Value Spread

  • CDS Spread in Sovereigns

  • Exercise 24: CDS Spread and PD Exercise


Module 12: Reduced Form Models Probability of Default


  • Credit Spread Modeling

    • Credit Spread Smoothing

    • Adjusting credit spread with cubic splines

  • Reduced form models

    • Jarrow-Turnbull Model

    • Duffie and Singleton Model

    • Neutral default probabilities

    • Conversion of default currents into discrete PDs

    • Adjustment of reduced form models to historical databases

    • Construction of default probability curves

    • Validation with Falkenstein and Boral Test

  • Jump to default

    • Zero coupon bonds

    • Voucher with coupons

    • convertible bonds

    • CDS

  • SpreadRisk

  • Default probability for companies without market information

  • Exercise 25: Construction of probability of default and hazard rate curves


Module 14: Advanced Loss Given Default (LGD)


  • Definition: LGD, RR and CRR

  • collateral treatment

  • Linear approach to estimating LGD

  • Approach with Options Black-Sholes to estimate LGD

  • LGD Implied in CDS Spread

  • Calibration and optimization of Implicit LGD using binomial trees

  • Expert LGD models using decision trees

  • Exercise 26: LGD estimation using the linear approach and Black-Sholes

  • Exercise 27: Implicit LGD estimation through binomial trees and optimization

Module 15: CVA in Basel III


  • Minimum capital requirements for CVA risk

  • The basic approach (BA-CVA)

    • Reduced version of the BA-CVA method (without recognition of hedges)

    • Full version of the BA-CVA method (with recognition of hedges)

    • admissible coverages

    • K-Integro

    • K-Admissible

    • K-Covered

  • The standardized approach (SA-CVA)

    • CVA calculations for regulatory purposes

    • admissible coverages

    • Model Risk Multiplier

    • capital requirements for delta and vega risks

    • Categories, risk factors, sensitivities, risk weights, and correlations

  • Exercise 28: Calculation of BA-CVA and SA-CVA

Module 16: Credit Value Adjustment (CVA) Modeling


  • Definition and CVA concept

  • Formula and parameters

  • Factors Affecting CVA

  • Risk management by CVA

    • Collateralized Counterparties

    • Hedge on market factors

    • spread hedge

  • CVA seen as Spread

  • Adverse Correlation Risk

  • CVA mitigation mechanisms

  • Marginal CVA and Incremental CVA

  • CVA modeling with reduced form model

    • CVA in IRS

    • CVA in IRSs portfolio

    • risk-neutral probability

    • Simulation

  • Exercise 29: Estimating CVA, EE, PFE

  • Exercise 30: CVA estimating in IRS portfolios using Monte Carlo simulation



Module 20: What is XVA?


  • XVA concept


  • Profitability in derivatives

  • Regulatory perspective

  • XVA Trading

  • New XVA Trader Features

  • CSA basis Price

  • Collateral and OIS as discount rate

  • Pricing and Negative Multicurve in the XVA framework


Módulo 21: Debt Value Adjustment (DVA)

  • Definition of Debt Value Adjustment (DVA)

  • IFRS accounting standard

  • Bilateral CVA

  • DVA Properties

  • Risk Adjusted Value

  • DVA Monetization

  • DVA Hedge or Transfer to Treasury

  • LVA Concept

  • Exercise 35: Bilateral CVA Estimation



Módulo 22: Funding Value Adjustment (FVA) Deep Learning para XVA


  • Concept of Value Adjustments for financing costs

  • Overnight Indexed Swaps (OIS) vs. bank interest rates

  • FVA discussion

  • FVA formula: Negative and Positive

  • CVA, DVA and FVA Interaction

  • Cost of Funding

  • Net Stable Funding Ratio Impact

  • Liquidity Premium

  • Risk Adjusted Value

  • Alternative FVA estimate

  • Collateral Cost Adjustment Formula CollCA and MVA

  • HVA Hedging Cost Adjustment Formula

  • FVA Estimate

  • KVA Capital Cost Estimate

  • XVA calculation

  • XVA Risk Management

  • Deep Learning for XVA

  • Exercise 36: XVA Calculation in Python

  • Exercise 37: Estimating CVA, DVA, FVA, CollVA, HVA, KVA, LVA and XVA in Excel

  • Exercise 38: Deep Learning for XVA

  • Exercise 39: Quantum computing for XVA


Module 23: Validation of Counterparty Credit Risk

  • RFE validation

    • Risk Factor Evolution (RFE) Models

    • stochastic equations

    • historical calibration

    • Analysis of Empirical Distributions vs. Estimated Distributions

    • statistical analysis

    • Anderson-Darling

    • Kolmogorov Smirnov

    • Cramer von Mises

    • traffic light analysis

  • Problems in the validation of counterparty risk models

  • Autocorrelation effect

  • Sound practices for backtesting CCR models from Basel

  • PFE Backtesting

    • binomial distribution

  • CVA Backtesting

    • traffic light analysis

    • Berkowitz backtesting strategy

  • Exercise 40: Backtesting the PFE using AD, KS and CV test



Module 24: Stress testing of Counterparty Credit Risk

  • Stress testing expected exposure

  • PFE stress testing

  • Stress testing on the counterparty's PD

    • Stress testing using VAR and MVAR

    • Macroeconomic variables

  • CVA and DVA stress testing

  • Liquidity shock on FVA

  • Stress Testing in KVA and CET1

  • General Wrong Way Risk

  • XVA stress testing

  • Quantum model for stress testing

  • Exercise 41: CVA and EE stress testing

  • Exercise 42: PD stress testing using VAR and MVAR

bottom of page