3
$\begingroup$

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.

$\endgroup$
3
  • 1
    $\begingroup$ Yes, prices have a lookahead bias in that sense. But returns (which is what you care about) do not. $\endgroup$
    – phdstudent
    Commented May 30, 2018 at 9:22
  • $\begingroup$ Why not use the unadjusted price? $\endgroup$
    – Richard
    Commented 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$ Commented May 31, 2018 at 8:16

2 Answers 2

7
$\begingroup$

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.

$\endgroup$
2
  • 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$ Commented 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$ Commented May 31, 2018 at 8:19
4
$\begingroup$

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.

$\endgroup$

Your Answer

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

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