U.S. stocks closed more than 1 percent higher Tuesday, helped by gains in consumer discretionary and financials, as well as positive developments in China. (Tweet This)
The Dow transports closed up 2.28 percent to end above their 50-day moving average for the first time since Dec. 1.
"Everything else other than low oil seems to be bullish for stocks," said Peter Coleman, head trader at Convergex. Gold lost $31.20, or 2.5 percent, at $1,208.20 an ounce for its worst daily drop since mid-December. Treasury yields rose.
U.S. crude oil futures settled down 40 cents, or 1.36 percent, at $29.04 a barrel as no deal on a supply cut emerged.
"It's China and consumer really leading the way today, which is really powerful because those were the two concerns," said Ilya Feygin, managing director and senior strategist at WallachBeth Capital.
Consumer discretionary closed up 2.47 percent to lead all S&P 500 sectors higher, while the SPDR S&P Retail ETF (XRT) gained 4 percent for its best day since 2011. Core retail sales topped expectations Friday with a 0.6 percent rise last month after an unrevised 0.3 percent decline in December.
Stabilization in the yuan, some alleviation of fears of sharp economic slowdown and gains in Chinese equities helped China-related ETFs such as ASHR soar 7 percent in the close.
Feygin also said news of Apple launching a $12 billion nine-part bond offering was another positive for market sentiment.
Financials closed up 1.77 percent as the fifth-best advancer in the S&P 500. The sector is down more than 12 percent year-to-date as the worst performer in the index. The SPDR S&P Bank ETF gained 2.7 percent and the Regional Banking ETF closed up 2.96 percent.
"For us to have a good run to the upside you need financials to be a big participant," said JJ Kinahan, chief strategist at TD Ameritrade.
"I think it's a bit of recovery from oversold levels and I think we also got a shot in the arm with Asia markets overnight up and really having a solid day," Kinahan said.
U.S. markets were closed Monday for Presidents Day. Mainland Chinese markets reopened Monday after a week-long Lunar New Year holiday and closed higher Tuesday, with the Shanghai composite up more than 2.5 percent for the week so far. The Nikkei 225 held slight gains Tuesday for week-to-date gains of nearly 7.4 percent.
European stocks closed lower Tuesday as declines in oil prices weighed. Brent settled down 3.6 percent at $32.18 a barrel.
"People came into today pretty bullish in the morning based on how China is dealing with its currency," Coleman said.
Over the weekend, People's Bank of China Governor Zhou Xiaochuan reiterated in an interview with Caixin there is no basis for continued yuan depreciation.
The currency's midpoint fix hit its strongest level of 2016 against the U.S. dollar on Monday, and weakened only slightly on Tuesday.
hit a record high of 2.51 trillion yuan ($385.40 billion) in January, while total social financing nearly doubled from the previous month to 3.42 trillion yuan in January, according to Reuters. Anticipation of the early February Lunar New Year holidays was likely a key factor behind the rise, analysts said.
The Nasdaq composite outperformed the major U.S. averages with gains of more than 2 percent for its best day of the month so far. Apple gained 2.8 percent to also post its best day of the month.
Earlier, the Dow briefly halved opening gains as oil extended losses.
"You've got some guys taking profits. You had a heck of a run Friday," said John Caruso, senior market strategist at RJO Futures.
The Dow closed up more than 300 points Friday but still lost about 1.4 percent for the week.
"Last week it was all about negative interest rates and spillover on European banks. ... Today is all about energy prices. Today is all about catchup," said Art Hogan, chief market strategist at Wunderlich Securities.
Oil gave up gains from a sharp overnight rally as hopes for a supply cut were dashed. Four of the world's largest producers did agree to freeze output at January levels, if other major exporters joined the deal.
"I think it's dubious," said Mark Luschini, chief investment strategist at Janney Montgomery Scott. "It's showing up in oil prices not... up significantly."
Still, analysts said hopes of progress towards reducing oversupply helped market sentiment. Gains in Asian equities for the week so far also supported a risk-on mode.
In economic news, the U.S. Empire Manufacturing Index for February came in at negative 16.64, a worse read than expected but better than January's print of minus 19.37.
Homebuilder sentiment in February declined to 58.
Treasury yields held higher, with the 10-year yield at 1.78 percent and the at 0.73 percent.
The U.S. dollar index held 1 percent higher to hit its highest level in more than a week. The euro was near $1.114 and the yen at 113.98 yen against the greenback.
In his first speech as head of the Minneapolis Fed, Neel Kashkari urged a radical shakeup of Wall Street's banks, straddling the line between the Fed's policymaking remit and political advocacy, Reuters said.
He said in prepared remarks that "bolder, transformational options" must be seriously considered, including breaking up banks, turning large banks into public utilities and taxing leverage throughout the financial system.
Separately, Philadelphia Fed President Patrick Harker, said in a Reuters report he expected the central bank to be able to hike rates more "meaningfully" in the second half of 2016 once financial and energy markets stabilize.
Both Harker and Kashkari are alternate members of the Federal Open Market Committee this year.
"Neither of them said anything to harm the market," Kinahan said.
Boston Fed President Eric Rosengren, a voting member, is scheduled to speak in the evening.
On Monday, European Central Bank President Mario Draghi said the ECB is "ready to do its part" to make "the euro area more resilient", hinting at further stimulus measures to come.
In corporate news:
Alibaba bought a 5.6 percent stake Groupon and became its fourth-largest shareholder. Shares of Alibaba closed up nearly 9 percent, while Groupon leaped more than 40 percent to close at $4.08 a share.
Apple's Apple Pay mobile payment system will be available in China from Feb. 18 for Industrial and Commercial Bank of China customers, bank representatives said in social media posts Tuesday, Reuters reported. An Apple spokeswoman declined to comment.
The major U.S. averages posted their second-straight day of gains Tuesday, but remained more than 10 percent below their 52-week intraday highs, in correction territory. As of the close, the S&P 500 was down 7.26 percent for the year so far.
The closed up 30.80 points, or 1.65 percent, at 1,895.58, with consumer discretionary leading all 10 sectors higher.
The Nasdaq composite closed up 98.44 points, or 2.27 percent, at 4,435.96.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, held near 24.
About five stocks advanced for every decliner on the New York Stock Exchange, with an exchange volume of 1.2 billion and a composite volume of about 4.5 billion in the close.
—CNBC's Matt Clinch and Reuters contributed to this report.
On tap this week:
4 p.m. TIC data
7:30 p.m. Boston Fed President Eric Rosengren
Earnings: Priceline, Noble Energy, T-Mobile, Lumber Liquidators, Eaton Vance, Marathon Oil, Newmont Mining, Brocade, Angie's List, Analog Devices, Dr. Pepper Snapple, Garmin, Iamgold, La-Z-Boy
8:30 a.m. PPI; housing starts
9:15 a.m. Industrial production
2 p.m. Fed minutes
6 p.m. St. Louis Fed President James Bullard
Earnings: Wal-Mart, Nordstrom, Applied Materials, Duke Energy, Discovery Communications, Hyatt, MGM Resorts, Dish Networks, Kate Spade, Crocs, Scana, SodaStream, Toro, Dana Holdings, Fluor, Imax, Six Flags, BJ's Restaurant, Boston Beer, WageWorks
8:30 a.m. Initial claims; Philadelphia Fed survey
10 a.m.: Leading indicators
10:30 a.m.: Natural gas inventories
11 a.m.: Oil inventories
3:30 p.m. San Francisco Fed President John Williams
4:30 p.m.: Fed balance sheet
Earnings: Deere, Public Service, VF Corp, Cabot Oil and Gas, Allianz ,Pinnacle West, Echostar
8:30 a.m. CPI
8:40 a.m. Cleveland Fed President Loretta Mester
1 p.m.: Oil rig count
*Planner subject to change.
More from CNBC.com: