"But a terrorist attack in the US near election day could also benefit the Dems." Could be - and if the terrorists think that's the case, I'd predict they might put things off until after the election to avoid that happening.