Stocks rallied broadly on Monday, ending a three-day losing streak as investors moved past concerns that the terrorist attacks in Paris could hurt the global economy.

Oil and gas stocks were among the biggest gainers. The price of crude rose. Traders also bid up shares in military contractors, while travel-related stocks slumped.

The gains followed an uneven day in European markets, which shook off an early loss and ended mixed.

“It all comes down to, are consumers going to be staying at home and not out spending money because they’re afraid that if they go anywhere they’re going to be victims of a terrorist attack?” said Scott Wren, senior global equity strategist for Wells Fargo Investment Institute. “That might be the case if you saw a series of these things, but hopefully that’s not what’s going to happen, and the economy is not going to be affected.”