An Accurate Solution for Credit Valuation Adjustment (CVA) and Wrong Way Risk Tim Xiao Journal of Fixed Income, 25(1) 84-95 Summer 2015 ABSTRACT This paper presents a Least Square Monte Carlo approach for accurately calculating credit value adjustment (CVA). In contrast to previous studies, the model relies on the probability distribution of a default time/jump rather than the default time itself, as the default time is usually inaccessible. As such, the model can achieve a high order of accuracy with a relatively easy implementation. We find that the valuation of a defaultable derivative is normally determined via backward induction when their payoffs could be positive or negative. Moreover, the model can naturally capture wrong or right way risk. Key Words: credit value adjustment (CVA), wrong way risk, right way risk, credit risk modeling, least square Monte Carlo, default time approach (DTA), default probability approach (DPA), collateralization, margin and netting. 2 For years, a widespread practice in the industry has been to mark derivative portfolios to market without taking counterparty risk into account. All cash flows are discounted using the LIBOR curve. But the real parties, in many cases, happen to be of lower credit quality than the hypothetical LIBOR party and have a chance of default. As a consequence, the International Accounting Standard (IAS) 39 requires banks to provide a fair-value adjustment due to counterparty risk. Although credit value adjustment (CVA) became mandatory in 2000, it received a little attention until the recent financial crises in which the profit and loss (P&L) swings due to CVA changes were measured in billons of dollars. Interest in CVA began to grow. Now CVA has become the first line of defense and the central part of counterparty risk management. CVA not only allows institutions to move beyond the traditional control mindset of credit risk limits and to quantify counterparty risk as a single measurable P&L number, but also offers an opportunity for banks to dynamically manage, price and hedge counterparty risk. The benefits of CVA are widely acknowledged. Many banks have set up internal credit risk trading desks to manage counterparty risk on derivatives. The earlier works on CVA are mainly focused on unilateral CVA that assumes that only one counterparty is defaultable and the other one is default-free. The unilateral treatment neglects the fact that both counterparties may default, i.e., counterparty risk can be bilateral. A trend that has become increasingly relevant and popular has been to consider the bilateral nature of counterparty credit risk. Although most institutions view bilateral considerations as important in order to agree on new transactions, Hull and White (2013) argue that bilateral CVA is more controversial than unilateral CVA as the possibility that a dealer might default is in theory a benefit to the dealer. CVA, by definition, is the difference between the risk-free portfolio value and the true (or risky or defaultable) portfolio value that takes into account the possibility of a counterparty's default. The risk-free portfolio value is what brokers quote or what trading systems or models 3 normally report. The risky portfolio value, however, is a relatively less explored and less transparent area, which is the main challenge and core theme for CVA. In other words, central to CVA is risky valuation. In general, risky valuation can be classified into two categories: the default time approach (DTA) and the default probability approach (DPA). The DTA involves the default time explicitly. Most CVA models in the literature (Brigo and Capponi (2008), Lipton and Sepp (2009), Pykhtin and Zhu (2006) and Gregory (2009), etc.) are based on this approach. Although the DTA is very intuitive, it has the disadvantage that it explicitly involves the default time. We are very unlikely to have complete information about a firm's default point, which is often inaccessible (see Duffie and Huang (1996), Jarrow and Protter (2004), etc.). Usually, valuation under the DTA is performed via Monte Carlo simulation. On the other hand, however, the DPA relies on the probability distribution of the default time rather than the default time itself. Sometimes the DPA yields simple closed form solutions. The current popular CVA methodology (Pykhtin and Zhu (2006) and Gregory (2009), etc.) is first derived using DTA and then discretized over a time grid in order to yield a feasible solution. The discretization, however, is inaccurate. In fact, this model has never been rigorously proved. Since CVA is used for financial accounting and pricing, its accuracy is essential. Moreover, this current model is based on a well-known assumption, in which credit exposure and counterparty's credit quality are independent. Obviously, it can not capture wrong/right way risk properly. In this paper, we present a framework for risky valuation and CVA. In contrast to previous studies, the model relies on the DPA rather than the DTA. Our study shows that the pricing process of a defaultable contract normally has a backward recursive nature if its payoff could be positive or negative. An intuitive way of understanding these backward recursive behaviours is that we can think of that any contingent claim embeds two default options. In other words, when entering an OTC derivatives transaction, one party grants the other party an option to default and, at the same time, 4 also receives an option to default itself. In theory, default may occur at any time. Therefore, the default options are American style options that normally require a backward induction valuation. Wrong way risk occurs when exposure to a counterparty is adversely correlated with the credit quality of that counterparty, while right way risk occurs when exposure to a counterparty is positively correlated with the credit quality of that counterparty. For example, in wrong way risk exposure tends to increase when counterparty credit quality worsens, while in right way risk exposure tends to decrease when counterparty credit quality declines. Wrong/right way risk, as an additional source of risk, is rightly of concern to banks and regulators. Since this new model allows us to incorporate correlated and potentially simultaneous defaults into risky valuation, it can naturally capture wrong/right way risk. The rest of this paper is organized as follows: Section 2 discusses unilateral risky valuation and unilateral CVA. Section 2 elaborates bilateral risky valuation and bilateral CVA. Section 3 presents numerical results. The conclusions are given in Section 4. . All proofs and a practical framework that embraces netting agreements, margining agreements and wrong/right way risk are contained in the appendices. 1. Unilateral Risky Valuation and Unilateral CVA We consider a filtered probability space (  , F ,   0ttF , P ) satisfying the usual conditions, where  denotes a sample space; F denotes a  -algebra; P denotes a probability measure;   0ttF denotes a filtration. The default model is based on the reduced-form approach proposed by Duffie and Singleton (1999) and Jarrow and Turnbell (1994), which does not explain the event of default endogenously, but characterizes it exogenously by a jump process. The stopping (or default) time  of a firm is modeled as a Cox arrival process (also known as a doubly stochastic Poisson process) whose first jump occurs at default and is defined as, 5  =  t s dssht 0 ),(:inf (1) where )(th or ),( tth  denotes the stochastic hazard rate or arrival intensity dependent on an exogenous common state t , and  is a unit exponential random variable independent of t . It is well-known that the survival probability from time t to s in this framework is defined by      −==  s t duuhZtsPstp )(exp),|(:),(  (2a) The default probability for the period (t, s) in this framework is defined by      −−=−==  s t duuhstpZtsPstq )(exp1),(1),|(:),(  (2b) Two counterparties are denoted as A and B. Let valuation date be t. Consider a financial contract that promises to pay a 0TX from party B to party A at maturity date T, and nothing before date T. All calculations in the paper are from the perspective of party A. The risk free value of the financial contract is given by  tFTF XTtDEtV ),()( = (3a) where    −=  duurTtD T t )(exp),( (3b) where  tE F• denotes the expectation conditional on the tF , ),( TtD denotes the risk-free discount factor at time t for the maturity T and )(ur denotes the risk-free short rate at time u ( Tut  ). Next, we turn to risky valuation. In a unilateral credit risk case, we assume that party A is default-free and party B is defaultable. Risky valuation can be generally classified into two categories: the default time approach (DTA) and the default probability (intensity) approach (DPA). 6 The DTA involves the default time explicitly. If there has been no default before time T (i.e., T ), the value of the contract at T is the payoff TX . If a default happens before T (i.e., Tt  ), a recovery payoff is made at the default time  as a fraction of the market value1 given by )(V where  is the default recovery rate and )(V is the market value at default. Under a risk-neutral measure, the value of this defaultable contract is the discounted expectation of all the payoffs and is given by ( ) tTTT VtDXTtDEtV F|1)(),(1),()(  +=   (4) where Y is an indicator function that is equal to one if Y is true and zero otherwise. Although the DTA is very intuitive, it has the disadvantage that it explicitly involves the default time/jump. We are very unlikely to have complete information about a firm's default point, which is often inaccessible. Usually, valuation under the DTA is performed via Monte Carlo simulation. The DPA relies on the probability distribution of the default time rather than the default time itself. We divide the time period (t, T) into n very small time intervals ( t ) and assume that a default may occur only at the end of each very small period. In our derivation, we use the approximation ( ) yy +1exp for very small y. The survival and the default probabilities for the period ( t , tt + ) are given by ( ) tthtthtttptp −−=+= )(1)(exp),(:)( (5a) ( ) tthtthtttqtq −−=+= )()(exp1),(:)( (5b) The binomial default rule considers only two possible states: default or survival. For the one-period ),( ttt + economy, at time tt + the asset either defaults with the default probability ),( tttq + or survives with the survival probability ),( tttp + . The survival payoff is equal to 1 Here we use the recovery of market value (RMV) assumption. 7 the market value )( ttV + and the default payoff is a fraction of the market value: )()( ttVtt ++ . Under a risk-neutral measure, the value of the asset at t is the expectation of all the payoffs discounted at the risk-free rate and is given by ( )    ( ) tt ttVttyEttVtqttpttrEtV FF )()(exp)()()()()(exp)( +−++−=  (6) where ( ) )()()(1)()()( tctrtthtrty +=−+=  denotes the risky rate and ( ))(1)()( tthtc −= is called the (short) credit spread. Similarly, we have ( ) ttttVtttyEttV +++−=+ F)2()(exp)( (7) Note that ( )tty − )(exp is ttF + -measurable. By definition, an ttF + -measurable random variable is a random variable whose value is known at time tt + . Based on the taking out what is known and tower properties of conditional expectation, we have ( )  ( ) ( )   ( ) ti ttt t ttVttityE ttVtttyEttyE ttVttyEtV F FF F )2())(exp )2()(exp)(exp )()(exp)( 1 0 ++−= ++−−= +−=  = + (8) By recursively deriving from t forward over T and taking the limit as t approaches zero, the risky value of the asset can be expressed as          −=  t T t TVduuyEtV F)()(exp)( (9) We may think of )(uy as the risk-adjusted short rate. Equation (9) is the same as Equation (10) in Duffie and Singleton [1999], which is the market model for pricing risky bonds. Using the DPA, we obtain a closed-form solution for pricing an asset subject to credit risk. Other good examples of the DPA are the CDS model proposed by J.P. Morgan (1999) and a more generic risky model presented by Xiao (2013a). In theory, a default may happen at any time, i.e., a risky contract is continuously defaultable. This Continuous Time Risky Valuation Model is accurate but sometimes complex and expensive. 8 For simplicity, people sometimes prefer the Discrete Time Risky Valuation Model that assumes that a default may only happen at some discrete times. A natural selection is to assume that a default may occur only on the payment dates. Fortunately, the level of accuracy for this discrete approximation is well inside the typical bid-ask spread for most applications (see O'Kane and Turnbull (2003)). From now on, we will focus on the discrete setting only, but many of the points we make are equally applicable to the continuous setting. For a derivative contract, usually its payoff may be either an asset or a liability to each party. Thus, we further relax the assumption and suppose that may be positive or negative. In the case of , the survival value is equal to the payoff TX and the default payoff is a fraction of the payoff TX . Whereas in the case of 0TX , the contract value is the payoff itself, because the default risk of party B is irrelevant for unilateral risky valuation in this case. Therefore, we have Proposition 1: The unilateral risky value of the single-payment contract in a discrete-time setting is given by  tFTXTtFEtV ),()( = (10a) where ( ) )(1),(11),(),( 0 TTtqTtDTtF TX −−=  (10b) Proof: See the appendix. Here ),( TtF can be regarded as a risk-adjusted discount factor. Proposition 1 says that the unilateral risky valuation of the single payoff contract has a dependence on the sign of the payoff. If the payoff is positive, the risky value is equal to the risk-free value minus the discounted potential loss. Otherwise, the risky value is equal to the risk-free value. Proposition 1 can be easily extended from one-period to multiple-periods. Suppose that a defaultable contract has m cash flows. Let the m cash flows be represented as 1X ,..., mX with TX 0TX 9 payment dates 1T ,..., mT . Each cash flow may be positive or negative. We have the following proposition. Proposition 2: The unilateral risky value of the multiple-payment contract is given by ( )  = − = + = m i ti i j jj XTTFEtV 1 1 0 1 ),()( F (11a) where 0Tt = and ( ) )(1),(11),(),( 110))((11 11 +++++ −−= ++ jjjTVXjjjj TTTqTTDTTF jj  (11b) Proof: See the appendix. The risky valuation in Proposition 2 has a backward nature. The intermediate values are vital to determine the final price. For a discrete time interval, the current risky value has a dependence on the future risky value. Only on the final payment date mT , the value of the contract and the maximum amount of information needed to determine the risk-adjusted discount factor are revealed. The coupled valuation behavior allows us to capture wrong/right way risk properly where counterparty credit quality and market prices may be correlated. This type of problem can be best solved by working backwards in time, with the later risky value feeding into the earlier ones, so that the process builds on itself in a recursive fashion, which is referred to as backward induction. The most popular backward induction valuation algorithms are lattice/tree and least square Monte Carlo. For an intuitive explanation, we can posit that a defaultable contract under the unilateral credit risk assumption has an embedded default option (see Sorensen and Bollier (1994)). In other words, one party entering a defaultable financial transaction actually grants the other party an option to default. If we assume that a default may occur at any time, the default option is an American style option. American options normally have backward recursive natures and require backward induction valuations. 10 The similarity between American style financial options and American style default options is that both require a backward recursive valuation procedure. The difference between them is in the optimal strategy. The American financial option seeks an optimal value by comparing the exercise value with the continuation value, whereas the American default option seeks an optimal discount factor based on the option value in time. The unilateral CVA, by definition, can be expressed as ( )  = − = + −=−= m i ti i j jji F XTTFTtDEtVtVtCVA 1 1 0 1 ),(),()()()( F (12) Proposition 2 provides a general form for pricing a unilateral defaultable contract. Applying it to a particular situation in which we assume that all the payoffs are nonnegative, we derive the following corollary: Corollary 1: If all the payoffs are nonnegative, the risky value of the multiple-payments contract is given by ( )  = − = + = m i ti i j jj XTTFEtV 1 1 0 1 ),()( F (13a) where 0Tt = and ( ) )(1),(1),(),( 1111 ++++ −−= jjjjjjj TTTqTTDTTF  (13b) The proof of this corollary is easily obtained according to Proposition 2 by setting ( ) 0)( 11 + ++ jj TVX , since the value of the contract at any time is also nonnegative. The CVA in this case is given by ( )( )  = − = ++ −−−=−= m i ti i j jjji F XTTTqTtDEtVtVtCVA 1 1 0 11 ))(1)(,(11),()()()( F (14) The current popular CVA model (e.g., equation (17) in Pykhtin and Zhu (2007) and equation (3) in Gregory (2009)) is quite different from above either equation (12) or equation (14). As a matter of fact, the current CVA model has never been rigorously proved. In order to reflect the economic value of counterparty credit risk, to measure the profit and loss of a bank and to 11 provide proper incentives to traders, a good CVA model must be not only rigorous and accurate but also feasible to implement. 2. Bilateral Risky Valuation and Bilateral CVA There is ample evidence that corporate defaults are correlated. The default of a firm's counterparty might affect its own default probability. Thus, default correlation and dependence arise due to the counterparty relations. Default correlation can be positive or negative. The effect of positive correlation is usually called contagion, whereas the latter is referred to as competition effect. Two counterparties are denoted as A and B. The binomial default rule considers only two possible states: default or survival. Therefore, the default indicator jY for party j (j=A, B) follows a Bernoulli distribution, which takes value 1 with default probability jq and value 0 with survival probability jp , i.e., jj pYP == }0{ and jj qYP == }1{ . The marginal default distributions can be determined by the reduced-form models. The joint distributions of a bivariate Bernoulli variable can be easily obtained via the marginal distributions by introducing extra correlations. Consider a pair of random variables ( AY , BY ) that has a bivariate Bernoulli distribution. The joint probability representations are given by ABBABA ppYYPp +==== )0,0(:00 (15a) ABBABA qpYYPp −==== )1,0(:01 (15b) ABBABA pqYYPp −==== )0,1(:10 (15c) ABBABA qqYYPp +==== )1,1(:11 (15d) where jj qYE =)( , jjj qp= 2 ,   BBAAABBAABBBAAAB pqpqqYqYE  ==−−= ))((: where AB denotes the default correlation coefficient and AB denotes the default covariance. 12 Table 1. Payoffs of a bilaterally defaultable contract This table displays all possible payoffs at time T. In the case of 0TX , there are a total of four possible states at time T: i) Both A and B survive with probability 00p . The contract value is equal to the payoff TX . ii) A defaults but B survives with probability 10p . The contract value is TB X , where B represents the non-default recovery rate 2. B =0 represents the one-way settlement rule, while B =1 represents the two-way settlement rule. iii) A survives but B defaults with probability 01p . The contract value is TB X , where B represents the default recovery rate. iv) Both A and B default with probability 11p . The contract value is TAB X , where AB denotes the joint recovery rate when both parties A and B default simultaneously. A similar logic applies to the case of 0TX . State 0,0 == BA YY 0,1 == BA YY 1,0 == BA YY 1,1 == BA YY Comments A & B survive A defaults, B survives A survives, B defaults A & B default Probability 00p 10p 01p 11p Payoff 0TX TX TB X TB X TAB X 0TX TX TA X TA X TAB X Suppose that a financial contract that promises to pay a TX from party B to party A at maturity date T, and nothing before date T where tT  . The payoff TX may be positive or 2 There are two default settlement rules in the market. The one-way payment rule was specified by the early ISDA master agreement. The non-defaulting party is not obligated to compensate the defaulting party if the remaining market value of the instrument is positive for the defaulting party. The two-way payment rule is based on current ISDA documentation. The non-defaulting party will pay the full market value of the instrument to the defaulting party if the contract has positive value to the defaulting party. 13 negative, i.e. the contract may be either an asset or a liability to each party. All calculations are from the perspective of party A. At time T, there are a total of four ( 42 2 = ) possible states shown in Table 1. The risky value of the contract is the discounted expectation of the payoffs and is given by the following proposition. Proposition 3: The bilateral risky value of the single-payment contract is given by   ( ) tt FF TAXBXT XTtkTtkTtDEXTtKEtV TT ),(1),(1),(),()( 00  +== (16a) where ( ))()()(1),(),(),()( ),(),()(),(),()(),(),(),( TTTTtTtqTtqT TtqTtpTTtpTtqTTtpTtpTtk ABBBABABAB ABBABBABB   +−−++ ++= (16b) ( ))()()(1),(),(),()( ),(),()(),(),()(),(),(),( TTTTtTtqTtqT TtqTtpTTtpTtqTTtpTtpTtk ABAAABABAB BAABAAABA   +−−++ ++= (16c) Proof: See the appendix. We may think of ),( TtK as the risk-adjusted discount factor. Proposition 3 tells us that the bilateral risky price of a single-payment contract can be expressed as the present value of the payoff discounted by a risk-adjusted discount factor that has a switching-type dependence on the sign of the payoff. Using a similar derivation as in Proposition 2, we can easily extend Proposition 3 from one-period to multiple-periods. Suppose that a defaultable contract has m cash flows. Let the m cash flows be represented as iX with payment dates iT , where i = 1,...,m. Each cash flow may be positive or negative. The bilateral risky value of the multiple-payment contract is given by Proposition 4: The bilateral risky value of the multiple-payment contract is given by ( )  = −= += mi tiij jj XTTKEtV 1 10 1),()( F (17a) where 0Tt = and ( )),(1),(1),(),( 10))((10))((11 1111 ++++++ ++++ += jjATVXjjBTVXjjjj TTkTTkTTDTTK jjjj (17b) 14 where ),( 1+jjA TTk and ),( 1+jjB TTk are defined in Proposition 3. Proof: The proof is similar to Proposition 2 by replacing ),( 1−jj TTF with ),( 1−jj TTK . Proposition 4 says that the pricing process of a multiple-payment contract has a backward nature since there is no way of knowing which risk-adjusted discounting rate should be used without knowledge of the future value. Only on the maturity date, the value of the contract and the decision strategy are clear. Therefore, the evaluation must be done in a backward fashion, working from the final payment date towards the present. This type of valuation process is referred to as backward induction. There is a common misconception in the market. Many people believe that the cash flows of a defaultable financial contract can be priced independently and then be summed up to give the final risky price of the contract. We emphasize here that this conclusion is only true of the financial contracts whose payoffs are always positive. In the cases where the promised payoffs could be positive or negative, the valuation requires not only a backward recursive induction procedure, but also a strategic selection of different discount factors according to the market value in time. This coupled valuation process allows us to capture correlation between counterparties and market factors. The bilateral CVA of the multiple-payment contract can be expressed as   ( )   = − = + −=−= m i ti i j jjtii F XTTKEXTtDEtVtVtCVA 1 1 0 1 ),(),()()()( FF (18) 3. Numerical Results In this section, we present some numerical results for CVA calculation based on the theory described above. First, we study the impact of margin agreements on CVA. The testing portfolio consists of a number of interest rate and equity derivatives. The number of simulation scenarios (or paths) is 20,000. The time buckets are set weekly. If the computational requirements exceed the system limit, one can reduce both the number of scenarios and the number of time buckets. The 15 time buckets can be designed fine-granularity at the short end (e.g., daily and then weekly) and coarse-granularity at the far end (e.g. monthly and then yearly). The rationale is that the calculation becomes less accurate due to the accumulated error from simulation discretization, and inherited errors from calibration of the underlying models, such as those due to the change of macroeconomic climate. The collateral margin period of risk is assumed to be 14 days (2 weeks). For risk-neutral simulation, we use a Hull-White model for interest rate and a CIR (CoxIngersoll-Ross) model for hazard rate scenario generations a modified GBM (Geometric Brownian Motion) model for equity and collateral evolution. The results are presented in the following tables. Table 2 illustrates that if party A has an infinite collateral threshold =AH i.e., no collateral requirement on A, the CVA value increases while the threshold BH increases. Table 3 shows that if party B has an infinite collateral threshold =BH , the CVA value actually decreases while the threshold AH increases. This reflects the bilateral impact of the collaterals on the CVA. The impact is mixed in Table 4 when both parties have finite collateral thresholds. Table 2. The impact of collateral threshold BH on the CVA This table shows that given an infinite AH , the CVA increases while BH increases, where BH denotes the collateral threshold of party B and AH denotes the collateral threshold of party A. Collateral Threshold BH 10.1 Mil 15.1 Mil 20.1 Mil Infinite ( ) CVA 19,550.91 20,528.65 21,368.44 22,059.30 Table 3. The impact of collateral threshold AH on the CVA This table shows that given an infinite BH , the CVA decreases while AH increases, where BH denotes the collateral threshold of party B and AH denotes the collateral threshold of party A. Collateral Threshold AH 10.1 Mil 15.1 Mil 20.1 Mil Infinite ( ) CVA 28,283.64 25,608.92 23,979.11 22,059.30 16 Table 4. The impact of the both collateral thresholds on the CVA The CVA may increase or decrease while both collateral thresholds change, where BH denotes the collateral threshold of party B and AH denotes the collateral threshold of party A. This reflects the fact that the collaterals have bilateral impacts on the CVA. Collateral Threshold BH 10.1 Mil 15.1 Mil 20.1 Mil Infinite ( ) Collateral Threshold AH 10.1 Mil 15.1 Mil 20.1 Mil Infinite ( ) CVA 25,752.98 22,448.45 23,288.24 22,059.30 Next, we examine the impact of wrong way risk. Wrong way risk occurs when exposure to a counterparty is adversely correlated with the credit quality of that counterparty, while right way risk occurs when exposure to a counterparty is positively correlated with the credit quality of that counterparty. Wrong/right way risk, as an additional source of risk, is rightly of concern to banks and regulators. Some financial markets are closely interlinked, while others are not. For example, CDS price movements have a feedback effect on the equity market, as a trading strategy commonly employed by banks and other market participants consists of selling a CDS on a reference entity and hedging the resulting credit exposure by shorting the stock. On the other hand, Moody's Investor's Service (2000) presents statistics that suggest that the correlations between interest rates and CDS spreads are very small. To capture wrong/right way risk, we need to determine the dependency between counterparties and to correlate the credit spreads or hazard rates with the other market risk factors, e.g. equities, commodities, etc., in the scenario generation. We use an equity swap as an example. Assume the correlation between the underlying equity price and the credit quality (hazard rate) of party B is  . The impact of the correlation on 17 the CVA is show in Table 5. The results say that the CVA increases when the absolute value of the negative correlation increases. Table 5. The impact of wrong way risk on the CVA This table shows that the CVA increases while the negative correlation  increases in the absolute value. We use an equity swap as an example and assume that there is a negative correlation between the equity price and the credit quality of party B. Correlation  0 -50% -100% CVA 165.15 205.95 236.99 4. Conclusion This article presents a framework for pricing risky contracts and their CVAs. The model relies on the probability distribution of the default jump rather than the default jump itself, because the default jump is normally inaccessible. We find that the valuation of risky assets and their CVAs, in most situations, has a backward recursive nature and requires a backward induction valuation. An intuitive explanation is that two counterparties implicitly sell each other an option to default when entering into an OTC derivative transaction. If we assume that a default may occur at any time, the default options are American style options. If we assume that a default may only happen on the payment dates, the default options are Bermudan style options. Both Bermudan and American options require backward induction valuations. Based on our theory, we propose a novel cash-flow-based framework (see appendix) for calculating bilateral CVA at the counterparty portfolio level. This framework can easily incorporate various credit mitigation techniques, such as netting agreements and margin agreements, and can capture wrong/right way risk. Numerical results show that these credit mitigation techniques and wrong/right way risk have significant impacts on CVA. 18 Appendix A. Proofs Proof of Proposition 1: Under the unilateral credit risk assumption, we only consider the default risk when the asset is in the money. Assume that a default may only occur on the payment date. Therefore, the risky value of the asset at t is the discounted expectation of all possible payoffs and is given by ( )   ( )    tt t FF F TTX TXX XTtFEXTtqTTtDE XTtqTTtpTtDEtV T TT ),(),()(111),( 1),()(),(1),()( 0 00 =−−= ++=     (A1a) where ( ) )(1),(11),(),( 0 TTtqTtDTtF TX −−=  (A1b) Proof of Proposition 2: Let 0Tt = . On the first payment day, let )( 1TV denote the risky value of the asset excluding the current cash flow 1X . According to Proposition 1, the risky value of the asset at t is given by ( ) tF)(),()( 1110 TVXTTFEtV += (A2a) where ( ) ( ) )(1),(11),(),( 0)(1010 11 TTtqTTDTTF XTV −−= + (A2b) Similarly, we have ( )  1 )(),()( 22211 TTVXTTFETV F+= (A3) Note that ),( 10 TTF is 1TF -measurable. According to the taking out what is known and tower properties of conditional expectation, we have ( )    ( ) ( )   ( )  ( ) tt t tt FF FFF FF )(),(),( )(),(),(),( ),()(),()( 2 1 0 1 2 1 1 0 1 22122110 1101110 11 TVTTFEXTTFE TVTTFEXTTFETTFE XTTFETVXTTFEtV j jji i i j jj TT   = += − = + += ++ =+= (A4) By recursively deriving from 2T forward over mT , where mm XTV =)( , we have 19 ( )  = − = + = m i ti i j jj XTTFEtV 1 1 0 1 ),()( F (A5) Proof of Proposition 3: We assume that a default may only occur on the payment date. At time T, there are four possible states: 1) both A and B survive, 2) A defaults but B survives, 3) A survives but B defaults, and 4) both A and B default. The joint distributions of A and B are given by (15). Depending on whether the payoff is in the money or out of the money at T, we have   ( ) ( ) tTAXBXtT tTABAAX tTABBBX XTtkTtkTtDEXTtKE XTtpTTtpTTtpTTtp XTtpTTtpTTtpTTtpTtDEtV TT T T FF F F ),(1),(1),(),( ),()(),()(),()(),(1 ),()(),()(),()(),(1),()( 00 111001000 111001000    +== ++++ +++=   (A6a) where ( ))()()(1),(),(),()( ),(),()(),(),()(),(),(),( TTTTtTtqTtqT TtqTtpTTtpTtqTTtpTtpTtk ABBBABABAB ABBABBABB   +−−++ ++= (A6b) ( ))()()(1),(),(),()( ),(),()(),(),()(),(),(),( TTTTtTtqTtqT TtqTtpTTtpTtqTTtpTtpTtk ABAAABABAB BAABAAABA   +−−++ ++= (A6c) B. A practical framework for calculating bilateral CVA We develop a practical framework for calculating bilateral CVA at counterparty portfolio level based on the theory described above. The framework incorporates netting and margin agreements, and captures right/wrong way risk. Two parties are denoted as A and B. All calculations are from the perspective of party A. Let the valuation date be t. The CVA computation procedure consists of the following steps. B.1. Risk-neutral Monte Carlo scenario generation One core element of the trading credit risk modeling is the Monte Carlo scenario generation (market evolution). This must be able to run a large number of scenarios for each risk factor with flexibility over parameterization of processes and treatment of correlation between underlying factors. Credit exposure may be calculated under real probability measure, while CVA or pricing counterparty credit risk should be conducted under risk-neutral probability measure. 20 Due to the extensive computational intensity of pricing counterparty risk, there will inevitably be some compromise of limiting the number of market scenarios (paths) and the number of simulation dates (also called "time buckets" or "time nodes"). The time buckets are normally designed fine-granularity at the short end and coarse-granularity at the far end. The details of scenario generation are beyond the scope of this paper. B.2. Cash flow generation For ease of illustration, we choose a vanilla interest rate swap, as interest rate swaps collectively account for around two-thirds of both the notional and market value of all outstanding derivatives (FinPricing (2015)) Assume that party A pays a fixed rate, while party B pays a floating-rate. Assume that there are M time buckets ( MTTT ,...,, 10 ) in each scenario and N cash flows in the sample swap. Let consider scenario j first. For swaplet i, there are four important dates: the fixing date fit , , the starting date sit , , the ending date eit , and the payment date pit , . In general, these dates are not coincidently at the simulation time buckets. The time relationship between swaplet i and the simulation time buckets is illustrated in Figure B1. jT 1+jT kT 1+kTfit , sit , eit , pit , Terms R ates Interest rate curve simulated at fit , 21 Figure B1: An interest rate swaplet This figure illustrates the time relationship between an interest rate swaplet and the simulation time buckets. The floating leg of the swaplet is reset at the fixing date fit , with the starting date sit , , the ending date eit , , and the payment date pit , . The simulation time buckets are 11,...,, ++ kii TTT . The simulated interest rate curve is starting at fit , . Both fixed rate payments and floating-rate payments occur on the same payment dates. The cash flow of swaplet i is determined at the fixing date fit , that is assumed to be between the simulation time buckets jT and 1+jT . First, we need to create an interest rate curve observed at fit , by interpolating the interest rate curves simulated at jT and 1+jT via either Brownian Bridge or linear interpolation. The linear interpolation is the expectation of the Brownian Bridge. Then we can calculate the payoff of swaplet i at scenario j as ( ) ),(),;( ,,,,,, eisieisifiij ttRtttFN  −= (B1) where N denotes the notional; ),;( ,,, eisifi tttF denotes the simply compounded forward rate reset at fit , for the forward period ( sit , , eit , ); ),( ,, eisi tt denotes the accrual factor or day count fraction for the period ( sit , , eit , ) and R denotes the fixed rate. The cash flow amount calculated by (B1) is paid on the payment date pit , . This value should be allocated into the nearest previous time bucket kT as: ),( ~ ,,,, pikijikj tTD = (B2) where ),( , pik tTD denotes the risk-free discount factor based on the interest rate curve simulated at kT . 22 Cash flow generation for products without early-exercise provision is quite straightforward. For early-exercise products, one can use the approach proposed by Longstaff and Schwartz (2001) to obtain the optimal exercise boundaries and then the payoffs. B3. Aggregation and netting agreements After generating cash flows for each deal, we need to aggregate them at counterparty portfolio level at each scenario and each time bucket. The cash flows are aggregated by either netting or nonnetting based on the netting agreements. A netting agreement is a provision that allows the offset of settlement payments and receipts on all contracts between two counterparties. Another important use of netting is the close-out netting that allows the offset of close-out values. For netting, we add all cash flows together at the same scenario and the same time bucket to recognize offsetting. The aggregated cash flow under netting at scenario j and time bucket k is given by = i ikjkj ,,, ~~  (B3) For nonnetting, we divided cash flows into positive and negative groups and add them separately. In other words, the offsetting is not recognized. The aggregated cash flows under nonnetting at scenario j and time bucket k are given by          =   0 ~ 0 ~ ~ ,,,, ,,,, , mkj m mkj lkj l lkj kj if if    (B4) B4. Margin (or collateral) agreements For a more detailed discussion on pricing collateralized contract/portfolio, see Xiao (2013b). B5. CVA Calculation After aggregating all cash flows via netting, one can price a portfolio in the same manner as pricing a single deal. We assume that the reader is familiar with the least square Monte Carlo 23 valuation model proposed by Longstaff and Schwartz (2001) and thus do not repeat some wellknown procedures for brevity. If the counterparty portfolio is collateralized, we can calculate the risky value based on equation (21) of Xiao (2013b). If there is no collateral agreement, we can price the portfolio according to Proposition 4 in this paper. CVA is by definition the difference between the risk-free portfolio value and the true (or risky or defaultable) portfolio value. Reference Brigo, D., and Capponi, A., 2008, Bilateral counterparty risk valuation with stochastic dynamical models and application to Credit Default Swaps, Working paper. Duffie, Darrell, and Ming Huang, 1996, Swap rates and credit quality, Journal of Finance, 51, 921949. Duffie, Darrell, and Kenneth J. Singleton, 1999, Modeling term structure of defaultable bonds, Review of Financial Studies, 12, 687-720. FinPricing, 2015, Market Data, https://finpricing.com/lib/IrCurveIntroduction.html Gregory, Jon, 2009, Being two-faced over counterparty credit risk, RISK, 22, 86-90. Hull, J. and White, A., 2013, CVA and wrong way risk, forthcoming, Financial Analysts Journal. Jarrow, R. A., and Protter, P., 2004, Structural versus reduced form models: a new information based perspective, Journal of Investment Management, 2, 34-43. 24 Jarrow, Robert A., and Stuart M. Turnbull, 1995, Pricing derivatives on financial securities subject to credit risk, Journal of Finance, 50, 53-85. Lipton, A., and Sepp, A., 2009, Credit value adjustment for credit default swaps via the structural default model, Journal of Credit Risk, 5(2), 123-146. Longstaff, Francis A., and Eduardo S. Schwartz, 2001, Valuing American options by simulation: a simple least-squares approach, The Review of Financial Studies, 14 (1), 113-147. Moody's Investor's Service, 2000, Historical default rates of corporate bond issuers, 1920-99. J. P. Morgan, 1999, The J. P. Morgan guide to credit derivatives, Risk Publications. O'Kane, D. and S. Turnbull, 2003, Valuation of credit default swaps, Fixed Income Quantitative Credit Research, Lehman Brothers, QCR Quarterly, 2003 Q1/Q2, 1-19. Pykhtin, Michael, and Steven Zhu, 2007, A guide to modeling counterparty credit risk, GARP Risk Review, July/August, 16-22. Sorensen, E. and T. Bollier, 1994, Pricing swap default risk, Financial Analysts Journal, 50, 23-33. Xiao, T., 2013a, The impact of default dependency and collateralization on asset pricing and credit risk modeling, Working paper. 25 Xiao, T., 2013b, An economic examination of collateralization in different financial market, Working paper.