One of my machine learning project involves the use of adjusted close prices (from Yahoo Finance, for better or worse) to determine the label – if a stock's adjusted close price increases by more than 10% in the subsequent year, it is labelled as a '1', otherwise it is a '0'.

I have been trying to make the backtests more rigorous, and one aspect of this involves a careful inspection to remove common pitfalls like the lookahead bias.

I would not have thought that using adjusted closes is a problem (in fact it seems like a necessity), but calculating the adjusted close does involve "data from the future", in the sense that the adjusted close price in 2010 has been adjusted for future splits/dividends.

  • 1
    $\begingroup$ Yes, prices have a lookahead bias in that sense. But returns (which is what you care about) do not. $\endgroup$
    – phdstudent
    May 30, 2018 at 9:22
  • $\begingroup$ Why not use the unadjusted price? $\endgroup$
    – Richard
    May 30, 2018 at 9:25
  • $\begingroup$ @Richard If there's a 2:1 stock split and I'm using unadjusted prices, the algorithm will think that the share price went down 50%. And at present it's a little bit hard for me to scrape dividend/split data for me to do the adjustments on my own. $\endgroup$ May 31, 2018 at 8:16

2 Answers 2


To elaborate and emphasize a bit on what @Antoine says, using adjusted prices will be reasonable from a returns point of view, with dividends reinvested.

That point, dividend reinvestment, is important because dividend reinvestment itself is a backtesting assumption, namely that dividends could be and would have been invested at the price you have in your database for the final cum-dividend date. You might well regard this as unsuitable for your particular strategy.

Note that because splits and dividends are usually known in advance, the fact of reinvestment itself is pretty realistic, because you would have known ahead of time how much dollar value to buy.

Reinvestment does bring up granularity issues. It's fine when investments are in the thousands of shares, but you can't trade fractional shares. Small dividends can't really be reinvested.

  • 2
    $\begingroup$ Depending on what you're trying to do, you may also have other precise, technical issues? Eg. CRSP correctly incorporates dividends into the holding period return based upon the ex-dividend date, but you wouldn't actually get the cash until the dividend payment date. $\endgroup$ May 30, 2018 at 21:54
  • $\begingroup$ That's a great point about dividend reinvestment – I don't imagine that I would be reinvesting dividends during live trading for the granularity issue you mention. The primary reason why I use adjusted data is to account for stock splits. I wonder how I could process the data to remove the dividend assumptions. $\endgroup$ May 31, 2018 at 8:19

As long as you are working with returns and not absolute prices it should not be a problem, since the return on adjusted close prices is the same as the return on a portfolio made up of 1 share at inception and with splits/dividends reinvested in additional shares in the portfolio on the ex div dates.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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