Record levels of cash flocking to the U.S.

funds from europe

A record breaking amount of cash is flocking to the United States.

Foreign direct investment into the U.S. hit $200 billion in the first half of 2015, a record high according to a report published Thursday by the Organization for Economic Cooperation and Development (OECD).

It's a sign that global investors are optimistic about the U.S. economy at a time when the rest of the global economy undergoes a slowdown.

However, a lot of the money can be traced to foreign entities that are buying U.S. companies. Many of these companies then relocate overseas to escape high corporate taxes in the United States.

"These flows were driven not just by the improved economic performance in the United States but also by cross-border M&A designed to reduce companies' U.S. tax obligations," the OECD said in its report.

About $86 billion of the $200 billion went towards chemical companies. Another $80 billion to manufacturing companies. The OECD surmises that most of these funded mergers.

Related: Allergan, Pfizer could be biggest M&A deal of 2015

The OECD report was peppered with links to news stories and press releases about M&A deals for companies like Medtronic (MDT), a medical-device company that moved from the U.S. to Ireland to reduce its corporate taxes and pharmaceutical giant Actavis, which acquired Allergan (AGN) for $70 billion in March, renamed the new company Allergan and also relocated to Ireland.

About 77% of the money that flowed in the U.S. came from Luxembourg, which has tax-friendly entities called special purpose vehicles that are often created for M&A deals.

Globally, FDI flows have been going up for the last two years, and they increased 13% in the first half of this year compared to the same time in 2014.

CNNMoney Sponsors