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. The shape of 5-year credit spread is shown below.
 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