Include Dividend at backtest report

Hi Everyone!
I have a question if dividens are teken into total quity when standard backtest portfolio shows the result.
Lets say:
Buy 1 share AAPL at close price 150.96, next day we have dividend 0.22 and close price is 151.28.

Backtest portfolio shows cumilative profit 0.32 excluding 0.22 of the dividend.
Why is that? How to count it?
Thank you.
(dividend data uploaded to Amibroker by Amiqute)

The easiest way to include the dividend in your P/L is to backtest using dividend-adjusted prices.

1 Like

Thank you! Is there in Amibroker any automation way to adjust the prices +dividend?

If you want to follow @mradtke advice - you don't need to do anything. Prices including those coming from Yahoo are usually adjusted for dividends. If you are using different provider, check if you get adjusted prices.

I use Yahoo and the thing is that adjusted prices are coming subtracted dividends from regular Close price. I dont understand why is that. I would get those dividend to my account as addition to regular Close and not subtracted. Where im wrong here?

When a dividend is paid, all prices before the dividend date are adjusted downward by the dividend amount as a percentage of the closing price. In this way, the current prices always reflect actual "as traded" prices, while older prices do not. But in terms of your example, it means that in a backtest you would be entering the AAPL trade at a price of $150.96 - 0.22 = $150.74 [note simplified math here -- the $0.22 would actually be a percentage not a fixed dollar amount]. If you then exit the next day at $151.28, then your profit is $0.54, which correctly reflects the $0.22 dividend plus the $0.32 price change.

3 Likes

Thank you very much! Now its clear for me when you explained!
But I still have 2 questions:

  1. Do I have to reload the whole data since today all prices Close and Adj Close are equal.
  2. How to use adj close prices in amibroker? (Amiquote downloads normal Close from Yahoo).
    Thank you.

AmiQuote by default downloads BOTH but importer by default imports SPLIT ADJUSTED quotes. You can change to SPLIT AND DIVIDEND adjusted.

Read the Knowledge Base:

Thank you Tomasz!
I will do that.
I also consider use the power of Custom Backtester options to use dividends as addition to final equity.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.