U.S. stock indexes closed with gains in Tuesday, another climb into record territory. Bond yields rose after Federal Reserve Chair Janet Yellen said the central bank still expects to raise interest rates gradually.

ON WALL STREET: At the close, the Standard & Poor’s 500 index was up 9.3 points, about 0.4 percent, at 2,337.6. The Dow Jones industrial average gained 92.3 points, about 0.5 percent, to 20,504.4. The Nasdaq composite added 18.6 points, about 0.3 percent, to 5,782.6.

BOND MARKET: Bond prices fell. At the close, the yield on the 10-year Treasury note rose to 2.47 percent.

OIL PRICES: As markets closed, benchmark U.S. crude oil rose 24 cents to $53.17 a barrel in electronic trading on the New York Mercantile Exchange. In London on the Intercontinental Exchange Europe, Brent crude, the international standard, was up 32 cents at $55.91 a barrel.

FED WATCH: Yellen answered questions before a Senate committee, and she said that the strengthening job market and a modest move higher in inflation should warrant continued, gradual increases in interest rates. It was Yellen’s first testimony before Congress since President Donald Trump took office. Many economists say Trump’s ambitious economic program could result in higher inflation, which could force the Fed to raise rates more quickly.

The central bank raised rates in December for just the second time in a decade. Waiting too long to raise interest rates “would be unwise” and could eventually force the Fed to raise rates rapidly to catch up, Yellen said in her Congressional testimony. But she also repeated the word “gradual” to describe expectations for future increases. Investors say the Fed may raise interest rates at its meeting in March.

“Yellen seemed to have her dancing shoes on this morning and was able to steer clear of any comments that might upset the market,” said Alan Gayle, senior investment strategist and director of asset allocation at RidgeWorth Investments. “In so doing, the stock market has been able to hold onto its gains.”

advertisement | advertise on newsday

INTEREST RATES: Bond yields moved higher immediately after Yellen’s comments. The yield on the 10-year Treasury note rose to 2.47 percent from 2.43 percent late Monday. The yield on the 2-year Treasury rose to 1.23 percent from 1.21 percent, and the 30-year Treasury yield climbed to 3.07 percent from 3.03 percent.

ANALYST’S OPINION: “A growing number of investors are worried that potential trade wars with Mexico and China could lead to tariffs and higher prices,” analyst David Woo of Bank of America Merrill Lynch said in a research note. “With many investors having loaded up on Trump trades after the elections, their willingness to continue to give the benefit of doubt to the new administration appears to be wearing thin.”