Specialist James Denaro works at his post on the floor...

Specialist James Denaro works at his post on the floor of the NYSE, Wednesday, Nov. 15, 2017. Credit: AP

Stocks closed sharply higher Thursday, snapping a two-day losing streak.

Investors cheered strong quarterly earnings from Wal-Mart Stores, Cisco Systems and other companies. Technology stocks accounted for much of the market’s gains, which helped lift the Nasdaq composite to its first record high in just over a week.

Health care companies and consumer product makers also posted solid gains. Energy and utilities stocks lagged. Oil prices declined.

The rally knocked the major stock indexes into positive territory for the month, as investors seized on the encouraging company earnings news to buy shares a day after the market suffered its worst decline in two months.

“Investors have been looking to buy on weakness and they got a little bit of it,” said Erik Davidson, chief investment officer for Wells Fargo Private Bank. “The desire to buy in dips has been very, very strong and we’ve seen a little bit of a dip.”

The Standard & Poor’s 500 index rose 21.02 points, or 0.8 percent, to 2,585.64. The Dow Jones industrial average gained 187.08 points, or 0.8 percent, to 23,458.36. The Nasdaq added 87.08 points, or 1.3 percent, to 6,793.29. The Russell 2000 index of smaller-company stocks picked up 22.79 points, or 1.6 percent, to 1,486.88.

Benchmark U.S. crude slipped 19 cents to settle at $55.14 a barrel on the New York Mercantile Exchange.

Loading video…

NUMC turnaround plans ... New Terminal 6 unveiled at JFK ... Working Moms: Surrogacy journey Credit: Newsday

Daycare facing license revocation ... NUMC turnaround plans ... Man charged with rape, kidnapping of LI girl ... Mets introduce Skubal

Loading video…

NUMC turnaround plans ... New Terminal 6 unveiled at JFK ... Working Moms: Surrogacy journey Credit: Newsday

Daycare facing license revocation ... NUMC turnaround plans ... Man charged with rape, kidnapping of LI girl ... Mets introduce Skubal

Subscribe

Unlimited Digital AccessOnly 25¢for 6 months

SUBSCRIBESALE ENDS SOON | CANCEL ANYTIME