The anatomy of sovereign risk contagion