American flags fly outside the New York Stock Exchange, Friday, Sept. 23, 2022, in New York. (AP Photo/Mary Altaffer, File)

Stocks on Wall Street closed broadly higher Wednesday after wavering for much of the day as investors weighed the minutes from the Federal Reserve’s latest meeting of policymakers and welcomed encouraging data on job openings.

The major indexes rallied following a government report showing that job openings increased more than expected in November. Stocks then shed some of their gains after the minutes from the Fed meeting last month underscored how the central bank remains determined to keep rates high to crush inflation.

The S&P 500 rose 0.8% after having been down 0.2% in the early going. The Dow Jones Industrial Average rose 0.4% and the Nasdaq composite added 0.7%. Small company stocks outpaced the broader market, lifting the Russell 2000 index 1.2% higher.

The Fed raised its key short-term interest rate last month for the seventh time in 2022 and signaled more hikes to come. Still, the increase was smaller than those announced after its previous four meetings, reflecting signs that inflation, while still high, has been showing signs of easing.

The minutes from the mid-December meeting show that Fed officials remained determined to keep rates high and have taken little comfort from inflation’s decline from a peak of 9.1% in June to 7.1% in November.

Stocks marched higher prior to the 2 p.m. Eastern release of the Fed minutes after the government reported that the number of job openings in November was higher than expected. While that could maintain pressure on the Fed to keep interest rates high to fight inflation, the resilience in the labor market also bolsters hopes on Wall Street that the economy can avoid sliding into a protracted recession.

“I think the market is trying to figure out if the recession indeed comes, will it be a bad one,” said Jeffrey Roach, chief economist for LPL Financial. “I think investors are right, that if we do fall into a recession, it’s not going to be a deep and prolonged recession.”

The latest update on job openings is the first set of employment data that Wall Street will get this week. The government will release its weekly unemployment report on Thursday and its closely watched monthly employment report, for December, on Friday.

The strong jobs market helped insulate a weakening economy from slipping into a recession in 2022. The Fed, though, is trying to lower inflation with its rate increases and that also means it needs to cool employment.

The minutes from the central bank’s last policy meeting shows Fed officials suggested that a continuing streak of robust hiring could keep inflation elevated and was a key reason why they expected to raise interest rates this year more than they had previously forecast.

The Fed’s benchmark lending rate stands at a range of 4.25% to 4.5%, up from close to zero following seven increases last year. It forecast that the rate will reach a range of 5% to 5.25% by the end of 2023 and it isn’t calling for a rate cut before 2024.

Crude oil prices fell and Treasury yields ended lower Wednesday.

The yield on the 10-year Treasury, which influences mortgage rates, fell to 3.68% from 3.75% late Tuesday. The yield on the two-year Treasury, which tends to track expectations for Fed action, slipped to 4.34% from 4.38%.

Banks, companies that rely on consumer spending and communications stocks accounted for a big share of the rally. Citigroup rose 2.6%, Starbucks added 3.6% and Netflix gained 4.9%.

Energy stocks fell as the price of U.S. crude oil settled 5.3% lower. Chevron fell 1.1%.

More than 80% of the stocks in the S&P 500 notched gains. The benchmark index rose 28.83 points to 3,852.97. The Dow added 133.40 points to close at 33,269.77. The Nasdaq rose 71.78 points to 10,458.76. The Russell 2000 gained 21.81 points to close at 1,772.54.

The latest updates for the job market comes amid more layoffs within the technology sector, which has been dealing with falling demand as inflation squeezes consumers.

Investors cheered several companies that decided to make cuts to their workforces as they face weaker demand. Cloud computing software company Salesforce rose 3.6% after it announced it is laying off about 10% of its workforce. Video hosing platform Vimeo rose 4% after reportedly notifying workers about job cuts.

Coinbase jumped 12.2% following the announcement of a $100 million settlement with New York State over what regulators called failures in the cryptocurrency trading platform’s systems for spotting possible criminal activity.

GE Healthcare Technologies climbed 8% in its market debut. General Electric, which spun off the company, rose 5.9%.