Canadian investors acquired a record $22 billion of foreign securities in December, mainly foreign shares, according to a report published Friday from Statistics Canada.

International transactions in securities generated a net inflow of $103.9 billion to the Canadian economy in 2017, the report says, as record levels of foreign investment in Canadian securities was somewhat offset by $84.7 billion worth of Canadian investment in foreign securities.

Canadian investment in December was mainly in foreign equities, with acquisitions totalling a record $19.8 billion.

On a geographical basis, acquisitions were diversified, with $11.4 billion directed to the U.S. market and $8.4 billion to other foreign markets. “U.S. stock prices edged up in December, a ninth consecutive month of increase,” the StatsCan report says.

For the year, Canadian investment in foreign securities reached $84.7 billion compared with $13.8 billion in 2016. Acquisitions in the year mainly targeted U.S. shares.

Meanwhile, foreign investors reduced their holdings of Canadian securities by $2 billion in December, led by a divestment in Canadian bonds.

This represents a reversal from the trend during 2017, however. Overall foreign investment in Canadian securities reached $188.5 billion during the year, led by strong acquisitions of Canadian bonds.

“Foreign investors just can’t seem to get enough of Canadian securities,” says National Bank Financial (NBF) in a report on the data.

Foreign investors acquired $148.6 billion worth of Canadian bonds during the year, and $55.6 billion in equities, which were all-time highs, the NBF report says.

Investors also divested a record $15.7 billion worth of Canadian money market instruments during the year, which the NBF report attributes to the combination of “a shrinking supply of T-Bills and reduced demand as some foreign investors moved up the curve to acquire bonds.”