Capital gains for non resident aliens — how does the US actually tax this?
Trying to figure out capital gains for non resident aliens because I'm on an F-1 visa, have been in the US about 14 months total, and I sold some ETFs through a US brokerage last year. My broker sent a 1099-B. I'm pretty sure I'm still a nonresident alien under the substantial presence test but I wanted to confirm how capital gains get taxed in that case. TurboTax kept trying to push me to a resident return and I bailed out. Do nonresident aliens even owe US tax on stock sale gains, or does it depend on the type of asset? I've read conflicting things — some say it's not taxable, some say it depends on whether the income is "effectively connected." Which form do I even file?