Stocks squeeze out gains as Street awaits jobs Friday

U.S. stocks closed higher Thursday, building on the gains of the week so far, as oil prices stabilized ahead of Friday's jobs data. ( Tweet This )

"It's been a difficult road today but we're gaining some leadership out of the energy sector," said Robert Pavlik, chief market strategist at Boston Private Wealth.

"When the bears tried to push down and didn't see any follow through, I think the market saw that as an opportunity. I don't think there's any news behind it," he said.

The major averages crept higher as the close approached, with the Dow Jones industrial average ending about 44 points higher and the S&P 500 up about 7 points. Energy led advancers and closed up more than 1 percent, in positive territory for the year so far.

"I think it's a lot of waiting for tomorrow. A lot of the data we had today wasn't exactly major market-moving (news)," said Bill Stone, chief investment strategist at PNC Asset Management.

"The fears of a U.S. recession have really declined and obviously the payrolls is the biggest thing for people," he said. "It still seems like the market in a lot of cases is still hostage to oil."

U.S. crude oil futures settled down 9 cents, or 0.26 percent, at $34.57 a barrel.

Read MoreShale gale crushing natural gas prices

The Nasdaq composite eked out a 4-point gain and ended 10.03 percent below from its 52-week intraday high, on the edge of breaking out of correction territory. The S&P and Dow were both within 10 percent of their 52-week highs.

The Dow transports outperformed the major averages, closing up 1.13 percent and in positive territory for 2016. The Russell 2000 closed up nearly 1 percent.

"I think (investors) are looking for a cyclical rebound and the transports represent that cyclical bounce on that recognition the economy is not as weak as initially thought," Pavlik said.

DJIA year-to-date performance


Source: FactSet

Stock moves were muted for most of the session, even amid release of morning data on the services sector. Investors will be watching Friday's jobs report for indications on the path of Fed tightening.

"Before the big labor reports it's not uncommon for the market to be pretty quiet," said Randy Frederick, managing director of trading and derivatives at Charles Schwab.

Read MoreWhy the jobs report is more important than usual

Ahead of the data release, Dallas Federal Reserve President Robert Kaplan, an alternate member of the FOMC, said in a Reuters report Thursday the "Fed needs to show patience in decisions to remove accommodation."

Treasury yields were lower afternoon trade, with the 2-year yield near 0.83 percent and the 10-year yield around 1.83 percent. The U.S. dollar was more than half a percent lower against major world currencies, with the euro at $1.096 and the yen at 113.60 yen against the greenback.

Economists polled by Reuters expect February's employment report to show 190,000 nonfarm payrolls and the unemployment rate unchanged at 4.9 percent.

"The problem is there's no indication whether they will miss or beat. I think you've got a heightened expectation of heightened volatility with no expectation of excess return," said David Kelly, chief global strategist at JPMorgan Funds.

As of Thursday's close, the major U.S. averages were on pace for their first three-week win streak of 2016, with gains of 1.8 percent or more.

"I think this is more of a reduction of concerns from China, oil and central banks," said Douglas Cote, chief market strategist at Voya Investment Management.

"We're seeing some better fundamental reductions in risk and that's supportive of the market. Going forward we think the market will be range-bound until we get corporate earnings," he said.

The ISM non-manufacturing survey for February came in at 53.4, above expectations but a touch below January's 53.5 read. The employment component fell below the 50 contraction-expansion line for the first time in two years.

Sharon Stark, fixed income strategist at D.A. Davidson, said the ISM services figure was weaker than her expectations, especially with employment below 50.

"That gave the (Treasury) market a little bit of fuel. ... No one wants to go in long or short. They want to go in neutral (ahead of Friday's jobs report)," she said, noting a slight reversal from Wednesday's decline in Treasurys.

Read MoreCountdown to jobs report: What traders are watching

In other economic news, the final February Markit services PMI was 49.7, down from January's final 53.2 print and the lowest since October 2013.

January factory orders rose 1.6 percent. Durable goods orders were revised slightly lower show a rise of 4.7 percent, versus the prior 4.9 percent increase.

Ahead of the opening bell, weekly jobless claims came in at 278,000. Revised fourth-quarter productivity declined 2.2 percent, while unit labor costs rose 3.3 percent.

"We haven't seen strong data yet but we are seeing data stabilizing," said John Toohey, head of equities at USAA Investments.

"I can't attribute all the stabilization in the stock market to the fact the economic data has stabilized because the market was oversold and there was some forced selling and that has dissipated," he said. Still, "if the economy hadn't stabilized the market would be a lot weaker."

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

The Dow Jones industrial average closed up 44.58 points, or 0.26 percent, at 16,943.90, with Caterpillar leading advancers and McDonald's the greatest decliner.

The S&P 500 closed up 6.95 points, or 0.35 percent, at 1,993.40, with energy leading eight sectors higher and health care and information technology the only decliners.

The Nasdaq composite closed up 4.00 points, or 0.09 percent, at 4,707.42. Apple gained 0.74 percent.

About three stocks advanced for every decliner on the New York Stock Exchange, with an exchange volume of nearly 1.2 billion and a composite volume of almost 5.1 billion.

The CBOE Volatility index (VIX), widely considered the best gauge of fear in the market, held below 17.

Gold futures for April delivery settled up $16.40 at $1,258.20 an ounce.

Read MoreEarly movers: JOY, COST, HLF, LB, DIS, SHW, GRPN, INTC, BBRY & more

On tap this week:

Friday

Earnings: Staples, WPP Group

8:30 a.m. Employment report; international trade

1 p.m.: Oil rig count

1 p.m.: Dallas Fed President Rob Kaplan speaks

*Planner subject to change.

More From CNBC.com: