London: U.S. equity funds attracted $7.5 billion in the week Wednesday to Wednesday, the largest inflows in 18 weeks, but Japanese stocks suffered record outflows, data from Bank of America Merrill Lynch (BAML) showed on Friday.

U.S. stocks have been lifted by better-than-expected company earnings reports, with the Dow Jones Industrial Average .DJI closing above the 23,000 mark for the first time on Wednesday.

The S&P 500 .SPX and the Nasdaq .IXIC have also posted record closing highs as investors continue to pour into equities. Tech stocks attracted a bumper $1 billion, the largest inflows in 38 weeks, BAML said.

But Japanese equities suffered their largest weekly outflows on record, losing $4.4 billion, with 86 percent of this related to redemptions from exchange traded funds, BAML said.

Japan's Nikkei .N225 has posted its longest daily winning streak in over 50 years, advancing more than 5 percent over the last 14 days on hopes that Japanese Prime Minister Shinzo Abe's ruling coalition will win a national election on Oct. 22.

However, the market is prone to profit-taking before elections, and following the election BAML's analysts expect Japan's TOPIX .TOPX to revert to tracking U.S. bond yields.

Low yielding government bond and Treasury funds lost $1 billion in their fifth straight week of outflows, and precious metals suffered their largest outflows in 12 weeks, at $400 million, as investors sought out riskier assets.