For years E*Trade Financial Corp. invested a good chunk of its capital in collateralized debt obligations. It seemed like a great way for the online brokerage firm to generate balance-sheet gains: Interest rates were falling and real estate prices were rising, driving up CDO values.