NEW YORK -- U.S. stocks reversed course from an early slump and closed higher Thursday to break a two-day losing streak after technology and bank stocks rallied.
Corporate earnings are in full swing and investors have been cautiously assessing results and company statements. The volatile market is still on track for a weekly loss despite the S&P 500 opening the week with a record high close. The pullback has barely dented the big gains made by every major index this year, including a 19.5% rise for the S&P 500 index.
The latest batch of results are providing a better picture of the economy after months of ups and downs in the market because of policy concerns and lingering trade disputes.
"We've been watching the game and now we actually get to see the scorecard," said Brad McMillan, chief investment officer for Commonwealth Financial Network.
The results so far have reflected financial strength from banks as the broader economy holds up with solid job growth and consumer confidence.
"The consumers are still making things happen out there and it's showing up in the earnings to a surprising degree," he said.
The S&P 500 index rose 10.69 points, or 0.4%, to 2,995.11. The Dow Jones Industrial Average edged up 3.12 points to 27,222.97. It was down as much as 151 points earlier. The Nasdaq composite rose 22.04 points, or 0.3%, to 8,207.24.
IBM rose 4.6% after reporting solid results. The company, along with Apple, helped lift the technology sector to lead the broader gains.
Banks led financial stocks higher. BB&T rose 2.8% and SunTrust Banks rose 2.7%. Both reported earnings that easily beat analysts' estimates.
Medical equipment makers helped health care stocks reverse course after an early loss. Danaher rose 2.4% after reporting solid second quarter results. Abbott Laboratories and Thermo Fisher both rose 2.3%.
Market indexes were down most of the day after Netflix plunged 10.3% in heavy trading and took other communications companies down with it. The streaming video service reported a slump in new subscribers that could mean trouble as it faces a new wave of competition from Disney and Apple.
Communications stocks remained the day's biggest loser. Consumer-oriented and energy stocks also fell. Dollar Tree shed 1.9% and Apache lost 3.8%.
Financial results remain a mixed bag for many companies. Only about 13% of S&P 500 companies have reported, according to FactSet, and analysts expect profits to fall 2.4% overall when every report is tallied.
Union Pacific rose 5.9% after the railroad operator reported profit growth and beat Wall Street forecasts despite hauling less freight. The company cut expenses by 7% during the quarter as shipments fell amid ongoing trade disputes. On Wednesday, rival CSX cut its revenue forecast as it deals with a slowdown in shipments.
Philip Morris International rose 8.2% after the cigarette maker raised its profit forecast for the year following a solid second quarter.
Genuine Parts fell 4.5% after the maker of automotive parts reported weak second quarter financial results and trimmed its profit outlook. The company said it is experiencing weaker demand in Europe.
Microsoft rose 1.6% after the close of regular trading. The technology company's second quarter profit, which it reported after the closing bell, beat Wall Street forecasts.
Several other large companies are expected to report results Friday, including American Express and Schlumberger.
Benchmark crude oil fell $1.48 to settle at $55.30 a barrel. Brent crude oil, the international standard, fell $1.73 to close at $61.93 a barrel. Wholesale gasoline fell 5 cents to $1.83 per gallon. Heating oil declined 3 cents to $1.86 per gallon. Natural gas fell 1 cent to $2.29 per 1,000 cubic feet.
Gold rose $4.80 to $1,426.10 per ounce, silver rose 23 cents to $16.12 per ounce and copper fell 1 cent to $2.70 per pound.
The dollar fell to 107.52 Japanese yen from 108.10 yen on Wednesday. The euro strengthened to $1.1266 from $1.1223.