When companies declare a dividend, they choose the amount per share, the date the stock will go ex-dividend, and the datepayment will be made to shareholders of record.
Stock prices readjust on the ex-dividend date to reflect the pending payment, and there is no guarantee the shares won't slip below the trader's breakeven point, resulting in losses.
If you do wish to account for this, enter the value of the dividendpayment with a negative sign on the date a stock goes ex-dividend, and add the number back in when the dividend is received.