Wall Street capped a wobbly day of trading Wednesday with a mixed finish for the major stock indexes, as technology and communication companies weighed on the market for a second-straight day.

The S&P 500 rose 0.16% after shedding most of a 0.8% gain. The modest gain was made a day after the benchmark index posted its worst drop since May. The index is on pace for its first first monthly loss since January.

The Dow Jones Industrial Average also lost momentum as the day went on, but managed a 0.26% gain, while the tech-heavy Nasdaq composite gave back 0.2% after having been up 0.9% in the early going.

Bond yields stabilized after surging over the past week and weighing on the market, especially technology stocks. The higher yields have forced investors to reassess whether prices have run too high for stocks, because it makes them look expensive by comparison.

The S&P 500 rose 6.83 points to 4,359.46. The Dow gained 90.73 points to 34,390.72, while the Nasdaq fell 34.24 points to 14,512.44. The Russell 2000 index of small companies also fell, shedding 4.47 points, or 0.2%, to 2,225.31.

The yield on the 10-year Treasury note, which is used to set interest rates on many kinds of loans, held at 1.53%.

The broader market has lost ground in September, leaving the S&P 500 down 3.6% for the month with one day left to go. Investors have spent much of the month reviewing a mixed batch of economic data that showed the coronavirus and the highly contagious delta variant’s impact on consumer spending and the employment market recovery.

Wall Street is still trying to gauge just how persistent rising inflation will be as the economy works through, and eventually recovers from, the pandemic. The Fed has said that higher inflation likely will be temporary and tied to the economic recovery, but more companies have signaled that they expect higher costs to linger. Bond yields began rising last week after the central bank signaled that it could begin taking action in coming months to curtail some of the support its been providing to the economy throughout the pandemic.

“Today is a sort of a tug of war between which is the bigger concern: is it inflation or is it rates?” said Randy Frederick, vice president of trading and derivatives at Charles Schwab. “Today’s action tells me we don’t know.”

Wall Street also has its eye on Washington, where Democrats and Republicans in Congress are wrestling over extending the nation’s debt limit. If the limit, which caps the amount of money the federal government can borrow, isn’t raised by Oct. 18, the country “would likely face a financial crisis and economic recession,” Treasury Secretary Janet Yellen told Congress on Wednesday.

Health care companies and a mix of companies that focus on consumer products accounted for a large share of the gains in the S&P 500. Eli Lilly rose 4% and Procter & Gamble added 1%.

Wall Street also is preparing for the next round of corporate earnings in the next few weeks. Investors will get a more detailed look at how supply-chain problems and higher costs are affecting corporate finances.

A wide range of companies have been warning investors about the effect of inflation on costs and profits. Nike, Costco and FedEx are among those that have cited materials costs, shipping delays and labor problems as concerns.

Sherwin-Williams became the latest company to warn that higher raw materials costs will hurt profits. The stock gained 0.8% as investors took the announcement in stride, but it is still down 9.6% from its all-time high of $308.70 on Sept. 2.

Markets in Asia mostly fell while markets in Europe made gains.