Pricing portfolio credit derivatives