We propose a total return-based framework to measure downside risk associated with phenomenon of capital outflows from riskier to safer financial markets. The proposed method consists of three elements: (i) the general definition of the flight-to-quality (FtQ) phenomenon, (ii) the typological classification of the flight-to-quality occurrences for associating them with the phases of the business cycle and (iii) the automated technique to diagnose the time frames and to measure the impact of flight-to-quality on financial instruments. The proposed framework is applied to analyse the global-scale capital inflows/outflows from emerging markets public debt to the US Treasuries and vice versa. The results show that different phases of business cycles and GDP growth rates, including turning points, could be associated with flights-to-quality of different types and causality origins. Addressing downside risk crystallizations in flight-to-quality occurrences, new perspectives of integrated interest rate risk and credit risk management are discussed. For strengthening financial stability, we suggest the use of flight-to-quality windows as scenarios for stress testing, both for banks and financial institutions.