Financial investment in the composition of GDP In the production function Y = C + I + G + NX

Does foreign investment in domestic assets (i.e. foreign buying of domestic bonds) - and vice versa - come under the Net Exports variable? Which denotation does domestic investment in domestic assets come under? The Investment variable (I), one would think, however I seem to recall being told that the Investment variable does not include financial investment, so does it come under saving?
What you're describing is a change in the capital account, not in GDP. They're related through the balance of payments, in that if a country is running a current account deficit (usually arising through being a net importer), they'll have a capital account surplus (i.e., foreigners will on net buy more domestic assets or domestic owners will be net sellers of foreign assets, or both), and vice-versa. So if you take foreign investment in domestic assets for example, it'll be associated with being a net importer, but it does not appear directly in the national accounting identity $Y=C+I+G+NX$.