As I said before ... gifting is not the issue.
And technically, neither is capital gain, because when the parents cash the stock and turn it into cash that would be the point where capital gains (if there is such a tax where they are) would happen.
However, I would no be analyzing this well, if I didn't point out that an IRS agent COULD say... MIGHT ... say ... that you only transferred the money to avoid the capital gains then brought it right back here to the US with you after someone had sold it FOR you.
So if you are non-resident, when you gift, and non-resident when you receive the proceeds back it becomes cleaner.
BUT, lets say that you are back in the US, as resident, in a year.
And the parents send the proceeds back to you.
IRS COULD say ... Well, you bought the stocks while you were here, they appreciated while you were here, you then left and gifted the stocks to someone who sold them for you ... only to give them right back to you.
They COULD make a case that you were intentionally avoiding the capital gains tax.
IF ... you gift away, while not a resident (not intending ever to be a resident) and the your parents (non-US citizens or residents) sell those appreciated stocks ... and they - for some reason - decide to give you money ... possibly from the proceeds of that sale? ... (while you are not a US resident nor intend to be) then it is not the US's business in any way.
But, if it all happens fairly quickly (within a few years) and you are us resident for any part of it ... it beings to be more POSSIBLE for IRS to make the case that your intent was to AVOID the capital gains all along.
The way you have described this, however, gifting as a true non-resident and receiving money back as a non-resident, not necessarily from the proceeds of that sale by your parents, there is not gift or capitals gains tax owed.
Positive feedback appreciated. That's the way I get credit
for the work here.