U.S. stocks closed mildly lower on Thursday as stocks struggled to hold gains from higher oil prices, amid investor focus on earnings.
"From a technical perspective we can't seem to break out here," said Peter Cardillo, chief market economist at Rockwell Global Capital. "The market remains vulnerable here. Today is an assessment day."
The Dow Jones Industrial Average (Dow Jones Global Indexes: .DJI) closed down 6.84 points, or 0.04 percent, at 18,105.77, with UnitedHealth leading gains and Merck (MRK) the greatest blue chip laggard.
The S&P 500 (^GSPC) closed down 1.64 points, or 0.08 percent, at 2,104.99, with utilities the greatest of seven laggards and and consumer sectors leading.
The Nasdaq (^IXIC) closed down 3.23 points, or 0.06 percent, at 5,007.79.
Stocks briefly traded higher in midday trade, with the Dow rising more than 60 points after trading 48 points lower.
Art Hogan, chief market strategist at Wunderlich Securities, noted afternoon gains in oil helped equities push higher from earlier losses. The energy sector reversed to trade briefly among advancers in the S&P 500.
Crude oil extended gains to settle up at $56.71 a barrel, the highest level so far this year. Earlier, crude briefly hit $57 a barrel for the first time since Christmas Eve. The commodity reversed earlier losses on reports of increased tension in Yemen that could pressure supply. Brent crude extended gains to trade above $64 a barrel.
"Crude is the first thing to break out of a range," said JJ Kinahan, chief strategist at TD Ameritrade, noting that a close above $56 a barrel would likely help stocks.
"The rally in oil is definitely helping markets move higher," said Lance Roberts, general partner at STA Wealth Management. "We were due for an oversold bounce in oil and that's ... providing some support to the market."
He also noted continued momentum from Wednesday's close provided some support.
Earlier, brent crude gained on increasing evidence that U.S. production is peaking, before slumping back to trade around $62 a barrel following an OPEC report.
The major indices and treasury yields have held within a range in the last few weeks of trade.
Earlier, mixed economic data and remarks by Federal Reserve officials weighed slightly as equities held to the flatline. The Dow Jones industrial average and S&P 500 tried for gains.
U.S. March housing starts showed a 0.926 million unit rate, below expectations but above February's 0.908 million unit rate.
The usual weekly initial jobless claims came in at 294,000, above expectations and a slight increase from the prior week.
"It's good to see firms don't see the need to cut workers but we still need to get (the long-term unemployed) jobs," said Tara Sinclair, chief economist at Indeed. Overall, she is still optimistic that the rest of 2015 shows strong economic growth.
The Philadelphia Fed's business outlook index for April showed 7.5, above expectations.
"I think the economic numbers were a little weaker than expected but overall that does not change the underlying story," said David Kelly, chief global strategist at J.P. Morgan Funds. He expects first quarter growth below 1 percent, followed by growth of 2.5 to 3 percent for the second quarter.
Atlanta Federal Reserve President Dennis Lockhart said in the early afternoon that he does not see the U.S. economy faltering but sees possible advantages in waiting for stronger data that would allow a steadier and more predictable path toward normal interest rate levels
The U.S. 10-year Treasury yield (U.S.:US10Y) briefly rose to 1.92 percent following morning comments from Federal Reserve Vice Chair Stanley Fischer on CNBC that indicated enough economic growth for the central bank to begin tightening at some point.
The U.S. dollar fell about 1 percent as the euro gained to above $1.08 for the first time in a week.
"The couple comments that I saw that I thought were worth noting-he did say the Fed would only hold off tightening if there was a very dim view of the economy," said Ian Lyngen, senior Treasury strategist at CRT.
"I think the Fed would be indifferent about (a rate hike) happening the third or fourth quarter this year or the first quarter next year, and that's what Fischer is telling us," Lyngen said. "The market is interpreting that as hinting at the sooner rather than later timing that has been bantered about by recent Fed speakers."
In Europe, equities closed lower after mixed first-quarter earnings reports and the worsening Greece situation. Standard & Poor's cut the country's credit rating to "CCC+" from "B-" with a negative outlook on Wednesday.
"At least this morning it's certainly Greece. We're seeing some contagion here today," Peter Boockvar, chief market analyst at The Lindsey Group, said earlier on Thursday. He noted gains in Italian, Spanish and Portuguese bonds.
"Among the 10 sectors, the financial sector is the only one that has shown modest improvement in earnings expectations trends over the past year," said Nick Raich, CEO of The Earnings Scout.
He noted that beats in financial earnings temper the expected 3 percent decline in overall S&P 500 results. Although weakness in energy sector reports will likely weigh, Raich expects the decline to be less than feared.
Goldman Sachs (GS) handily beat expectations on both earnings per share and revenue, helped by a burst of trading activity in January when the Swiss central bank removed a cap on the franc. The investment bank also raised its quarterly dividend to 65 cents per share from 60 cents.
BlackRock (BLK) reported an 8.7 percent rise in first-quarter profit , boosted by strong flows into its exchange-traded funds (ETFs). The asset manager saw net income rise to $822 million in the first quarter, up from $756 million a year earlier.
Blackstone (BX) economic net income of $1.37 per unit, well above estimates of $1.04, with revenue also scoring a solid beat. The private equity and investment firm was helped by strong results from asset sales.
UnitedHealth (UNH) earned $1.46 per share for its latest quarter, 11 cents above estimates, with revenue also beating Street expectations. The insurer also raised its 2015 earnings forecast, following stronger business growth during the first quarter.
TD Ameritrade's Kinahan noted that strength in financials and health care earnings, followed by positive tech sector reports later in the season, would be good indicators for a "broad-based rally."
Netflix (NFLX) surged more than 18 percent to a new all-time high on Thursday. The firm reported earnings after the bell on Wednesday that missed on the earnings per share but its stock gained in after-hours trade as revenues grew 24 percent and it added more subscribers than expected.
Steve Weinstein, managing director at ITG Investment Research, said the subscriber growth and reduction in turnover was encouraging.
"People are not cancelling the subscriptions at the rates they used to," he said.
The party supplies retailer jumped 22 percent on its first day of trading .
The online crafts e-commerce site doubled in its trading debut .
Shares of the electronic trading firm closed up 16.74 percent after rising as much as 24.6 percent in their debut, valuing the company at about $3.23 billion.
Decliners were a step ahead of advancers on the New York Stock Exchange, with an exchange volume of 754 million and a composite volume of 3.4 billion in the close.
Gold futures for June delivery settled down $3.30 to $1,198.90 an ounce.
-Reuters and CNBC's Patti Domm and Peter Schacknow contributed to this report.
CORRECTION: This version corrected that Raich was referring to 10 S&P 500 sectors, not years.
On tap this week:
Earnings: GE, Honeywell, Synchrony Financial, Comerica
8:30 a.m.: CPI
10:00 a.m.: Consumer sentiment
More From CNBC.com:
- The average stock rises on earnings, Goldman finds
- What the ECB 'confetti protest' was all about
- Three big misperceptions about auto insurance
More From CNBC