I am a foreigner and will move to USA next year (2016) and want to optimize my tax situation beforehand. I bought stocks in 2009 which appreciated in value but I would still like to keep them.
So my plan is to sell those stocks right now and buy them back 5 minutes later. That way, I am realizing current capital gains and only pay tax in my current country (but not in US) and if I would be selling the stocks in 2016 I would only need to pay capital gains on the appreciation between now and time of sale 2016.
1) Is this possible and will it have the intended effect? 2) Is my plan not very similar to http://en.wikipedia.org/wiki/Wash_sale, i.e. I would need to wait 30 days before re-purchasing the stocks?