From insurance risk to credit portfolio management: a new approach to pricing CDOs