Article refers to the issue of credit risk management in commercial banks. Particular attention is paid to the problem of stress testing. In addition, methods are presented that allow prediction of the losses of the portfolio in the context of extreme events relating to the crises of financial markets. The author presented the results of research based on the extreme values theory, the conditional loss distribution function and the profitability analysis of the loan portfolio. The achieved outcomes has been shown in the context of the provisions of the New Basel Capital Accord and the subsequent consultation documents published by the Basel Committee on Banking Supervision. It was shown that losses caused by the rare but still plausible events could significantly exceed the minimum capital requirements estimated in accordance with IRB method.