Damian J. Troise and Alex Veiga

The stock market shook off a shaky start and ended higher on Thursday, marking its first gain in this holiday-shortened week.

Tech stocks were among the winners as Microsoft erased an early loss.

Trading has been choppy in recent days as investors remain concerned about inflation and the interest rate hikes the Federal Reserve is using to fight it.

The S&P 500 rose 1.8%. The benchmark is up 7.1% since hitting the edge of a bear market two weeks ago. The Dow Jones Industrial Average rose 1.3% and the Nasdaq 2.7%. The 10-year Treasury yield slipped to 2.91%.

Increase in debt:“I’ve exhausted my savings”: Inflation forces Americans to turn to loans and credit cards to cope.

Labor market cooling:The hiring boom is expected to slow, starting with the May jobs report. But that can be a good thing.

Meta rises after Sandberg news

Communications stocks, companies dependent on direct consumer spending and some large industrial companies gained ground. Facebook parent company Meta Platforms rose 5.4%, the day after COO Sheryl Sandberg announced that she was retiring. Expedia Group gained 6.3% and Boeing climbed 7.5%.

Small business stocks rose, signaling confidence in economic growth. The Russell 2000 gained 2.3%.

Bond yields have been relatively stable. The 10-year Treasury yield, which helps set interest rates on mortgages and other loans, fell to 2.91% from 2.93% late Wednesday.

Utilities and energy stocks fell. The pullback in energy stocks came as U.S. crude oil prices rose 1.4%, despite the OPEC oil cartel and allied producing nations including Russia saying they would increase production by 648,000 barrels per day in July and August.

Lower house prices:To buy a house? How the housing market in 2022 could turn in your favor

Change of meeting room:Previously, corporate boards were predominantly white and male. This has changed since the murder of George Floyd

Gasoline prices above $6 are displayed at a gas station in Sacramento, Calif., Friday, May 27, 2022.

Gasoline prices hit new high at $4.71

Rising energy prices have fueled inflation, which is already at its highest level in four decades. U.S. gasoline prices hit a new record high on Thursday, with the average price at the pump costing $4.71 a gallon, according to the AAA Auto Club Federation.

Investors remain focused on the balance between inflation, rising interest rates and economic growth. The Federal Reserve is being closely watched as it attempts to blunt the impact of inflation by raising interest rates from historic lows during the pandemic.

Several economic reports released on Wednesday reinforced expectations that the Fed would continue to aggressively raise interest rates. Wall Street fears the Fed is slowing economic growth too much and potentially sending the economy into recession.

Wall Street will get another glimpse into the health of the broader economy on Friday when the Labor Department releases its jobs report for May. The labor market was initially slow to recover from the impact of the virus pandemic, but rebounded strongly with low unemployment and ample job vacancies.