The CreditRisk+ model has been widely used for calculating the loss distribution of a credit portfolio. However, its basic assumption of independent risk factors is not consistent with reality. Although the dependent structure can be mimicked by setting factor weights, a reasonable way to introduce correlated risk factors is needed. In this paper, an extension of the CreditRisk+ model, called the mixed vector model, is proposed. This model incorporates some common background factors with positive and negative correlations, so it can accommodate the complicated dependence structure of risk factors. The mixed vector model can rebuild the negative correlations better than other extended CreditRisk+ models. Moreover, it can be translated into the original CreditRisk+ framework with conditionally independent risk factors, so the numerical algorithm for calculating the loss distribution for the CreditRisk+ model can be reused with little modification.