Stocks closed higher Friday as a lackluster report on hiring increases the odds the Federal Reserve will cut interest rates in the coming months and more in Friday’s Stock Market Update.

This week’s rally has recouped most of May’s losses, when President Donald Trump’s tariff threats escalated trade wars with China and Mexico. That reversed the market’s strong start the year, which culminated in the S&P hitting a new high on April 30.

Stocks and bonds both rose Friday after a report showed hiring was weaker than expected in May. The report appeared to increase the odds the Federal Reserve will have to cut interest rates in the coming months. Federal Reserve Chairman Jay Powell had signaled the possibility earlier in the week.

The lackluster jobs report could signal growing caution by businesses as economic growth slows and the U.S. engages in multiple trade conflicts.

“It’s a strange market right now,” said Gene Goldman, chief investment officer and director of research at Cetera Financial Group. “The markets are taking bad news as good news as reason to rally.”

Most sectors soared. Technology stocks led the gainers on Friday. Microsoft rose 2.8% and Apple rose 2.6%. Health care companies and internet stocks were also among the largest gainers. Johnson & Johnson rose 1.3% and Facebook added 2.9%.

Analysts are more confident that the Fed is closer to cutting rates as it gauges the latest weak employment data and downward revisions for previously reported data. The Labor Department said U.S. employers added just 75,000 jobs last month, and also said hiring in March and April was not quite as robust as originally reported.

“The stock markets are banking on the Fed’s ability to step in and save the day, as it has for much of the last decade,” said Cliff Hodge, director of investments for Cornerstone Wealth.

The next rate cut could come as early as July, he said, as the slide in bond yields signals that investors are preparing for slower economic growth.

While investors welcome the idea of a rate cut, such a move would suggest that the central bank is worried about the economy, which would not be good for the labor market, said Sameer Samana, senior global market strategist at Wells Fargo Investment Institute.

“We would view that as a sugar high as opposed to what the market really needs in order to make meaningful new highs driven by fundamentals,” Samana said. “Especially today with the market now back close to 2,900, our 2 cents for investors would be that the risk outweighs the reward.”

Investors are also optimistic about prospects for a U.S.-Mexico trade deal. The U.S. is poised to start imposing 5% tariffs on Mexican goods Monday but both sides are negotiating and media reports have suggested that the U.S. could consider delaying the tariffs.

Even with this week’s gains, several sectors have a ways to go before they make up the losses they suffered last month as the trade disputes escalated.

The technology heavy Nasdaq is still down 5% from its record on May 3. Facebook and Google parent Alphabet dragged down the internet-heavy communications sector over the past month. It’s down almost 9% from its April 29 high, the worst drop of any S&P industry. Consumer-focused stocks are down about 6%, with a large portion of companies depending on China for significant revenue.

Meanwhile, investors have bought bonds, signaling their expectation that the Fed would cut rates. The yield on the 10-year Treasury is now 2.08%, down from a close of 2.48% on April 7. Yields move inversely to bond prices.

Gold, which is also viewed as a safe-play investment, gained 5% over the last month.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 index rose 29 points, or 1.1%, to 2,873. It was the indexes best week since late November. The Dow Jones industrials rose 263 points, or 1%, to 25,983. The Nasdaq gained 126 points, or 1.7%, to 7,742.

CLOSING THE BOOK: Barnes & Noble rose 11.0% after the last of the big book retailers announced its sale to a hedge fund for $476 million.

Elliott Management is expected to complete the buyout in the third quarter. The chain was blamed for the demise of independent bookstores and was ultimately laid low by the shift to online sales and Amazon’s rise.

BEYOND EXPECTATIONS: Beyond Meat soared 39.3% after the plant-based meat maker beat Wall Street’s first quarter financial forecasts.

The company also gave investors a solid revenue forecast for the year.

Sales of the company’s fresh products — burgers and sausages — quadrupled during the quarter.

At around $138, Beyond Meat’s stock price is now more than five times higher than the $25 offering price of its May 2 initial public offering.

© The Associated Press. All rights reserved.