Based on your financial expertise, provide your response or viewpoint on the given financial question or topic. The response format is open.

How to realize capital gains before going from non-resident alien to resident alien in USA
Is this possible and will it have the intended effect? From the US tax perspective, it most definitely is and will. Is my plan not very similar to Wash Sale? Yes, except that wash sale rules apply for losses, not gains. In any case, since you're not a US tax resident, the US wash sale rules won't apply to you.