NEW YORK (AP) — Stocks are ending higher on Wall Street Thursday as investors cheered a strong set of quarterly results from Macy’s and other retailers. The S&P 500 rose 2% and is solidly in the green for the week following a choppy few days of trading. The gains have positioned the benchmark index for its first weekly gain after seven straight losses. The Dow Jones Industrial Average rose 1.6% and the Nasdaq rose 2.7%. The better-than-expected reports from retailers helped allay investors’ worries about the sector, which took big losses last week after Target and Walmart reported dismal results. Bond yields rose.

THIS IS A BREAKING NEWS UPDATE. AP’s earlier story follows below.

NEW YORK (AP) — Stocks rose broadly in afternoon trading on Wall Street Thursday as investors cheered a strong set of quarterly results from Macy’s and other retailers.

The S&P 500 rose 1.8% as of 3:27 p.m. Eastern and is solidly in the green for the week following a choppy few days of trading. The benchmark index is coming off seven straight weekly losses, its longest such stretch since 2001.

The Dow Jones Industrial Average rose 509 points, or 1.6%, to 32,630 and the Nasdaq rose 2.4%. Smaller company stocks also made strong gains, a sign of bullishness on the economy. The Russell 2000 index rose 2.4%.

Bond yields rose. The yield on the 10-year Treasury, which helps set interest rates on mortgages, rose to 2.75% from 2.74% late Wednesday.

Retailers led the broader market higher. Macy’s surged 18% after it raised its profit forecast for the year following a strong first-quarter financial report. Dollar General vaulted 13.9% and Dollar Tree jumped 21% after the discount retailers reported solid earnings and gave investors encouraging forecasts.

The retail sector is being closely watched by investors looking for more details on just how much pain inflation is inflicting on companies and consumers. Weak reports from the several big companies last week, including Target and Walmart, spooked an already volatile market.

“We’re not convinced that we’re completely out of the woods here,” said Philip Orlando, chief equity market strategist at Federated Hermes. “There were a lot of negative reports last week and what those companies have talked about is what is going on through the economy.”

Inflation is at a four-decade high and businesses have been raising costs on everything from food to clothing to offset higher costs. The impact from Russia’s invasion of Ukraine worsened inflation pressures by fueling higher energy and key food commodity costs. Supply chain problems worsened in the wake of China’s lockdown for several major cities as it tried to contain COVID-19 cases.

Consumers have been resilient about spending, but the pressure from inflation remains persistent and could be prompting a pullback or shift in spending from more expensive things to necessities.

The broad gains on Thursday follow a late push for markets on Wednesday prompted by details from the Federal Reserve’s latest meeting, which confirmed expectations of more interest rate hikes.

Investors have been uneasy over the impact of interest rate hikes in the United States and other Western economies that are meant to cool surging inflation. The key concern is whether the Fed can temper inflation with aggressive interest rate hikes without crimping economic growth to the point that the U.S. falls into a recession.

“The Fed’s got to be really aggressive here and job number one is to stuff the inflation genie back in the bottle and I don’t believe the market has fully priced that in,” Orlando said.

Technology stocks also did much of the heavy lifting. TurboTax maker Intuit rose 4.1%. Companies in the sector, with their lofty stock values, tend to push the market harder up or down.

Airline stocks rallied on encouraging summer travel forecasts. Southwest Airlines rose 6.3% and JetBlue rose 3.6%.

U.S. crude oil prices rose 3.4% and are up more than 55% for the year.

___

Veiga reported from Los Angeles.