This strategy tries to hold each stock for as little time as possible to receive the dividend, and then jumps to the next. It buys a stock near the close for stocks that are 1 day ahead of their ex-dividend dates, and then sells it immediately on the open.

Because dividends aren't paid immediately, I tried to track the round trip returns though the record function. The payoff should be the value f the dividend minus the change in portfolio value while holding the stock. To estimate the gain, I record the portfolio value before I enter my trades, the number of shares and the dividend per share, and the portfolio value after I exit the trades.

I wasn't expecting this to be a perfect match to the returns, but my estimate is about 15x higher than the backtester returns. Can anyone explain where the difference is coming from or where I've made a mistake? I'm guessing that I'm somehow missing the record date and dividend along with it.

Also, one interesting thing is that it looks, to me, like you can see the spread of quant trading through the returns. It does really well up until the 2010's, and performance slows down as I would assume more and more people implemented quant strategies. If anyone has access to the premium data, it'd be really interesting to see how it performs over the last two year!!