In this paper, a framework that consistently and fully integrates the market, credit and country transfer risks of a general portfolio of financial assets in a multi-period setup is developed. An appropriate definition of exposure, loss given default and loss given transfer events provides a unified treatment of these three risk types. Implementable algorithms are presented, as is a comparison with industry standards and best practices. The framework discussed is generic and does not explicitly depend on the choice of the scenario generator. Generic and macroeconomic stress tests are directly obtained by selecting the paths for which the relevant risk factors are constrained by a priori given bounds.