The pyramidlike structure of a collateralized debt obligation is a beautiful thing—if you are fascinated by the intricacies of financial engineering. A banker creates a CDO by assembling pieces of debt according to their credit ratings and their yields. The mistake made by AIG and others who were lured by them was believing that the ones with the higher credit ratings were such a sure bet that the companies did not bother to set aside much capital against them in the unlikely event that the CDO would generate losses.