Testing for contagion: a time-scale decomposition