Recently I was asked by a student to give some guidance on using Monte Carlo method for CVA calculation. Here is what I came up with.

**Abstract**

In this short how-to we will use Monte Carlo simulation to compute CVA. For simplicity, we will ignore the possibility of our own default (i.e. we will calculate unilateral CVA) and will not take wrong-way risk into account.

**Introduction**

Credit value adjustment (CVA for short) is the difference between the price of a derivative without counterparty risk and the price of the same derivative adjusted for counterparty risk. If we have more than one trade with a certain counterparty, we usually cannot correctly calculate CVA per trade, but we can always calculate the total CVA for the counterparty.

According to [1], unilateral CVA for a counterparty (ignoring wrong-way risk) is

(1)

where is the loss given default, is the risk-free discount factor for , is the risk-neutral expectation of our exposure to that counterparty at time .

Exposure is the amount of money that the counterparty owes us if it defaults at time .

Suppose we have trades with the counterparty. If all of these trades are covered by a netting agreement, our exposure to this counterparty at time is

, where is the MtM value of the i-th trade at time .

If there is no netting agreement, our exposure is .

At any rate, our exposure is a random variable, and we need to know its expected value for each . For , is equal to the current exposure .

In practice, we do not calculate for each , but:

- Select k points .
- Calculate .
- Compute integral (1) as the sum

(2)

Here, is the probability that the conterparty defaults between and . Probabilities of default can be obtained from internal ratings or CDS spreads. The simplest (but not the most accurate) technique is given in [3], paragraph 98:

where is the CDS spread at time .

**Sample portfolio**

Our sample portfolio consists of a single trade: an equity forward. At time we buy from the counterparty 1 share of stock at the price . By contrast to an option, in an equity forward tansaction we have an *obligation* to buy the stock, even if at time price is higher than the market price of the stock. In our example, stock does not pay dividends.

The value of our trade at time is

where is the price of stock at time .

**Model**

We take a simple but popular model of the stock price evolution: geometric Brownian motion. Let be the stock price at time t, then we postulate that is the solution of

(3)

where is Brownian motion, and are parameters of the model.

In addition, we make a fairly unrealistic assumption that the interest rate is zero and will remain zero until time . Although this makes our results unusable in real life, our example will, without additional complication, demonstrate the application of Monte Carlo simulation to calculating CVA.

**Calibration of the model**

Parameter in our model corresponds to the *volatility* of stock . We take as the volatility implied by the prices of options on that expire at . To make our model risk-neutral, we take .

**Computing expected exposure**

We are now ready to calculate expected exposures. Remember that we need to do that at points in the future, . For each of those points, the algorithm is the same, so we consider the computation for some point .

Monte Carlo method is a way of computing integrals (see [2] for a detailed treatment of this method). Expected value of a random variable is an integral, so we can employ Monte Carlo to calculate the expectation. To be fair we note that Monte Carlo is beneficial when the integral in question is multidimensional (that is, the number of dimensions is greater than 2). Our example is single-dimensional, but we will use Monte Carlo anyway.

The solution to equation (3) is

where is today’s price of the stock, is a standard normal random value.

We begin our first Monte Carlo iteration by drawing random number from the standard normal distribution and compute the first sample value using calibrated values of and :

Next we calculate the exposure in this scenario:

Thus we have created one random scenario (by drawing ) and calculated the exposure value for this scenario. This concludes the first Monte Carlo iteration.

To obtain the expected exposure at , we perform many (say, a thousand) Monte Carlo iterations and obtain exposure values for each scenario: , where is the number of iterations. Our estimate of the expected exposure at time is the average of all sample exposures:

**Putting it al together**

Having computed expected exposures , we can calculate CVA by formula (2).

**References**

- Zhu, Steven H. and Pykhtin, Michael, A Guide to Modeling Counterparty Credit Risk. GARP Risk Review, July/August 2007. Available at SSRN: http://ssrn.com/abstract=1032522
- Glasserman, Paul, Monte Carlo Methods in Financial Engineering (Stochastic Modelling and Applied Probability), Springer, August 2003.
- Basel Committee on Banking Supervision, Basel III: A global regulatory framework for more resilient banks and banking systems. Bank for international settlements, December 2010 (rev June 2011). Available at: http://www.bis.org/publ/bcbs189.pdf

How do you estimate the volatility?

Volatility of a stock is implied by the prices of liquid options on that stock. Of course, the Black-Scholes volatility implied by the option prices depends on the strike of the option, but in the above example I glossed over this to avoid making it too complicated.