Wall Street capped a wobbly day Wednesday with modest gains for stocks, snapping a two-day losing streak for the S&P 500.

The market shook off a mixed start after the Federal Reserve announced it is would be leaving interest rates unchanged this month and signaled that it expects to leave them alone in 2020.

The central bank had been expected to leave its benchmark interest rate unchanged this month after lowering it three times this year in a bid to shield the economy from slowing global growth and the fallout of U.S. trade conflicts.

Investor jitters over whether the U.S. and China will be able to avert a new escalation in their trade war has made for choppy trading this week, pulling major indexes lower.

Wall Street is hoping that both sides can avoid a new round of tariffs scheduled to kick in Sunday on Chinese goods that include phones, laptops and other popular products.

“We’re in a wait-and-see mode going into Friday to see if we have any more clarity on the trade tariffs that go into effect on Sunday,” said Keith Buchanan, portfolio manager at Globalt Investments. “The market is kind of sitting on its hands right now.”

The S&P 500 index gained 9.11 points, or 0.3%, to 3,141.63. The benchmark index is still on track for a slight weekly loss.

The Dow Jones Industrial Average bounced back after being slightly lower most of the day. It rose 29.58 points, or 0.1%, to 27,911.30. The Nasdaq added 37.87 points, or 0.4%, to 8,654.05.

The Russell 2000 index of smaller company stocks edged up 0.21 points, or less than 0.1%, to 1,631.93.

Despite the wobbly week in the market, the major indexes on track for strong gains this year. The Nasdaq is leading the way, with a gain of 30.4%. The S&P 500 is now up 25.3% and the Dow is up nearly 20%.