The United States is the place to be for global investors.
Foreigners can't get seem to get enough of U.S. assets. They view the American economy as safe as many other parts of the world struggle, including China.
That's why foreign holdings of American bonds and stocks hit record levels this year, according to an analysis of Federal Reserve fund flow data by U.S. Trust.
"The U.S. has clearly emerged as the most competitive and innovative economy in the world," wrote Joseph Quinlan, chief market strategist at U.S. Trust.
Here are the numbers: Overseas investors held an all-time high of $6.2 trillion of U.S. government bonds at the end of June and $5.9 trillion of U.S. stocks. The equity holding was just a tad lower than the record of $6 trillion from the first quarter of the year.
All signs indicate that overseas investors will keep buying American assets even though the past few weeks have been rough for the markets.
Related: Can stocks rebound from a dismal quarter?
Foreign investors own 20% of stocks, 43% of bonds
It was the worst third quarter for stocks in four years. It's possible foreign investors pulled back a bit as the markets tumbled. But expect them to look for opportunities to get back in.
Overseas investors currently own about 20% of U.S. stocks. Quinlan predicts that's likely to grow even more, where foreigners will own a third of American stocks in the next five to 10 years.
Countries that have sovereign wealth funds such as Norway and China tend to prefer to hold the stocks of large, well-known companies that pay high dividends. American companies dominate that list of stocks.
Japan, which has the largest government pension fund in the world, announced about a year ago that it planned to purchase more foreign stocks.
Related: The world's 5 biggest sovereign wealth funds
On the bond side, foreign ownership as a percentage of overall U.S. government bonds peaked at just over 50% around the time of the 2008 financial crisis.
Foreigners have continued buying -- hence the record dollar amount -- but their overall percentage has fallen to 43% as U.S. investors have increased their share.
Foreigners have also been hot for U.S. corporate bonds. Overseas investors now hold 35% of the U.S. corporate debt market, up from only a quarter a decade ago.
All of this is good news. More buyers means more demand, which tends to push up prices.
"The key message for U.S. investors is to buy on the dips," says Quinlan. "You're going to have support from the secular increase in foreign increase in U.S. stocks over the next decade."