The use of stress testing for risk monitoring has increased considerably over the last decade. Stress testing – a simulation technique used to assess the strength of a portfolio or a financial institution under unusual economic conditions – emerged as a powerful tool that was originally used in market risk. Its use has subsequently been extended into credit risk. To stress test a credit risk portfolio, practitioners focus on the key parameters that allow the risk of a credit portfolio to be assessed. These parameters, also known as Basel II parameters, are probability of default, loss given default, exposure at default and asset correlation. In this paper, using a time series approach (specifically, an error correction model), we focus on the probability of default parameter that is related to macroeconomic factors. Such an approach involves dealing with the nonstationarity of economic time series and cointegration issues. Hence, when the model is estimated, the probability of default can be simulated by measuring the effects of macroeconomic shocks applied to the model. In turn, these probabilities of default can be used to measure the impact on the probability of default under a given macroeconomic scenario, and then to improve the credit risk monitoring. The results of our study suggest that error correction models are well-suited to macroeconomic stress testing. Indeed, the fitting of the historical probability of default and the results under the stress scenarios considered here are satisfactory.