A crash course in CVA calculation

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

\mathit{CVA}=\mathit{LGD}\int_0^T{P(t)\mathit{EE}(t)}\mathrm{d}\mathit{PD}(0,t), (1)

where \mathit{LGD} is the loss given default, \mathit{P}(t) is the risk-free discount factor for \mathit{t}, \mathit{EE}(t) is the risk-neutral expectation of our exposure to that counterparty at time \mathit{t}.

Exposure is the amount of money that the counterparty owes us if it defaults at time \mathit{t}.

Suppose we have n trades with the counterparty. If all of these trades are covered by a netting agreement, our exposure to this counterparty at time t is
E(t) = \max(\sum_{i=1}^n{V_i(t)},0), where V_i(t) is the MtM value of the i-th trade at time t.

If there is no netting agreement, our exposure is E(t) = \sum_{i=1}^n{\max(V_i(t),0)}.

At any rate, our exposure E(t) is a random variable, and we need to know its expected value EE(t) for each 0<t<T. For t=0, EE(t) is equal to the current exposure E(0).

In practice, we do not calculate EE(t) for each t, but:

  1. Select k points 0<t_1<t_2\dots<t_k=T.
  2. Calculate E(0), EE(t_1),\dots,EE(T).
  3. Compute integral (1) as the sum
    \sum_{i=1}^k{ \frac{EE(t_{i-1})P(t_{i-1})+EE(t_i)P(t_i)}{2}\left(PD(t_i)-PD(t_{i-1})\right)}. (2)

Here, PD(t_i)-PD(t_{i-1}) is the probability that the conterparty defaults between t_{i-1} and t_i. 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:

PD(t_{i-1})-PD(t_i)=\exp\left(-\frac{s(t_{i-1})t_{i-1}}{\mathit{LGD}}\right)-\exp\left(-\frac{s(t_{i})t_{i}}{\mathit{LGD}}\right)

where s(t) is the CDS spread at time t.

Sample portfolio

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

The value of our trade at time t is

V(t)=S(t)-K,

where S(t) is the price of stock S at time t.

Model

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

\mathrm{d}S=\lambda S\mathrm{d}t + \sigma S \mathrm{d}W, (3)

where W is Brownian motion, \lambda and \sigma 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 T. 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 \sigma in our model corresponds to the volatility of stock S. We take \sigma as the volatility implied by the prices of options on S that expire at T. To make our model risk-neutral, we take \lambda=\frac{\sigma}{2}.

Computing expected exposure

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

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
S(t)=S(0)\exp\left(\lambda t + x\sigma\sqrt{t}\right),
where S(0) is today’s price of the stock, x is a standard normal random value.

We begin our first Monte Carlo iteration by drawing random number x_1 from the standard normal distribution and compute the first sample value S_1(t_i) using calibrated values of \lambda and \sigma:

S_1(t_i)=S(0)\exp\left(-\frac{\sigma^2}{2} t_i + x_1\sigma\sqrt{t_i}\right).

Next we calculate the exposure in this scenario:

E_1(t_i)=\max(V_1(t_i),0)=\max\left(S_1(t_i)-K,0\right)

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

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

\mathit{EE}(t_i)=\frac{1}{N}\sum_{j=1}^NE_j(t_i).

Putting it al together

Having computed expected exposures \mathit{EE}(t_1),\dots,\mathit{EE}(t_k), we can calculate CVA by formula (2).

References

Advertisements

About Alluve

Alluve develops and markets software solutions for assessing risks on the portfolios of financial derivatives. Our product, Alluve MarketSimulator, uses Monte-Carlo simulation to calculate risk measures, such as value at risk (VaR) and exposure at default (EAD).
This entry was posted in Finance. Bookmark the permalink.

2 Responses to A crash course in CVA calculation

  1. How do you estimate the volatility?

    • Alluve says:

      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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s