Does this dollar rally have legs?

Kevin Winter | Getty Images

The dollar looks to be back on top against the euro and the yen, and analysts say the party may last for the rest of the year.

"In the short-term, the U.S. dollar will continue to rise – at least until the Federal Reserve raises rates," ANZ senior currency strategist Sam Tuck told CNBC by phone. ANZ is forecasting the first U.S. rate hike for September and the interest rate rise "will mark the top for the dollar," Tuck said.

The U.S. dollar has been on a long bull-run that started last July, driven by speculation that an economic recovery would prompt its central bank to become the first in developing countries to raise interest rates.

Since mid-March, however, the rally had hit a wall of wobbly U.S. economic data. But the dollar bulls are now back in play after Federal Reserve chair Janet Yellen indicated late last week that the rate hike will be coming later this year after all.

Since Monday, the dollar index has gained nearly one percent against a basket of major currencies. The U.S. currency is up nearly two percent against the Japanese yen, to eight-year highs, and has also gained almost one percent against the euro.

Going with the flow

The yen and the euro look set to continue to weaken against the U.S. dollar for the rest of the year, analysts said.

The yen could breach the next target level of 124.17, last seen on June 22 2007, as early next week, assuming the U.S. economic data, such as first-quarter gross domestic product (GDP) and non-farm payrolls, are strong, according to Mizuho Securities' chief currency strategist Kengo Suzuki.

After being stuck in range for six months, the yen could be in for some rapid depreciation.

Since 2012, the yen has repeated a cycle of losing 10 yen against the dollar before getting stuck in a narrow consolidation range for the following six months, only to resume its fall against the dollar in the next six month period, said Suzuki. He sees the yen at 127 to 130 against the dollar by year-end.

125: The next target for dollar-yen?
125: The next target for dollar-yen?   

The euro, for its part, will have to deal with the fall-out from Greece's potential default.

"The markets have been complacent and are not positioned for a potential default," National Australia Bank's senior currency strategist Emma Lawson said. NAB's year-end target for the euro is $1.03, or near-parity.

All about central banks

What analysts did agree on is that the divergence in monetary policy is driving the dollar's strength.

And that dynamic is unlikely to change. The central banks in Japan and the euro zone will be allowed to ease monetary policy, and as a side-effect, depreciate their currencies, in an effort to beat the threat of deflation and return to economic growth, analysts said.

"The consensus is weak or no economic growth in Japan and the euro zone pose bigger risks to the global economy than the depreciation of their currencies," Bank of Mitsubishi UFJ(BTMU) senior market economist Toshiyuki Suzuki said.