16

In an attempt run few backtesting tasks, I have obtained some historical data. I noticed that there are two closing prices available, regular close and adjusted close.

After doing some reading, I have learned that the adjusted close value is being affected by the following parameters and in fact NOT the real close value on that day.

  1. Cash dividends
  2. Stock dividends
  3. Stock splits

I'm still confused which one of the close values should I use though, the real one or the adjusted?

It seems that the adjusted close gives more accurate data about the stock but it is not the real price.

  • 3
    +1 for a great question, I don't know why someone down voted you! – Victor Apr 21 '13 at 22:51
8

You would have to compare your backtesting to what you will be doing in real trading, and try to have the backtesting as close to your real trading as possible. Note: you may never get the backtesting to match your real trading exactly but you need to get as close as possible.

The whole purpose of backtesting is to check if your trading strategies - your signals, entries and exits, and your stops - are profitable over various market conditions. As you would be using actual closes to do your real trading you should be using this to also do your backtesting.

Rather than using adjusted data to get an idea of your total return from your backtesting, you can always add the value of the dividends and other corporate actions to the results from using the actual data. You may even find a way to add any dividends and other corporate action to your results automatically, i.e. any dividend amount added to your total return if the stock is held during the ex-dividend date.

If you are using adjusted data in your backtesting this may affect any stops you have placed, i.e. it may cause your stop to be triggered earlier or later than in real trading. So you will need to determine how you will treat your stops in real trading.

Will you adjust them when there is corporate action such as dividends?

Or will you leave them constant until actual prices have gone up?

If you will be leaving your stops constant then you should definitely be using actual data in your backtesting to better match your real trading.

  • 4
    +1 for focus on the trading aspect, vs my longer term issue with returns. – JoeTaxpayer Apr 21 '13 at 23:25
  • Thanks a lot for your answer. Sounds very logical. But how you propose to deal with splits? I guess I should just check manually when splits occur and just avoid these dates. Does that sounds reasonable to you or you have other/better ideas? Thanks again! – Eugene S Apr 22 '13 at 1:13
  • And don't forget taxes. – assylias Apr 22 '13 at 11:09
  • @assylias - taxes would depend on the total gains minus total losses from all positions not one single position, and then added to your other income for the year. You wouldn't include this in backtesting. Backtesting is only used to check how robust a trading system is, whether it will be profitable over a number of market conditions. Both total returns which includes dividends and the issue of tax should be incorporated on a separate spreadsheet or program but not in the backtesting. – Victor Apr 11 '14 at 21:14
  • @Victor I meant withholding tax on dividends. – assylias Apr 12 '14 at 7:49
7

A one year period of study -

Stock A trades at $100, and doesn't increase in value, but has $10 in dividends over the period.

Stock B starts at $100, no dividend, and ends at $105.

However you account for this, it would be incorrect to ignore stock A's 10% return over the period.

To flip to a real example, MoneyChimp shows the S&P return from Jan 1980 to Dec 2012 as +3264% yet, the index only rose from 107.94 to 1426.19 or +1221%.

The error expands with greater time and larger dividends involved, a good analysis won't ignore any dividends or splits.

  • 1
    Thank you for your answer. I am totally agree with you that dividends and splits should be ignored. However currently, I can't see a way how these factors could be incorporated in backtesting. Please correct me if I'm wrong, but if I use a regular close for the purpose of backtesting - I will not take dividends and splits into account, but if I use adjusted close, my algorithm might (and will) perform incorrectly according to the real price. So how do I bring these factors together? – Eugene S Apr 21 '13 at 13:49
  • 1
    If your algorithm functions incorrectly with adjusted close, I'd suggest it's flawed. As I showed, for very short time horizons, this may be less of an issue (I suspect day traders aren't too concerned about dividends) but any trading plan that covers a longer duration wouldn't wish to ignore this. – JoeTaxpayer Apr 21 '13 at 18:06
2

If you want to monitor how well you did in choosing your investments you will want to use stock prices that account for the dividends and splits and other changes (not just the closing price). The adjusted close will include these changes where the straight close will not include them. Using the adjusted close you will get your true percentage change. For example I have a stock called PETS that paid an $0.18 dividend in July 2015. The adjusted closes before that day in July are all $0.18 lower per share. Say the closing price had been unchanged at $20.00. The close prices would say I made no profit, but the adjusted closing price would say I made $0.18 per share on this investment because the adjusted close would read $19.82 in June 2015 but would read $20.00 in August 2015 (just like the closing price). The adjusted close allows me to know my true profit per share.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.