The main topic of this diploma thesis is the credit risk (default risk) modeling from the portfolio view. The work is introduced by a brief description of credit risk measures and a review of models. The largest part of this thesis is focused on a description of factor models, such as simulation-based KMV and CreditMetrics resulting from Merton's model of a firm and analytical CreditRisk+ utilizing actuarial mathematics procedures. The alternative models based on a conditional independence and importance sampling are also described. The second part of the work contains a description of Mathematica programmes resulting from the models. These programmes are consequently used to analyze a credit risk of a sample coupon obligations portfolio. T...