The aim of the paper is to propose a model of banks' asset portfolios to account for the strategic and optimising behavior of banks under adverse economic conditions. In the proposed modelling framework, banks are assumed to respond in an optimising manner to changes in their economic environment (e.g. interest rate and credit risk shocks, funding disruptions, etc.). The modelling approach is based on the risk-return optimal program in which banks aim at a particular composition of their assets to maximise risk-adjusted returns while taking into account regulatory capital and liquidity constraints. The approach is designed for applications in banks' stress testing context, as an alternative to the typical static balance sheet assumption. The stress testing applications are illustrated for a large sample of European banks.