* Risk appetite improves on recovery hopes, earnings
* Euro gains on euro zone PMI, German Ifo data
* Sterling stumbles on weak UK GDP figures (Updates prices, adds details)
By Wanfeng Zhou
NEW YORK, July 24 (Reuters) - The dollar fell against the euro on Friday as figures showing a stabilizing euro zone economy and a good week for the U.S. stock market eroded demand for the greenback as a safe haven.
Higher-yielding, commodity-based currencies such as the Australian and New Zealand dollars rose as investors took on more risk. But sterling, which typically benefits from higher risk appetite, fell after data showed the UK economy contracted far more than expected in the second quarter.
Solid corporate earnings and U.S. housing data have boosted optimism about the economy this week and sparked a rally in U.S. stocks, which took the Dow industrials above 9,000 for the first time since early January on Thursday.
"Overall, this was a very good week for sentiment," said Ronald Simpson, managing director of global currency analysis at Action Economics in Tampa, Florida.
"It looks like the equity market is going to hold virtually all of its gains going into the weekend. So that's been keeping pressure on the dollar."
In late trading in New York, the euro rose 0.4 percent to $1.4211, after climbing as high as $1.4253, near a seven-week high of $1.4291 hit on Thursday, according to Reuters data.
The euro got a lift after the Ifo German business sentiment index rose for a fourth month running to its highest since October 2008, while initial estimates showed the euro zone services and manufacturing sectors contracted much less sharply than expected in July.
"We had the better economic data out of Europe, so we're seeing positive fundamentals overall. That's helping the euro against the dollar and supporting risk sentiment overall," said Brian Kim, currency strategist at UBS in Stamford, Connecticut.
SOLID EARNINGS
The ICE Futures' dollar index, which tracks the greenback versus a basket of six other major currencies, was little changed at 78.760. The dollar fell 0.3 percent against the yen to 94.70.
While some companies such as Microsoft Corp and Amazon.com have posted disappointing results, earnings for the quarter overall have been positive, which has reduced safe-haven demand for the dollar, analysts said.
According to data by Thomson Reuters, of the 184 companies in the S&P 500 that have reported, 77 percent have beat analysts' estimates.
"There's going to be further downside pressure on the U.S. dollar," said Michael Woolfolk, senior currency strategist at the Bank of New York Mellon in New York. "We expect euro/dollar to set new highs next week outside of any surprisingly negative developments on the corporate earnings front."
A drop in U.S. consumer confidence in late July to its lowest since April slightly dented risk sentiment but the general mood remained upbeat, analysts said.
Sterling fell after official data showed UK gross domestic product fell 0.8 percent in the three months to June and was 5.6 percent lower on the year, the steepest yearly fall since similar records began in 1955. That was worse than forecasts for a quarterly decline of 0.3 percent.
Sterling fell 0.4 percent to $1.6426, retreating from the day's high of $1.6542, while the euro traded 0.8 percent higher at 86.50 pence. (Additional reporting by Gertrude Chavez-Dreyfuss; Editing by James Dalgleish)