The euro rose to a two-month high versus the dollar on Wednesday on optimism Greek leaders are nearing a deal to secure a second bailout and avoid a messy default, though analysts were skeptical of fresh gains with the deal becoming priced in.

Following a string of delays in negotiations, Greek leaders will meet again on Wednesday in a bid to agreed yet deeper austerity in return for another international rescue package.

A sharp selloff in the single currency was seen as unlikely even if talks drag on for another day, given sizeable euro short positions that investors are reluctant to add to before knowing the outcome of the negotiations.

The euro rose to $1.3289, its highest level since December 12, before steadying around $1.3270. Topside resistance came in at the 100-day moving average around $1.3333, while option-related offers were reported ahead of $1.3300.

Morgan Stanley strategists said they established a short euro position at $1.3250 and are targeting $1.2390 with a stop at $1.3350, given the structural problems still facing the euro zone even if Greece gets a second bailout, which they think is largely factored in to the euro/dollar pair.

If we see a deal being signed it's going to be euro positive, but that's already priced in. It's going to be tricky trying to pick the top but a rebound is going to fairly limited and short-lived, said Morgan Stanley strategist Ian Stannard.

The broader problems within the euro zone are going to be even harder to tackle.

The latest positioning data showed currency speculators trimmed euro short positions to 157,546 contracts, down from a record 171,347 contracts the previous week.

Euro resilience was also down to the European Central Bank's provision of low-rate long-term funds to banks that ensured ample liquidity in the banking system and was helping to prop up risk appetite, Foley said.

The bank holds another three-year tender at the end of February.

Some strategists said euro upside was limited as many short positions had already been covered on Tuesday when the euro posted its strongest daily gain since November. It climbed from below $1.30 to $1.3270 on talk a Greek deal was imminent.

There has been a propensity by the market in general to look at the Greek scenario with a glass-half-full approach, irrespective of the deadlines Greece has missed, said Jane Foley, senior currency analyst at Rabobank.

I think positioning has a significant part to play. Although shorts are off their record levels, they are still really extreme and people do not want to get caught in a rally.

Euro/dollar risk-reversals showed weakening demand to hedge against a fall in the currency, with the one-month 25-delta at 1.55 in favor of euro puts versus 1.80 at the beginning of the week.

DOLLAR INDEX AT 2-MONTH LOW

The euro also hit a seven-week peak of 102.449 against the yen, gaining strength on reported stop-loss buying. It later eased back below 102.00 but traders said the outlook was positive while above support around 101.46, the base of the closely watched Japanese Ichimoku cloud indicator.

The dollar was flat at 76.75 yen, retreating from earlier highs above 77 yen as traders said model accounts sold from the highs.

Earlier on Wednesday, the yen showed little reaction to data showing that Japan's current account surplus shrank sharply to a 15-year low in 2011.

Better risk appetite and hopes Greece is close to agreeing austerity measures helped to boost commodity currencies. The Australian dollar rose to a six-month high of $1.0845, stopping shy of a reported large option barrier at $1.0850.

Broad dollar weakness dragged the greenback to 78.443 against a basket of currencies .DXY, its lowest level in around two months, after closing below its 100-day moving average on Tuesday for the first time since late October.