Gold edged up on Friday, set for its first weekly gain in three weeks, as growing confidence in a prompt deal between European leaders and Greece over its second bailout eroded investor appetite for low-yielding lower risk currencies.

The euro hit two-month highs against the yen and neared three-week highs against the dollar, giving the bullion price a lift from non-U.S. investors who find it cheaper to buy gold when their own currencies rise against the greenback.

Optimism was growing that Greece had finally done enough to secure a second bailout after it set out extra budget savings, while robust U.S. data this week gave investors more confidence to take on more risk.

Usually, gold declines in such a scenario, but its tight correlation with the euro means the gyrations in the single European currency are more likely to exert a greater impact on bullion than simple safe-haven demand, which is being fed at the moment by low-yielding dollars and yen.

Spot gold was up 0.2 percent at $1,731.54 an ounce at 1040 GMT, set for a 0.7 percent rise this week, the first weekly gain since the end of January.

The fact that we've had some more reassuring and positive data out of the U.S., coupled with what I think is a declining market expectation of QE3 any time soon is probably contributing to the fact that gold is unable to break higher, Tom Kendall, an analyst at Credit Suisse, said.

There is enough risk around the European side of things to keep gold supported above $1,700, he said. But we are whipping back and forth on whatever the mood seems to be surrounding Greece.

Implied volatility has fallen to its lowest since last July, having fallen by a full point to 17 percent this week.

Gold is still set for a 10 percent gain this year, inspired largely by the Federal Reserve's signal that U.S. rates were unlikely to move beyond zero for nearly three more years, which ignited fresh talk of more gold-bullish quantitative easing (QE).

In euro terms, gold put on a stronger performance on Friday, rising 0.3 percent on the day to 1,319.33 euros an ounce, for a gain of 1.1 percent this week, the largest weekly rise since late January.

Gold is continuing to behave more like a risky asset than a safe haven, Commerzbank wrote in a note.

Gold is also likely to remain strongly affected by macro-level factors, and will probably continue to follow its atypical behavioral pattern in the short term.

In spite of the continued dominance of the currency, rather than risk sentiment, over gold, investors have taken advantage of the price dip to one-week lows earlier this week to buy.

INVESTORS BUY

Holdings of gold in exchange-traded products have risen by over 100,000 ounces this week to 70.343 million ounces, reflecting the ongoing desire to tap into the bullion market.

February options on the SPDR Gold Trust, the world's largest gold-backed ETF, expire later on Friday, with most open interest for strikes close to the money stacked at puts -- options to sell shares in SPDR at a given price by the close of trade -- at 165.0. <0#GLD*.U>

Reports on Thursday from the World Gold Council about China's growing role in the international gold market, including fresh speculation that the central bank may have been an active bullion buyer in the closing months of 2011 helped support the price.

Platinum was the strongest performer of the precious metals complex on Friday, showing a 0.85 percent gain on the day to trade at $1,632.00 an ounce.

Impala Platinum (IMPJ.J), the world's second largest producer of the metal, continues to lose output from its Rustenburg operations, where on Thursday, police clashed with rioting mine workers.

Production at Rustenburg, which accounts for 60 percent of Implat's output, came to a halt a month ago after the company sacked 17,000 employees following a January 12 wildcat strike over bonuses.

The platinum price has risen by more than 10 percent since then, putting it on track for a gain of 3 percent in February and a rise of nearly 18 percent since the start of the year.

Palladium rose 0.3 percent to $693.50 an ounce, while silver rose 0.2 percent to $33.54 an ounce.