Correlation of defaults in complex portfolios using copula techniques