Stocks shook off early losses and closed mostly higher on Wall Street as technology and bank stocks rallied and more in Thursday’s Stock Market Update.

IBM rose 4.5% Thursday 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%.

Major indexes were down most of the day after Netflix reported a slump in new subscribers that sank its stock and took other communications companies down with it. That sector remained the biggest loser of the day. Netflix sank 10.2%.

Medical equipment makers helped health care stocks reverse course after an early loss. Danaher rose 2.4% after reporting solid second quarter financial results. Abbott Laboratories rose 2.3% and Thermo Fisher rose 2.3%.

Consumer-oriented and energy stocks also fell. Dollar Tree shed 1.9% and Exxon Mobil lost 0.8%.

Corporate earnings are in full swing and investors have been cautiously assessing results and company statements. Only about 13% of S&P 500 companies have reported, according to FactSet, and analysts expect profits to fall 2.4% overall.

Several other large companies are expected to report results later Thursday, including Microsoft and Capital One Financial. American Express and Schlumberger will release their results on Friday.

The latest round of corporate earnings comes ahead of a highly anticipated Federal Reserve meeting later this month. Investors expect the central bank to cut interest rates for the first time in a decade.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 rose 10 points, or 0.4%, to 2,995. The Dow Jones Industrial Average edged up 2 points to 27,222. The Nasdaq added 22 points, or 0.3%, to 8,207.

ANALYST’S TAKE: Investors have so far spent the week pulling back as corporate earnings results give them a better picture of the economy. The market has spent much of the year gaining ground, but remains volatile amid economic 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 BIGGER PICTURE: The market is still on track for a weekly loss despite the S&P 500 hitting a record high close on Monday. Stocks have been volatile throughout the week and have been mostly lower since Tuesday.

The decline so far this week has barely dented yearly gains. The S&P 500 is still up 19% for the year, while the Nasdaq is still holding on to 23% in gains. The Dow is up 16% for the year.

CHUGGING ALONG: Union Pacific rose 5.8% 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.

SHRINKING STREAM: Netflix dropped plunged 10.3% in heavy trading after the streaming service suffered a dramatic slowdown in subscriber growth during the second quarter. The slowdown could mean trouble as the company faces a new wave of competition this year when both Walt Disney and Apple plan to launch their own video streaming services.

LIGHTING UP: Philip Morris rose 8.2% after the cigarette maker raised its profit forecast for the year following a solid second quarter. The maker of Marlboro and other brands reported lower cigarette shipments during the quarter, but saw a surge in electronic cigarette sales. Both profit and revenue beat analysts’ forecasts.

MISSING PARTS: 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.

© The Associated Press. All rights reserved.