Stocks Eke Out a Gain, Led by Techs, Energy

Stocks eked out a gain Thursday after some late-session turbulence, led by techs. Energy stocks rebounded from the bottom of the pack to the No. 2 behind tech. Financials ended lower.

Economic data were a mixed bag: The services sector grew for a fifth straight month but the report wasn't a blowout. Stocks had opened higher after a pair of encouraging employment reports.

Energy and financials have swung between positive and negative territory in the past few sessions, taking the broader market with them. Both had been lower for most of the day but energy turned higher in late trading.

The Dow Jones Industrial Average ended up about five points, or less than a tenth of a percent, in the market's first two-day gain since April.

The S&P 500rose 0.2 percentand the Nasdaqjumped 1 percent. The CBOE volatility indexwas below 30 at the closing bell.

Microsoft and Cisco were the Dow's best performers. The biggest drags were Home Depot , DuPont and JPMorgan .

Stocks saw their third best day of the yearWednesday, thanks to a late-session rally, with each of the three major indexes ending more than 2 percent higher, led by energy and financials after better-than-expected housing data boosted investor sentiment.

“Yesterday’s rally was a short-term pause in a pre-established downtrend,” said Tom Schrader, managing director for U.S. equity trading at Stifel Nicolaus. “We’re seeing weakness in euro/dollar, which is not good for equities, and continued speculation on the European banking community and economy.”

Stocks may fall another 5 percent during these summer months, Schrader added.

There’s also speculation that the Swiss banking community may not be supporting the euro as they have in the past, he added.

The dollar rose against the eurowhile credit spreads tightened, with three-month Libor rising to 0.53781 percent and the Ted spread , or the difference between Libor and the three-month Treasury note, increasing to 0.4008 percent.

Oil prices rose toward $74 a barrel after U.S. government data showed crude and gasoline stocks had fallen more than expectedlast week. And gold fell near $1,200 an ounce.

Gold miners took a hit as shares of Barrick Gold , Newmont Mining and AngloGold each dropped more than 2 percent.

BP shares retreated after both Fitch and Moody's slashed their credit ratings on BP. The company continued its attempt to slow oil spewing from its leaking pipe in the Gulf, taking a "significant step forward" after successfully cutting a pipe. Meanwhile, oil washed ashore in Alabama and Mississippi.

UBS cut the price targets of a handful of energy companies including Diamond Offshore , Halliburton and Noble Energy .

In U.S. economic news, the ISM reported its nonmanufacturing index, one of the best gauges of the services sector, which accounts for 80 percent of economic activity, held steady at 55.4 in May from April. Still, the index has remained above 50, a level that indicates growth, for five straight months.

Meanwhile, factory orders rose 1.2 percent in April after a 1.7-percent gain in March. Plus, the government said initial claims for unemployment insurance dropped to 455,000last week, though the number of people still receiving benefits rose unexpectedly. And the private sector added 55,000 jobs in May, less than expected, according to a report from ADP.

The ADP report is closely watched ahead of the government’s May employment report, due out on Friday. Economists expect to see 513,000 jobs were added to nonfarm payrolls last month, after a 290,000 increase in the prior month.

A separate report showed nonfarm productivity slowed to a 2.8 percent annual rate in the first quarter, down from the initial estimate of 3.6 percent and the slowest pace in a year, as businesses started adding workers to maintain output.

Tech stocks ended mostly higher, led by Dell after CEO Michael Dell said he has considered taking the company private.

Microsoft rose 1.5 percent after CEO Steve Ballmer said the company will continue to prosper even as the shift toward smartphones and tablets creates some "potential tumult" in the market.
JPMorgan ended lower following news that the banking giant has been fined $49.12 million by the UK's industry watchdog, the Financial Services Authority, for not protecting client money over a period of seven years. The fine is the largest the FSA has ever handed out.

Other financials such as Bank of America , Morgan Stanley and Goldman Sachs also fell.

Major retailers reported their May salesthis morning, with mixed results.

Macy's , Gapand Saks all beat expectations, while Costco and Target fell short of forecasts.

Fed Chairman Bernanke said small-business lending is declining, thus making it more difficult to come to grips with the persistent problem of high unemployment. And, Atlanta Fed President Dennis Lockhart said the U.S. economy is almost strong enough to allow the Fed to begin raising interest rates.

Nielsen Holdings, the largest provider of TV ratings, is planning to file for an IPO soon, the Wall Street Journal reported.

And Facebook CEO Mark Zuckerberg told the All Things Digital Conference that he has no particular date in mind to take his company public.

Volume was average ahead of Friday's jobs report, with 1.2 billion shares changing hands on the New York Stock Exchange. Advancers outpaced decliners, nearly 2 to 1.

Still to Come:

FRIDAY: May jobs report; Fed's Lockhart speaks; Walmart shareholder meeting; Sprint's first 4G phone goes on sale

More From CNBC.com: