Stocks modestly added to gains on Monday after Federal Reserve Chairman Ben Bernanke said the economy was improving, but the recovery was fragile and still faced headwinds.

Speaking at the Economic Club of Washington, Bernanke said that inflation could remain subdued for some time, but the U.S. unemployment rate could remain elevated.

Investors had been looking for a clue as to how the Fed might unwind its economic stimulus efforts after a report on Friday showed employers cut far fewer jobs than expected in November. The report fueled speculation that interest rates could rise sooner than expected.

In his comments, Bernanke said the current rate environment would persist for an extended period, a relief for those concerned about a faster removal of accommodative policy.

Bernanke is preparing the markets for the prospect that we could emerge from recession slowly, said John Brady, senior vice president at MF Global in Chicago.

I don't think rates will be raised until the second half of 2010, if then, but equities have come a long way in a short amount of time, which is why they're not rallying more.

The Dow Jones industrial average <.DJI> gained 44.51 points, or 0.43 percent, to 10,433.41. The Standard & Poor's 500 Index <.SPX> gained 3.34 points, or 0.30 percent, to 1,109.32. The Nasdaq Composite Index <.IXIC> gained 2.57 points, or 0.12 percent, to 2,196.92.

Gains in the market were limited as investors moved into other assets, including the U.S. dollar, which hit a five-week high before pulling back. Crude oil futures were down 1.5 percent and gold fell as much as 2 percent.

(Editing by Kenneth Barry)