GettyImages-485369712
Traders work on the floor of the New York Stock Exchange during the morning of August 27, 2015 in New York City. Getty Images/Andrew Burton

This story was updated at 4 p.m. EDT

U.S. stocks closed sharply higher Tuesday, with the Dow Jones Industrial Average soaring nearly 400 points after mixed Chinese trade data increased hope for additional stimulus to boost growth in the world’s second-largest economy. The major U.S. averages rallied more than 2 percent, helping pull the Standard & Poor's 500 index and Nasdaq composite out of correction territory.

The tech-heavy Nasdaq turned green for the year, helped by a 1.5 percent gain from iPhone-maker Apple Inc. (NASDAQ:AAPL) ahead of its blockbuster event Wednesday. The company is set to unveil a number of products, including its highly anticipated iPhone 6S models.

The Dow Jones Industrial Average (INDEXDJX:.DJI) leaped 390.30 points, or 2.42 percent, to close at 16,492.68. The Standard & Poor's 500 index (INDEXSP:.INX) rose 48.19 points, or 2.51 percent, to end at 1,969.41. The Nasdaq composite (INDEXNASDAQ:.IXIC) gained 128.01 points, or 2.73 percent, to finish at 4,811.93.

All 10 sectors in the S&P 500 closed higher, led by a roughly 3 percent gain in technology and industrial stocks. The financial, healthcare and materials sectors rallied around 2.7 percent.

All 30 stocks in the Dow finished higher, led by components General Electric Company (NYSE:GE) and Wal-Mart Stores Inc. (NYSE:WMT), which gained 4 percent and 3.9 percent, respectively. Healthcare and technology also helped propel the blue-chip index higher as Pfizer Inc. (NYSE:PFE) and Intel Corporation (NASDAQ:INTC) gained 3.7 percent 3.4 percent, respectively.

Dow Jones Industrial Average ($DJI) Stock Price - Trailing Year | FindTheBest

In the midst of the recent global market turmoil surrounding fears over China’s slowing growth, billionaire investor Warren Buffett said Tuesday the U.S. economy is growing at a rate of about 2 percent. All three major U.S. indexes closed sharply lower Friday after the U.S. economy added fewer-than-expected jobs in August, suggesting the Federal Reserve will hold off on raising interest rates at its meeting later this month.

"We're still on that path we've been on for six years," the chairman and CEO of Berkshire Hathaway said on CNBC's "Squawk Alley Tuesday." "That's not a bad rate, but it's not a booming rate, either."

The comments come ahead of the Federal Reserve’s highly anticipated meeting Sept. 16-17. The central bank could announce raising interest rates as early as this month, marking the first increase in nearly a decade. "If our rates got substantially higher than Europe's, I don't think that would be good for exports in this country," Buffett said.

Global oil prices traded higher Tuesday after a rise in Chinese crude imports offset concerns about Asia's slowing economic growth. On the London ICE Futures Exchange, Brent crude, the global benchmark for oil prices, rose 2 percent to $49.50. However, West Texas Intermediate crude, the benchmark for U.S. oil prices, lost 11 cents to $45.94 per barrel for October delivery on the New York Mercantile Exchange.

WTI Crude Oil Spot Price - 1 Year | FindTheData

Following another volatile trading session in Asia, a surge in late-day trading boosted China’s benchmark Shanghai Composite up nearly 3 percent to close at 3,170.57. The rally came in the final minutes trading after the National Development and Reform Commission (NDRC) approved two infrastructure projects worth nearly 70 billion yuan ($11 billion).

Chinese imports fell for the 10th month in a row, signaling the country’s move to devalue the yuan last month has yet to have a major effect.

The country’s imports tumbled 13.8 percent in August compared with 8.1 percent in July, reflecting lower global commodity prices and sluggish demand. Analysts had forecast imports to drop 8.2 percent. Exports dropped 5.5 percent from a prior decline of 8.3 percent.

While China’s trade growth weakened further last month, experts say the country’s outlook is brighter than previously thought.

“We think trade growth ought to recover over the coming quarters. The drag from the Tianjin blast and Victory parade disruptions ought to have mostly faded this month,” Julian Evans-Pritchard, China economist at Capital Economics, said in a research note Tuesday.

Looking ahead, stronger growth in China’s main trading partners should shore up exports while a pick-up in investment spending will boost imports, Evans-Pritchard said.

Shanghai Composite Index (Closing) - 1 Year | FindTheData

Japan's Nikkei 225 index closed deep in the red Tuesday, erasing all gains for the year despite the economy shrinking slightly less than expected in the second quarter. Japan’s GDP dropped by 0.3 percent (1.2% annualized) last quarter compared with an initial estimate for a decline of 0.4 percent (1.6% annualized).

The result was stronger than most analysts had expected, but suggests a rapid recovery in the second half of the year is not in the cards.

Meanwhile, European stocks extended gains Tuesday and closed higher, with Germany’s DAX soaring 1.6 percent after the country’s trade surplus rose to a record 22.8 billion euros ($25.5 billion) from 22.1 billion euros ($24.7 billion), signaling strong demand for German goods.

Although Chinese weakness is continuing to negatively affect manufacturers in East Asia and commodity producers around the world, experts say other countries stand to benefit from low energy prices.

“European stocks seem even more compelling in the short run as a falling unemployment rate and low commodity prices should spur consumer spending while a low euro boosts Europe’s share of global export markets,” David Kelly, chief global strategist at JPMorgan Funds, said in a note.

The pan-European STOXX 600 closed 1.2 percent higher, while France’s CAC jumped 1 percent.

DAX Index (Closing) - 1 Year | FindTheData

The eurozone’s economy grew faster than previously estimated in first half of this year. The eurozone gross domestic product growth was revised higher to 0.4 percent in the second quarter, up from an initial estimate of 0.3 percent, boosted by household consumption and exports. The eurozone’s GDP had previously expanded 0.5 percent in the first quarter.

Germany, the eurozone’s largest economy, saw its exports climb in July, a day after data showed that industrial output slowed in July. Germany’s exports rose 2.4 percent in July after dropping 1.1 percent in June, topping expectations for a rise of 0.7 percent.