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.
In theory, risk neutral default correlation should be given by parameter value calibrated from basket CDS. However, it is impossible to find price quotes as these are not market traded instruments.
The solution is to use proxy by correlation between credit spreads. Given the liquidity of 5-year spreads, correlation can be estimated based on historical spreads per rating and per sector. Alternatively, a weighted average of spread correlation across various terms can be used.
Consider a pair of random variables (