Another choppy day of trading on Wall Street ended Tuesday with a mostly higher finish for stocks that adds to the market’s recent string of gains.

The S&P 500 rose 0.2%, its third straight gain. The Dow Jones Industrial Average rose 0.7%, extending its winning streak to a fifth day. The Nasdaq slipped 0.2%.

Bond yields gained ground. The yield on the 10-year Treasury rose to 2.81% from 2.79% late Monday.

The market’s latest gyrations came as traders cautiously reviewed mostly encouraging financial results from major retailers.

Walmart jumped 5.1% and after the nation’s largest retailer reported strong results that easily topped analysts’ forecasts. Home Depot rose 4.1% after also reporting better-than-expected results. The gains from both companies did much of the heavy lifting for the Dow.

Technology, health care and energy stocks fell, limiting the broader market’s advance. Broadcom fell 1.3%, Moderna slid 5% for the biggest drop in the S&P 500 and Marathon Oil fell 1.1%.

Retailers, consumer product makers and banks made solid gains.

In all, the S&P 500 rose 8.06 points to 4,305.20. The Dow gained 239.57 points to 34,152.01. The Nasdaq fell 25.50 points to 13,102.55.

Smaller company stocks edged lower. The Russell 2000 slipped 0.82 points, or less than 0.1%, to 2,020.53.

U.S. crude oil prices fell 3.2%. European markets ended broadly higher and Asian markets closed mixed overnight.

Stocks had their best month in a year-and-a-half in July and the winning streak has been continuing into August partially on hopes that inflation is easing. The latest government report on consumer prices showed that inflation essentially stalled from June to July.

Still, trading has been choppy, with major indexes swaying between gains and losses throughout each day.

The bumpy trading reflects at least partly a surge in “dip buyers,” or investors swooping in to buy stocks that have traded lower, said Randy Frederick, managing director of trading & derivatives at Charles Schwab.

“The dip buyers were just absent in the first half of the year, and whenever they did step in they got spanked every time,” he said. “That has changed now.”

Frederick points to momentum in the market right now.

“Clearly the easier direction is to the upside at this point, but that doesn’t mean we won’t have another pullback,” he said.

The latest results from retailers show that spending remains solid, even as consumers face the hottest inflation in 40 years. Wall Street has been concerned that higher prices on everything from food to clothing could eventually stunt the economy’s main engine of growth, consumer spending. Investors will get more updates on the retail sector this week, when Target reports its results on Wednesday.

The Commerce Department releases its July retail sales report on Wednesday. Economists surveyed by FactSet expect modest 0.2% growth from June, when sales rose 1%.

The retail reports are capping off the latest round of corporate earnings, which have been closely watched by investors trying to determine inflation’s impact on businesses and consumers, while trying to gauge how Federal Reserve will react. The central bank is raising interest rates in an effort to slow down economic growth and rein in inflation, though it risks hitting the brakes too hard and veering the economy into a recession.

Investors are looking for any signs that inflation is peaking or cooling in the hopes that the Fed could ease its aggressive rate hike policy. The central bank in July raised its benchmark interest rate by three-quarters of a point for a second straight time. On Wednesday, Wall Street will get more details on the process behind that decision when the Fed releases minutes from that meeting.

Investors currently expect a half-point increase at the Fed’s upcoming meeting in August, according to CME’s FedWatch tool.