Purchasing a stock before the ex-dividend date ensures that you remain eligible to receive the upcoming dividend payment declared by the company. However, economic theory and market mechanics dictate that a stock's price typically opens lower on the ex-dividend date by an amount roughly equivalent to the payout value, as the cash leaves the corporation's balance sheet. Therefore, choosing when to buy should depend on long-term investment strategy, fundamental valuation, and portfolio goals rather than trying to capture a short-term dividend payout.