If i am a long term investor of a dividend paying stock, but i don't want to pay the dividend tax for non-US citizen. What is the best way to avoid it? The strategy i have in mind is sell it at 15:59 on the ex-dividend date and buy it back at 16:01. Is that doable? Is after hours on the same date considered pass the ex-dividend date? And will the market at 16:01 drop by roughly the same amount of the declared dividend?