Evelyn Cheng | @chengevelyn
CNBC.com
U.S. stocks closed lower Thursday, stabilizing after their largest three-day gain since August, as investors eyed oil prices and corporate news.
“I think we’re in a trading-range market. I think there’s a need for time to indicate oil is stabilizing at current levels,” said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management.
U.S. crude oil futures came off session highs but managed to settle higher, up 11 cents at $30.77 a barrel, after weekly crude inventories rose by 2.1 million barrels.‹
The S&P 500 and Nasdaq composite quickly gave up opening gains. The Dow Jones industrial average struggled to hold gains as a rise in shares of IBM countered declines in Goldman Sachs and Wal-Mart.
IBM, the top contributor to gains in the Dow, held more than 5 percent higher in afternoon trade. Morgan Stanley upgraded IBM to “overweight” from “equal-weight” and raised its price target to $140 from $135 on underappreciation of IBM’s increased focus on its analytics and cloud businesses.
Separately, IBM Watson Health announced plans to acquire Truven Health Analytics for $2.6 billion.
The Nasdaq composite underperformed the major averages, briefly falling 1 percent as Apple and Netflix declined. The iShares Biotechnology ETF (IBB) traded more than 2 percent lower.
“I think we’ve had a really, really powerful three-day runup,” said Peter Coleman, head trader at Convergex.
“We’re due for some profit-taking and I think that’s what you’re getting today,” he said.
Energy and financials were the greatest decliners in the S&P 500 in afternoon trade. Wal-Mart was among the greatest weights on the Dow. The stock held about 2 percent lower in afternoon trade after earlier falling more than 5 percent as its quarterly results and forecast were pressured by the strong U.S. dollar.
As of intraday trade Thursday, the major U.S. averages were on track for weekly gains of about 3 percent or more.
“We had a nice move here. The market is now overbought for the first time in a while,” said Peter Boockvar, chief market analyst at The Lindsey Group.
European stocks came off highs, while in Asia the Nikkei 225 and Hang Seng surged more than 2 percent. The Shanghai composite was a touch lower but held gains of 3.6 percent for the week so far.
“Oil, China and central banks are our key uncertainties and a lot of that has been mitigated in recent days but we still need corporate earnings (growth),” said Douglas Cote, chief market strategist at Voya Investment Management.
Wal-Mart beat estimates by 3 cents with adjusted quarterly profit of $1.49 per share, but revenue was shy of estimates as the company battled the effects of a stronger dollar. The retail giant also trimmed its full-year revenue forecast based on the U.S. currency’s continued strength. The company also raised its annual dividend to $2 a share from $1.96 a share.
In economic news Thursday, weekly jobless claims came in at 262,000.
The Philly Fed index came in at minus 2.8 for February. The index has held in negative territory since September.
Leading indicators in January showed a decline of 0.2 percent, after a downwardly revised December report of a 0.3 percent drop, according to StreetAccount.
Read MoreRally could continue but analysts see a fizzle
Treasury yields edged lower, with the 2-year yield at 0.73 percent and the 10-year yield at 1.78 percent, as of 1:35 p.m. ET.
The U.S. dollar index traded slightly higher, with the euro at $1.11 and the yen at 113.51 yen against the greenback.
Earlier, U.S. crude oil futures held more than 3 percent higher above $31.50 a barrel after Iran welcomed plans by Russia and Saudi Arabia to freeze output and an industry report showed a surprise drop in U.S. inventories. Natural gas inventories fell 158 billion cubic feet last week.
Late Wednesday, St. Louis Fed President James Bullard said it would be “unwise” for the Fed to continue raising rates given declining inflation expectations and recent equity market volatility. The comments mark a shift from Bullard’s arguments over much of last year for an earlier rate hike.
U.S. stocks closed more than 1.5 percent higher Wednesday, after the release of the Fed minutes and helped by higher oil prices and some encouraging economic data. The Dow Jones industrial average and S&P 500 posted their first three-day win streak of 2016. The S&P also had its third-straight day of plus-1 percent gains since 2011 to end within 10 percent of its 52-week intraday high, out of correction territory.
The major U.S. averages had their largest three-day win streak since late August.
“The question is, can we get enough lift to push above 1,940 (on the S&P 500) and if we can, we can have a shot at that 1,970 – 2,000 level. You’re going to really need buyers to come into the market. … Short covering can only take us so far,” said Lance Roberts, chief investment strategist at Clarity Financial.
Read MoreEarly movers: WMT, PRGO, CAB, DISCA, IM, GDDY, DVN, JACK & more
In afternoon trade, the Dow Jones industrial average declined 33 points, or 0.2 percent, to 16,420, with Wal-Mart the greatest laggard and IBM leading advancers.
The S&P 500 traded down 6 points, or 0.36 percent, to 1,919, with financials leading eight sectors lower and utilities and telecommunications advancing.
The Nasdaq composite traded down 35 points, or 0.8 percent, to 4,498.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded below 22.
Decliners were a step ahead of advancers on the New York Stock Exchange, with an exchange volume of 518 million and a composite volume of 2.5 billion in afternoon trade.
—CNBC’s Peter Schacknow and Reuters contributed to this report.