To assess the riskiness of credit-risky portfolios is one of the most challenging tasks in contemporary finance. The decision by the Basel Committee for Banking Supervision to allow sophisticated banks to use their own internal credit portfolio risk models has further highlighted the importance of a critical evaluation of such models. A crucial input for a model of credit-risky portfolios is the dependence structure of the underlying obligors. We study two widely used approaches, namely a factor structure and the direct specification of a copula, within the framework of a default-based credit risk model. Using the powerful simulation tools of XploRe we generate portfolio default distributions and study the sensitivity of commonly used risk measures with respect to the approach in modelling the dependence structure of the portfolio.