I have read this post (How to realize capital gains before going from non-resident alien to resident alien in USA) and would like to ask a follow-up question.
It's understood that capital gains should be made PRIOR to being a US resident so to avoid US taxation on these gains. That makes sense especially when the tax is less in your originating country that it is for such gains in the US.
OK but WHEN should the stocks sale and the gains be made? What would be the deadline to execute this operation? Before physically moving to the US? Before April 30th (end of US FY if I am not mistaking)? Before the start of your US visa?
Thanks for clarifications.