NEW YORK (Reuters) - Investor risk aversion was on display for a second consecutive week as high-yield junk funds posted outflows of $831 million in the week leading up to the Brexit vote, Investment Company Institute data showed on Wednesday.

High-yield funds, which posted $269 million in outflows the prior week, moved in sympathy with domestic equity funds, which had estimated outflows of $3.9 billion for the week ended June 22, according to ICI data.

Higher up in the quality curve, investment-grade funds posted inflows of $1.84 billion for the week, their 12th consecutive week of inflows, ICI said.

"Investors continued to favor lower-risk bond products focused on investment grade and to a lesser extent government securities than high-yield corporate bonds," said Todd Rosenbluth, director of exchange-traded and mutual fund research at S&P Global Market Intelligence.

"To us, this is a preference for income stability in light (of) potentially higher credit default rates in the coming months."

Overall, bond funds had estimated inflows of $3.27 billion for the week, compared with estimated inflows of $1.48 billion the previous week. Taxable bond funds had estimated inflows of $1.4 billion, and municipal bond funds had estimated inflows of $1.87 billion, according to ICI.

Equity funds had estimated outflows of $3.84 billion for the week, compared with estimated outflows of $5.86 billion in the previous week, according to ICI data.

Britons voted to leave the European Union in a referendum held on June 23, a process known as Brexit.

"If investors had been concerned about possible Brexit, they would have shifted away from developed international equity products last week. The data confirms that some investors were caught off guard," Rosenbluth said.

"However, domestic equity outflows continued. But in the prior week, large- and mid-caps had the greatest redemptions. This time it was multi-cap and the 'other' style. 'Other' is a catch-all group of lots of investment styles."

(Reporting by Jennifer Ablan; Editing by Leslie Adler)