“It’s had very little lasting effects on the market in the past. I think this is just another incidence of that occurring,” Bruce Zaro, chief technical strategist at Bolton Global Asset Management in Boston, said of the government shutdown, which began Friday at midnight.

U.S. Treasury yields, which tended to fall during previous government shutdowns, rose as investors saw limited economic fallout from the political standoff and focussed instead on a global economy motoring ahead and U.S. inflation pressures.

World markets were unfazed by the shutdown earlier in the day. The benchmark U.S. 10-year Treasury yield US10YT=RR on Monday closed at its highest level in more than three years, an extension of the selloff in U.S. bonds since September.

The rise in U.S. shares followed broad gains in Europe, where markets focussed on a flurry of mergers and acquisitions and upcoming corporate earnings reports. Progress toward an end to political deadlock in Germany helped the mood.

Traders work on the floor of the New York Stock Exchange shortly after the opening bell in New York, U.S., January 19, 2018. REUTERS/Lucas Jackson

The pan-European STOXX 600 index was up 0.3 percent, with major indexes rising in France and Germany. The UK's FTSE .FTSE was the main exception, dropping 0.2 percent.

The dollar remained stuck near three-year lows, continuing its weak start to the year. The dollar index .DXY fell 0.2 percent, with the euro EUR= up 0.3 percent to $1.2257.

In European bond markets, Spain’s borrowing costs ES10YT=TWEB dropped to a six-week low and the gap over its German peers DE10YT=TWEB fell to its tightest in almost three years after Fitch Ratings gave Spain its first “A” rating since the euro zone debt crisis.

Greece’s short-dated yields GR2YT=TWEBGR5YT=TWEB also fell after S&P Global Ratings upgraded the country’s credit ratings for the first time in two years.

Most other euro zone bond yields were little changed. Analysts said investors were probably moving to the sidelines before the European Central Bank’s first meeting of 2018 this Thursday.

Oil prices rose near three-year highs, with U.S. crude CLcv1 gaining 0.84 percent to $63.84 per barrel and Brent LCOcv1 at $69.26, up 0.95 percent on the day.