The dollar rebounded from recent record lows versus the euro on Wednesday, benefiting from rising risk aversion as global stocks fell and investors assessed how far contagion from the U.S. housing market might spread.

The greenback was also up versus the yen, having earlier hit a 2-1/2 month low with U.S. housing data awaited for further clues on the troubled U.S. subprime mortgage market.

Falling stock markets in Asia and Europe, taking a lead from tumbling U.S. stocks on Tuesday, had also prompted investors to trim some risky trades financed by borrowing in the low-yielding yen.

There is an increase in risk aversion which has led speculative accounts to pull back from local exposure resulting in demand for the U.S. dollar, said Michael Klawitter, currency strategist at Dresdner Kleinwort in Frankfurt.

By 1008 GMT, the euro was down 0.6 percent on the day at $1.3740, sliding from a record high of $1.3852 hit on Tuesday according to Reuters data.

The dollar was up 0.8 percent at 1.2116 Swiss francs, while sterling fell half a percent to $2.0518, off a 26-year peak of $2.0655 hit on Tuesday.

The dollar index, a gauge of the dollar's value against a basket of six major currencies, was up 0.5 percent at 80.5, after hitting a 15-year low of 80.016 on Tuesday.

Sterling and the New Zealand dollar retreated from multi-year peaks versus the greenback, but the Australian dollar bucked that trend to hit an 18-year high on the back of strong inflation data.

June U.S. existing home sales at 1400 GMT (10 a.m. EDT) were seen pointing to persistent weakness in the housing sector. Economists polled by Reuters expect existing home sales fell to a 5.87 million annual rate in June from 5.99 million in May.

The dollar generally benefits when risk aversion rises unless its U.S.-centric, but the risk is that today's U.S. housing numbers are likely to be very soft, said Mitul Kotecha, head of global foreign exchange research at Calyon.

STOCKS FALL

Market talk on Wednesday suggested Deutsche Bank's earnings could be hit by exposure to the U.S. subprime market, sending the bank's shares down 2 percent. Deutsche declined to comment.

Nomura Holdings, Japan's largest brokerage, said it may pull out of the troubled U.S. mortgage market.

Worries about the U.S. economy were rippling across other markets after a hefty fall in U.S. stocks on Tuesday, with Asian and European equities also heading south.

Tokyo's Nikkei share average hit a six-week low on Wednesday, tracking U.S. shares which tumbled the previous day.

The pan-European FTSEurofirst 300 index was down 0.3 percent at 1,5810.74 after falling to its lowest since June 27. The index lost 1.5 percent on Tuesday.

The market showed little reaction to remarks by top Federal Reserve officials that played down fears that turmoil in U.S. credit markets is spreading to the overall economy.

Philadelphia Fed President Charles Plosser told the Wall Street Journal on Tuesday the U.S. economy is not at risk of a credit crunch despite problems in high-risk mortgage investments.

St. Louis Fed President William Poole said on Tuesday that mortgage woes are not spilling over to the broader economy.

The ability of U.S. credit markets to attract funds from overseas has played a big role in helping the United States to finance its huge trade deficit.