its based on the difference in value between the day before you gain residency there. so if the stock hits and then you move you still have to pay the tax. https://relocatepuertorico.com/move-to-puerto-rico-and-pay-no-capital-gains-tax/