* Dollar rallies after Bernanke testifies to Congress
* BOJ upgrades economic assessment, stands pat as expected
* Dollar climbs to 4-1/2-year high vs yen, 9-month peak vs Swiss franc
NEW YORK, May 22 (Reuters) - The dollar rallied to trade at a fresh 4-1/2-year high against the yen on Wednesday after Federal Reserve Chairman Ben Bernanke warned that holding interest rates too low for too long has its risks and raised the possibility the Fed could at least slow its bond purchases.
Initially the dollar sold off as investors focused on the first headlines citing Bernanke saying monetary stimulus is helping the U.S. economy recover but it was too soon to remove existing measures.
Those remarks were in line with sentiment of recent days which had seen dollar weakness and were widely anticipated, including in the trading moments leading up to Bernanke's testimony. But investor focus shifted rapidly as Bernanke raised the possibility of reducing the Fed's bond purchases this year if economic growth improves further..
"If we see continued improvement and we have confidence that that's going to be sustained, then we could, in the next few meetings, we could take a step down in our pace of purchases," said Bernanke during the question-and-answer portion of his testimony before the U.S. Joint Economic Committee.
That followed remarks where he said "The Committee is aware that a long period of low interest rates has costs and risks."
For investors scrutinizing the testimony and each and every headline, it was all the impetus they needed to buy the dollar.
"This is the first time we have heard Fed Chairman Bernanke warn on holding interest rates too low for too long," said David Song, analyst at DailyFX in New York.
The euro fell to a session low of $1.2867, while the dollar rose to a fresh 4-1/2-year peak against the yen at 103.60 and a nine-month peak against the Swiss franc of 0.9812 .
The euro was last at $1.2882, down 0.2 percent, while the dollar was up 0.8 percent at 103.31 yen and up 0.9 percent at 0.9788 Swiss franc.
There had been speculation prior to this week that recent improvement in the U.S. labor market would drive the Fed to begin reducing its bond buying, a process known as quantitative easing, later this year.
Attention now turns to the release of minutes from the last Fed policy meeting due at 2 p.m. (1800 GMT).
SWISSIE A FOCUS
The euro hit a two-year high against the Swiss franc of 1.2648 francs after Swiss National Bank chief Thomas Jordan did not rule out negative interest rates and said policymakers could adjust the euro/franc currency cap if necessary.
Earlier in the global trading session, the Bank of Japan kept policy steady, as expected, and upgraded its assessment of the economy.
Governor Haruhiko Kuroda said he did not expect long-term rates to spike given the scale of the BOJ easing and reiterated that there was no change in the goal of achieving 2 percent inflation.
The euro hit a 3-1/2-year high of 133.77 yen, up 16.3 percent on the year.
Traders said the yen was likely to come under more pressure once outflows gather pace from Japanese investors seeking higher yields overseas.
Sterling fell to a seven-week low against the dollar on Wednesday after an unexpectedly sharp drop in retail sales sparked concerns the Bank of England could opt for more monetary easing in the coming months.