U.S. equities followed their European counterparts with a broad rally, and communications services and consumer discretionary stocks led the charge.
But crude oil prices slumped as weak demand and a potential increase in production offset the effects of the U.S. fiscal aid package signed late on Sunday by President Donald Trump.
He reversed course by signing a $2.3 trillion stimulus and spending bill into law, heading off a potential government shutdown and setting the stage for congressional Democrats to push for more robust direct payments of $2,000 to millions of Americans.
"Finally something has gotten done and it's given the market reason to be optimistic," said Robert Pavlik, senior portfolio manager at Dakota Wealth in Fairfield, Connecticut. "We've still got dark day days ahead with COVID, but with the stimulus package and Brexit deal, it gives us reason to focus on the positive."
Britain reached a trade agreement with the European Union on Thursday, days before leaving one of the world's largest trading blocs, and urged businesses to prepare for disruptions resulting from the completion of Brexit.
The Dow Jones Industrial Average rose 204.1 points, or 0.68%, to 30,403.97, the S&P 500 gained 32.3 points, or 0.87%, to 3,735.36 and the Nasdaq Composite added 94.69 points, or 0.74%, to 12,899.42.
European shares had their strongest close in 10 months and German shares hit an all-time high on the U.S. stimulus and Brexit trade deals.
The ongoing rollout of coronavirus vaccines also buoyed sentiment, with Pfizer Inc announcing it expects to complete distribution of 200 million doses in Europe by September.
Markets in Britain were closed on Monday in observance of the Boxing Day holiday.
The pan-European STOXX 600 index rose 0.66% and MSCI's gauge of stocks across the globe gained 0.55%.
U.S. Treasury yields rose early in the session but gave up those gains by the end of the session as the risk-on rally lost some steam.
Benchmark 10-year notes last rose 1/32 in price to yield 0.9264%, from 0.93% late on Thursday.
The 30-year bond last rose 4/32 in price to yield 1.6616%, from 1.666% late on Thursday.
The dollar was flat against a basket of world currencies but the euro gained strength as investors priced out Brexit risk.
The dollar index rose 0.03%, with the euro up 0.06% to $1.2211.
The Japanese yen weakened 0.32% versus the greenback at 103.84 per dollar, while Sterling was last trading at $1.3445, down 0.76% on the day.
Crude prices dropped as the prospect of increased OPEC+ output in the face of weak demand dampened stimulus cheer.
U.S. crude dropped 1.26% to settle at $47.62 barrel. Brent settled at $50.86 per barrel, down 0.84% on the day.
Gold reversed its early gains as the dollar recovered its losses amid the stocks rally.
Spot gold dropped 0.2% to $1,872.87 an ounce.
(Reporting by Stephen Culp in New York; Additional reporting by Danilo Masoni in Milan; Editing by Dan Grebler)
By Stephen Culp