Strong housing and earnings reports helped stocks rebound from their worst day of the year.
The Dow Jones industrial average rose 157.58 points, or 1.1 percent, on Tuesday, to 14,756.78, winning back more than half of the 265 points it lost a day earlier. The Standard & Poor's 500 index logged its second-best day of the year.
Home construction topped 1 million last month, the highest level since June 2008. Robust earnings from companies including Coca-Cola also propelled the market higher.
A recovery in housing and a pickup in hiring were major catalysts driving the stock market's surge early this year. The Dow and the S&P 500 jumped 11.3 percent and 10.3 percent, respectively, in the first three months of 2013.
That run-up was interrupted Monday when stocks had their biggest decline since November. Worries about an economic slowdown in China led to a drop in prices for oil, copper, and other commodities, causing mining and energy stocks to fall. The rally had already slowed earlier this month after reports of weak hiring and retail sales suggested that the economy was cooling off.
"This is the first time in a while that we've had pretty positive numbers," said JJ Kinahan, chief derivatives strategist for TD Ameritrade. "We had one bad day yesterday. You can't say because of that one bad day that all bets are off."
While Chinese growth fell short of expectations, Monday's sell-off may have been disproportionate to the slight slowdown in China's growth.
The world's biggest economy still expanded at a rate of 7.7 percent in the first three months of the year, slowing from 7.9 percent the previous quarter and missing analysts' expectations by just 0.3 percentage points. China is watched especially closely because it is a major market for foreign goods from iron ore to smartphones and is relatively healthy. Investors hope demand from China can help offset weakness in the U.S., Europe and Japan.
Mining companies rose Tuesday as commodities markets stabilized and materials stocks gained the most of the 10 industry groups in the S&P 500 after leading the market lower the day before. Home builders advanced following the housing report. PulteGroup rose 75 cents, or 4.2 percent, to $18.60 and Lennar climbed 92 cents, or 2.4 percent, to $38.70.
The S&P 500 climbed 22.2 points, or 1.4 percent, to 1,574.57. It was the biggest gain since Jan. 2, when stocks rallied after lawmakers reached a last-minute deal to stop a series sweeping tax hikes and spending cuts from taking effect.
Gold, which was at the epicenter of Monday's sell-off, rose $26.30 to $1,387.40 an ounce, a gain of 1.9 percent.
The precious metal logged its steepest fall in 30 years Monday, plunging $140 an ounce, or 9 percent. Gold had been drifting lower since the start of the year and the decline accelerated Friday after the government reported a drop in inflation. People often buy gold when they're fearful of rising prices and sell it when they see inflation ebbing.
Gold is down 27 percent since it climbed to a record in August 2011, when lawmakers wrangled over raising the debt ceiling and threatened to push the U.S. into default.
Investors should expect a more volatile stock market until there is more confirmation that the economy is strengthening and the outlook for companies is improving, said Jeff Morris, head of U.S. equities at Standard Life Investment.
"Until we get evidence of more robust conditions in the second half we're going to be in more of a sideways market," said Morris. "You saw a fairly dramatic move yesterday; that's indicative of a market that's not quite sure of which direction to go."
While the Dow is up this month, the pace of gains is slowing and the index is on track to log its weakest month of the year. The Dow has risen 1.2 percent in the first two weeks of April, compared to an average monthly gain of 3.6 percent in the first quarter.
Small company stocks rose more than the broader market Tuesday, a sign that investors are moving money into riskier assets. The Russell 2000 index climbed or 1.8 percent to 922.30. That's a reversal from the day before, when the index plunged 3.8 percent.
In other trading, the Nasdaq composite rose 48.14 points, or 1.5 percent, to 3,264.63.
Yields on U.S. government bonds rose as investors moved money out of safe-haven investments. The yield on the benchmark 10-year Treasury note climbed to 1.72 percent from 1.68 percent.
Among stocks that made big moves:
Coca-Cola gained $2.28, or 5.7 percent, to $42.37 after its first-quarter results came in above Wall Street's forecasts. Coke said it struck a deal to start refranchising its business in the U.S., which will lower costs.
W.W. Grainger Inc., which sells power tools and other industrial equipment, rose $16.18, or 16.2 percent, to $241.88 after the company said its first-quarter net income climbed 13 percent.
U.S. Bancorp logged the biggest decline in the S&P 500. The lender dropped 59 cents, or 1.8 percent, to $32.72 after it reported first-quarter earnings that fell short of analysts' expectations. The Minneapolis bank's net income rose 7 percent to $1.43 billion as it set aside less cash to cover soured loans.
Whirlpool Corp. jumped $3.66 to $116.78 after the appliance maker raised its quarterly dividend 25 percent to 62.5 cents.