* Dollar recovers ground after five straight daily declines
* S&P 500 index edges up, U.S. Treasury yields rise
* Oil falls, dragging energy stocks down (Updates with late afternoon trading, adds commentary)
By Sinead Carew
NEW YORK, Jan 18 (Reuters) - The U.S. dollar edged higher and stocks gained ground on Wednesday after the top U.S. monetary policy official spoke, but investors voiced caution over how U.S. policy will develop under Donald Trump's presidency two days before his inauguration.
Oil futures tumbled, dragging down the energy sector index, which was one of the biggest weights on the S&P 500. U.S. Treasury yields rose after remarks by U.S. Federal Reserve chair Janet Yellen were released and after U.S. inflation data.
While Wall Street has been betting on Trump's promises of lower taxes, lighter regulation and fiscal spending, some investors have hit the pause button before he takes office on Friday. While many are waiting for clarity on his policy plans, others are holding out for more fourth-quarter earnings reports.
"The market's kind of treading water. We're in a tight narrow range here and we haven't really busted out of the range in a while," said John Canally, investment strategist and economist for LPL Financial in Boston. "Once the earnings season heats up, once we get past the inauguration, maybe you'll get some sort of movement once companies start to give guidance."
At 3:29 p.m. EST, the Dow Jones Industrial Average was down 34.3 points, or 0.17 percent, to 19,792.47, the S&P 500 had gained 1.22 points, or 0.053794 percent, to 2,269.11 and the Nasdaq Composite had added 7.20 points, or 0.13 percent, to 5,545.92.
The U.S. dollar was up 0.9 percent against a basket of major currencies. It hit a nearly six-week low the previous day after Trump complained that dollar strength was hurting trade relations with China.
"We went a bit far on dollar weakness yesterday, so it's natural to have a correction once in a while (but) the downward trend is intact," said UBS currency strategist Daniel Trum in Zurich.
"Markets are finally becoming aware of the potential negative effect of Trump's policies on the U.S. dollar - at the beginning we had lots of positive sentiment ... but now we see that the focus is shifting more toward potential trade disputes and potential difficulties in Trump implementing his policies."
U.S. Treasury yields hit session highs with 10-year note yields rising to 2.4 percent after the U.S. Fed's Yellen said it "makes sense" to gradually raise interest rates.
"Waiting too long to begin moving toward the neutral rate could risk a nasty surprise down the road - either too much inflation, financial instability, or both," Yellen said in remarks prepared for delivery to the Commonwealth Club of California in San Francisco.
Safe havens for capital have been in demand, but gold , already down on the inflation data and dollar strength, fell further after Yellen's remarks were released. The precious metal was last down 1.1 percent to $1,202.61 per ounce, erasing much of the previous day's gains. It had risen for seven sessions.
Oil prices fell on dollar strength and expectations U.S. producers would boost output, while OPEC signaled a global supply-reduction deal would shrink the oil surplus. Brent futures settled down 2.8 percent at $53.92 per barrel and U.S. crude settled down 2.7 percent at $51.08.
Additional reporting by Dion Rabouin, Chuck Mikolajczak and Karen Brettell in New York and Patrick Graham in London; Editing by Nick Zieminski and Peter Cooney