Share your insights or perspective on the financial matter presented in the input.

How to realize capital gains before going from non-resident alien to resident alien in USA
This will work as intended, but there's another point to consider. In the US, the tax rate on proceeds from stock sales is higher for short term holdings, which are defined as held for less than one year. Both rates vary based on your income. Bracket numbers are for fiscal year 2014, filing as single. The difference between short and long term capital gains tax in the US is a minimum of ten percentage points, and works out to 15 percentage points on average. This is substantial. If you won't be reporting much income the year you move to the US (say because you only worked for a portion of the year) it is decidedly to your advantage to wait and sell the stocks in the US, to get that sweet 0% rate. At a minimum, you should hold the position for a year if you sell and rebuy, from a tax optimization perspective. Two caveats: