This dissertation proposes stress testing of a bank’s corporate credit portfolio in a Basel Internal Ratings Based (IRB) framework, using publicly available macroeconomic variables. Corporate insolvencies are used to derive a credit cycle index, which is linked to macroeconomic variables through a multiple regression model. Probability of default (PD) and loss given default (LGD) that are conditional on the worst state of the credit cycle are derived from through-the-cycle PDs and LGDs. These are then used as stressed inputs into the Basel regulatory and Economic capital calculation for credit risk. Contrary to the usual expert judgement stress testing approaches, where management apply their subjective view to stress the portfolio, this approach allows macroeconomic variables to guide the severity of selected stress testing scenarios. The result is a robust stress testing framework using Rösch and Scheule (2008) conditional LGD that is correlated to the stressed PD. The downturn LGD used here is an alternative to the widely used Federal Reserve downturn LGD which assumes no correlation between PDs and LGDs.