I know this is an old post but I have a more technical question. I've asked my US brokerage firm if they share anything with foreign tax authorities and they've said no. They only share info with the
IRS. So the only way my home country(a 3rd world shithole) can know about my account is through the IRS.
But, I have filled a form while opening my account and declared that I'm a "non-resident alien" to the IRS. So I only pay witholding tax for
dividends and certain types of interest. Capital gains of non-resident aliens aren't taxed in US. I don't even need to fill the form required for that an inform the IRS. I've never had any dividend payments made to me, I mostly trade options.
So how can my resident country can know about this and make me pay capital gains taxes? IRS doesn't know it either as I've stated why.