Dow closes up triple digits; Nasdaq snaps 8-day losing streak

U.S. stocks closed higher Tuesday, recovering slightly from a sharply lower start to the year and shaking off pressure from an intraday dip in oil below $30 a barrel.

Stabilization in the Chinese yuan overnight and oil's initial attempt at gains helped stocks rise more than 1 percent in the open.

The major U.S. averages recovered some of their opening gains after an intraday turn lower as oil declined, but ended off session highs.

"For worldwide market sentiment, if China can stabilize it definitely can help markets stabilize worldwide. but that has to be sustained and oil is still driving the market," said Peter Coleman, head trader at Convergex.

The Dow Jones industrial average closed about 117 points higher, after falling more than 70 points and rising 192.78 points in the open. The S&P 500 closed up nearly 0.8 percent after earlier falling into negative territory.

The Nasdaq composite outperformed to close up 1.03 percent, off session highs of a more than 1.5 percent rise but after posting eight-straight days of losses. The Nasdaq composite closed lower Monday to post its first eight-day losing streak since January 2008.

"The good news is, after the close in energy prices, we know it's not going to go any lower," said Art Hogan, chief market strategist at Wunderlich Securities.

Read MoreEnergy experts question oil's bottom

The oil settle, which usually comes around 2:30 p.m. ET, was delayed amid the heavy volatility of the session. Dow Jones reported crude settled down 97 cents at $30.44 a barrel.

Oil prices remained near their lowest in more than a decade as oversupply concerns persisted. In intraday trade, Brent futures hit a low of $30.34 a barrel and U.S. crude oil futures briefly fell more than 4 percent to below $30 a barrel.

WTI has settled lower every single day of the year so far, for a seven-day losing streak, its longest consecutive decline since a nine-day losing streak in July 2014.

Analysts at several major firms cut their 2016 oil forecasts this week, with Standard Chartered saying oil could fall as low as $10 per barrel.

"Whatever the number is, the logic behind it is the market has to reach a shocking level for oil producers of all (types) to respond," said John Kilduff, founding partner at Again Capital. His target is $18 and he expects oil to trade in a range between $14 and $48 this year.

Copper hit a fresh low going back to April 2009. The decline pressured Freeport-McMoRan, which closed down 4.6 percent, well above session lows. Freeport shares fell 20 percent Monday amid declines in copper and news Arch Coal filed for Chapter 11 bankruptcy protection, as part of a restructuring agreement reached with lenders who hold more than $4.5 billion of the coal mining company's debt.

"The Arch Coal bankruptcy reminds me that 0 is the ultimate number for these bankruptcies," Kilduff said.

In the close, the Nasdaq composite and Dow Jones industrial average remained 10 percent or more below their 52-week intraday highs, in correction territory. The S&P 500 closed within 10 percent of its 52-week high.

"Today is a relief rally on China's ability to stabilize their own markets and I believe China-inspired volatility will continue in 2016 because what they need to do is move to a freer market and they're having trouble letting go," said Doug Cote, chief market strategist at Voya Investment Management.

Overnight, the Chinese central bank set the yuan mid-point fix at 6.5628 against the dollar, similar to Monday's fix of 6.5626.

Read MoreChina opens new front in war on yuan speculators

"You can't both do reform and maintain a 6.5 percent growth rate at the same time. ... The feedback loop is slowing global growth. That's one of the implications of low oil," Cote said.

In November, China's President Xi Jinping said the country's economic growth rate will not be less than 6.5 percent in the five years to 2020, Reuters reported, citing the state-run Xinhua news agency.

Traders were watching to see whether Tuesday's early rally was sustainable. Weakening in China's currency and speculation of further devaluation helped pressure U.S. stocks to end the first trading week of the year down nearly six percent or more, their worst week since 2011.

"At the highest level, investors are starting to adjust to the uncertainty of a new regime of interest rates in the United States," said Omar Aguilar, chief investment officer, equities, at Charles Schwab Investment Management. "Then we have significant headwinds coming out of emerging markets."

Read More'Now you know': Why Fed feared a quarter-point hike

Stocks in Europe closed off session highs Tuesday, while Chinese stocks closed slightly higher after wavering between gains and losses on Tuesday, following a sharp plunge Monday.

"I get the sense where this market is one where ... the overarching concern is global macro, so rallies are seen more as selling opportunities," Hogan said.

BTIG Chief Technical Strategist Katie Stockton said in a morning note that the rally in the S&P futures Tuesday morning could be the beginning of an oversold bounce that might last one to two weeks.

"Unfortunately, the SPX would have to rally about 100 points by Friday in order to suggest a shakeout (read: false breakdown) has occurred," she said. "As it stands, breakdowns are abundant from a bottom-up perspective, so we think near-term strength is best viewed as an opportunity to take down exposure."

The November Job Openings and Labor Turnover Survey showed 5.431 million openings. The November quits rate was 2.0 percent, unchanged from the mildly upwardly revised October rate, according to StreetAccount.

Treasury yields held lower with the 2-year yield at 0.93 percent and the 10-year yield at 2.11 percent. On Tuesday, the 2-year yield touched 0.908 percent, its lowest in 4 weeks, and the 10-year yield touched a low of 2.08 percent, its lowest since late October.

The Treasury Department auctioned $24 billion of 3-year notes at a high yield of 1.174 percent, the lowest yield since October, according to Reuters.

The U.S. dollar traded about 0.3 percent higher against major world currencies, with the euro near $1.085 and the yen at 117.71 yen against the greenback.

Symbol
Name
Price
 
Change
%Change
DJIA
---
S&P 500
---
NASDAQ
---

Alcoa closed down 9 percent after reporting earnings that beat expectations but revenue slightly below forecasts.

The aluminum producer unofficially kicked of earnings season with its report after the close Monday. CSX is scheduled to post results after the close and major financial firms are due to report Thursday.

Read MoreEarly movers: DRI, AA, LULU, INTC, BA, MYL, TWX, SBUX, AAPL & more

The Dow Jones industrial average closed up 117.65 points, or 0.72 percent, at 16,516.22, with UnitedHealth leading advancers and DuPont the greatest laggard.

The Dow transports recovered from an intraday dip to close nearly 1 percent higher.

The S&P 500 closed up 15.01 points, or 0.78 percent, at 1,938.68, with information technology leading eight sectors higher and telecommunications and utilities the only decliners.

The Nasdaq composite closed up 47.93 points, or 1.03 percent, at 4,685.92. The iShares Nasdaq Biotechnology ETF (IBB) closed 1.55 percent higher. Apple ended up 1.45 percent.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, held near 22.5.

About eight stocks declined for every seven advancers on the New York Stock Exchange, with an exchange volume of 1.1 billion and a composite volume of nearly 4.9 billion in the close.

Gold futures for February delivery settled down $11 at $1,085.20 an ounce.

On tap this week:

Wednesday

Earnings: Infosys, Supervalu

7:45 a.m.: Boston Fed President Eric Rosengren

10 a.m.: Atlanta Fed business inflation expectations

10:30 a.m.: Oil inventories

12:30 p.m.: Chicago Fed President Charles Evans

1 p.m.: 10-year note auction

2 p.m.: Federal budget, Beige book

Thursday

Earnings: JPMorgan Chase, Intel, First Republic Bank, Shaw Comm.

8:15 a.m.: St. Louis Fed President James Bullard

8:30 a.m.: Initial claims, import prices

10:30 a.m.: Natural gas inventories

1 p.m.: 30-year bond auction

Friday

Earnings: BlackRock, Citigroup, US Bancorp, Wells Fargo, PNC Financial Services, Fastenal

8:30 a.m.: Retail sales, PPI, Empire state manufacturing survey

9 a.m.: New York Fed President William Dudley

9:15 a.m.: Industrial production

10 a.m.: Consumer sentiment, business inventories

1 p.m.: Dallas Fed President Robert Kaplan

1 p.m.: Oil rig count

*Planner subject to change.

More From CNBC.com: