Stocks ended higher on Wall Street, erasing most of the market’s losses for the week and bringing the S&P 500 index close to the record high close it reached on Tuesday and more in Friday’s Stock Market Update.

Investors welcomed the government’s latest snapshot of U.S. employment, which showed that job growth surged in April past economists’ forecasts and unemployment fell to a five-decade low.

Technology companies, banks, communications and consumer-focused stocks helped drive much of the rally. Energy sector companies notched the biggest gain as crude oil prices rebounded. Smaller company stocks were up more than the rest of the market.

Traders continued to weigh through corporate earnings reports for the first quarter. Results have come in mixed so far, but they have been good enough to ease worries that company profits would slump overall.

United States Steel, Weight Watchers and Monster Beverage were among the latest companies to give investors surprisingly good results.

Newell Brands, which makes Sharpie and Elmer’s products, soared 13.5% after reporting a strong quarter. Amazon rose 3.2% after billionaire investor Warren Buffett said his company was buying the stock.

The market rally had the S&P 500 hovering just below its record high set on Tuesday. The benchmark index is now up more than 17% for the year, reflecting a sharp recovery for stocks this year following a steep slump at the end of 2018.

The Federal Reserve spurred the market’s recovery earlier this year when it signaled that it would take a patient approach to raising interest rates. Traders also have been encouraged by positive data on the U.S. economy and better-than-expected corporate earnings.

DAILY STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 index rose 28 points, or 1%, to 2,945. The Dow Jones Industrial Average rose 197 points, or 0.7%, to 26,504. The Nasdaq rose 127 points, or 1.6%, to 8,164.

Bond prices rose. The yield on the 10 year Treasury fell to 2.52%.

Major indexes in Europe closed higher.

ANALYST’S TAKE: The market spent the week hitting a wall as investors searched for clearer signs that the economy remains strong. One of those signs appeared Friday morning in the form of a solid jobs report.

“The market has had such a remarkable recovery that at some point it has to pause and consolidate before climbing,” said Quincy Krosby, chief market strategist at Prudential Financial. “Overall, this was a solid report that should assuage fears that the U.S. economy is losing momentum.”

A SLICK MOVE: Crude oil prices recovered some of their losses from a day earlier. Benchmark U.S. crude rose 0.2% to settle at $61.94 per barrel. Brent crude, the international standard, gained 0.1% to close at $70.85.

The move helped lift energy stocks, which led all other sectors of the S&P 500. Concho Resources rose 5.2%.

SOLID QUARTER: United States Steel surged 16.8% after a sharp increase in sales helped push profit far beyond Wall Street forecasts. The sharp gains come amid a weak year for the company. Its stock is down 7.8% so far in 2019 while the S&P 500 index is up 17.1%.

ENERGIZED EARNINGS: Monster Beverage jumped 8.8% after the energy drinks company powered past Wall Street’s first quarter profit forecast. The company reported a solid increase in sales of its namesake energy drink that helped drive a surge in profit.

SLIMMER LOSSES: Weight Watchers surged 13.7% after reporting losses for the first quarter that were much slimmer than expected. The company also raised its profit forecast for the year.

STORM CLOUDS: Arista Networks, a cloud computing company, plummeted 10.4% after telling investors that revenue in the current quarter will fall short of forecasts. The company said it started seeing shortfall in demand toward the end of the first quarter.

© The Associated Press. All rights reserved.