I'm moving back to the UK after over a decade in HK.

Acquired a bunch of shares whilst here and the typical advice is to sell them all before becoming tax resident in the UK to avoid CGT. I was originally going to do this and b&B 30 days then buy in again once on the UK side (or just buy a similar tracking fund without waiting 30 days).

But then, it occurred to me: what is the date of valuing your shares if you are returning to the UK as a tax resident after over a decade? Is it the date you acquired the shares, or the date on which you become tax resident? (if the latter then there doesn't seem to be much point selling then re-buying)

I know the rules are different for those who have only been away for less than/ up to 5 years, but unclear for those who have been away for over 5 years.

Appreciate this is tax adviser territory, but grateful for any views on this.