F1 student over 183 days capital gains tax on ETFs, no treaty
Trying to figure out where I stand before I file. I'm on an F1 visa, been in the US for about 26 months total across my program. I bought some broad-market ETFs through a brokerage last year and sold a few positions, some at a gain, some at a loss. My country has no tax treaty with the US. I keep reading conflicting things about the substantial presence test and whether F1 students are even counted toward the 183-day threshold. Some posts say F1 holders are exempt from counting days for 5 years, others say that only matters for the substantial presence test and not for my actual tax rate on capital gains. I've already pulled my 1099-B from the broker. I just don't know if I'm filing as a resident alien or nonresident alien, and whether my ETF gains get taxed at regular capital gains rates or at 30 percent flat. What actually applies here?