Traders At New York Stock Exchange
Traders work the floor of the New York Stock Exchange. Reuters

This story was updated at 4:15 p.m. EDT.

U.S. stocks chalked up their biggest one-day gain in months Tuesday, rising more than 1 percent thanks to a rally in financial shares, and with commodity prices boosting energy and industrial stocks.

The Dow Jones Industrial Average closed the day up 222 points, or 1.3 percent, at 17,928, while the broader S&P 500-stock index was up 26 points, or 1.3 percent, at 2,084. The Nasdaq Composite index jumped 60 points, or 1.3 percent, to 4,810.

Shares of Amazon rose 3 percent to $703, hitting a new record high and helping to propel the S&P 500 to its best day in two months. Bernstein raised its price target on the stock to $1,000, the highest on Wall Street, saying it expects Amazon's margins to expand much faster than currently expected.

Oil prices jumped as supply disruptions of 2.5 million barrels per day in Canada and elsewhere offset concerns about record-high U.S. crude stockpiles. U.S. crude settled up 2.8 percent at $44.66 a barrel, while benchmark Brent crude settled up 4.3 percent at $45.52 a barrel. Oil prices have recovered some ground after touching 12-year lows earlier in 2016.

Amazon.com Inc. (AMZN) | FindTheCompany

World stock markets also rose Tuesday, helped by solid corporate earnings in Europe, progress on Greek debt talks, and a new pledge by Japan that it was prepared to weaken its currency.

The S&P 500, which has risen about 15 percent since its February lows, has slowed its rally in the last two weeks due to underwhelming quarterly earnings and mixed U.S. economic data.

"The market has been resilient and has offered the opportunity for the buyers of the pullback to capitalize on it, and that's why we're seeing a move back into equities," said Andre Bakhos, managing director at Janlyn Capital LLC in Bernardsville, New Jersey.

U.S. stocks broke a three-day losing streak to close higher on Friday after a disappointing U.S. jobs report suggested the Federal Reserve would raise rates just once this year. Wall Street also ended mostly higher on Monday, helped by a rally in healthcare shares.

Goldman Sachs' 2-percent increase helped lift the Dow. All 10 major S&P sectors were higher, led by a rise in the energy index.

Shares of Amazon rose after the e-commerce giant said it is opening its doors to video creators through a new service called Amazon Video Direct, potentially taking on YouTube.

The Goldman Sachs Group Inc. (GS) | FindTheCompany

Gap shares fell 12 percent to $19 after the clothing retailer reported a decline in sales for the fifth straight quarter.

SolarCity was down 21 percent at $18 after the solar panel maker posted a bigger-than-expected quarterly loss and cut its forecast.

Shares of Allergan rallied after the Botox maker reported a better-than-expected quarterly profit.

Dow component Disney and video game publisher Electronic Arts are scheduled to report after the closing bell.

Data from Reuters were used to report this story.