"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.
New yuan loans in China 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.
The Dow Jones industrial average closed up about 222 points with Boeing, UnitedHealth and Home Depot the top contributors to gains.
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.
Read MoreWas that really the bottom? We'll see this 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 2-year yield 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.
Read MoreEarly movers: ADT, HRL, GNRC, AAPL, GRPN, CYH, ZTS, KMI, VOD & more
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 Dow Jones industrial average closed up 222.57 points, or 1.39 percent, at 16,196.41, with Boeing leading advancers and Wal-Mart and Travelers Cos the only decliners.
The S&P 500 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: