The objective of this paper is to help a bank originator of a collateralized debt obligation (CDO) to build a maximally profitable CDO. We consider an optimization framework for structuring CDOs. The objective is to select attachment/detachment points and underlying instruments in the CDO pool. In addition to "standard" CDOs we study so-called "step-up" CDOs. In a standard CDO contract the attachment/detachment points are constant over the life of a CDO. In a step-up CDO the attachment/detachment points may change over time. We show that step-up CDOs can save about 25-35% of tranche spread payments (ie, profitability of CDOs can be boosted by about 25-35%). Several optimization models are developed from the bank originator perspective. We consider a synthetic CDO where the goal is to minimize payments for the credit risk protection (premium leg), while maintaining a specific credit rating (assuring the credit spread) of each tranche and maintaining the total incoming credit default swap spread payments. The case study is based on the time-to default scenarios for obligors (instruments) generated by the Standard & Poor's CDO Evaluator. The Portfolio Safeguard package by AORDA was used to optimize the performance of several CDOs based on example data.