NEW YORK >> U.S. stocks rose Thursday to pull the S&P 500 back within 1% of its record following a rough April.

The S&P 500 rose 26.41 points, or 0.5%, to 5,214.08. The Dow Jones Industrial Average gained 331.37, or 0.8%, to 39,387.76, and the Nasdaq composite added 43.51, or 0.3%, to 16,346.26.

A report showing a pickup in layoffs helped to support the market. The number of workers applying for unemployment benefits rose by more last week than economists expected, though it remains relatively low compared with history.

That could be a sign the economy can pull off a hoped-for balancing act of staying solid enough to avoid a bad recession, but not so strong that it puts upward pressure on inflation. Treasury yields erased earlier gains immediately after the report’s release, an indication of expectations for the Federal Reserve to deliver long-sought cuts to interest rates later this year.

Elsewhere on Wall Street, some stocks swung sharply following their latest earnings reports.

Equinix jumped 11.5% after reporting stronger profit for the latest quarter than analysts expected. The company, which runs data centers around the world, also said an independent investigation led by its board found no accounting inconsistencies or errors that would require financial restatements. Earlier, an investment firm had accused it of “major accounting manipulation.”

Yeti Holdings rose 12.8% after reporting better profit for the latest quarter than expected thanks to stronger sales for its drinkware and coolers and equipment. It also raised its forecast for full-year earnings per share. Like other companies, it’s plowing cash into buying back its own stock, which boosts per-share profit for existing investors.

Cheesecake Factory gained 6.2% after topping expectations for profit. The results were encouraging following some recent warnings by big food and drink companies about how much pressure their customers, particularly lower-income ones, are feeling.

Airbnb sank 6.9% despite topping expectations for profit and revenue. It gave a forecasted range for revenue in the current quarter whose midpoint fell short of analysts’. It said an earlier Easter pulled more of its business this year into the first quarter from the second quarter.

Beyond Meat, the maker of plant-based meat substitutes, fell 14.4% after it posted a much worse loss than analysts expected as demand continued to crater.

In the bond market, the yield on the 10-year Treasury eased to 4.45% from 4.50% late Wednesday. The two-year yield, which more closely tracks expectations for the Fed, slipped to 4.81% from 4.84% late Wednesday.