Fooled by adjusted prices

Tadas Talaikis
BlueBlood
Published in
2 min readAug 23, 2018

For years I am amazed how many people, even quants and academia, use adjusted prices for their strategies signals generation.

Problem with using adjusted prices for signals is that we cannot experience adjusted prices in the reality and that dividends, when added to the adjusted share price create drifts, which create skewed strategy results.

Let’s try a simple example. We’ll take a few dividend paying ETFs (SPY and TLT) and will test simple strategy on adjusted and on non-adjusted data:

from numpy import where
from matplotlib import pyplot as plt
from app.data import get_pickle
def main():
for symbol in ['SPY', 'TLT']:
df = get_pickle('tiingo', symbol)
df['adj_ret'] = df['{}_AdjClose'.format(symbol)].pct_change()
df['ret'] = df['{}_Close'.format(symbol)].pct_change()
df['adj_sma'] = df['adj_ret'].rolling(window=20, min_periods=20).mean()
df['ret_sma'] = df['ret'].rolling(window=20, min_periods=20).mean()
df = df.dropna()
df['sig_adj'] = where(df['adj_ret'] > df['adj_sma'], 1, 0)
df['sig_norm'] = where(df['ret'] > df['ret_sma'], 1, 0)
df['ret_adj'] = df['sig_adj'].shift() * df['adj_ret']
df['ret_norm'] = df['sig_norm'].shift() * df['adj_ret']
print('Adjusted %s max difference: %.2f%%' % (symbol, (abs(df['ret_adj'].cumsum() - df['ret_norm'].cumsum())).max()*100.0)) plt.plot(df['ret_adj'].cumsum(), color='r')
plt.plot(df['ret_norm'].cumsum(), color='g')
plt.show()

SPY visual comparison:

Red — adjusted

TLTL visual comparison:

Red — adjusted

TLT is a nice demo for this, such difference can easily discard the instrument from the portfolio and make it more risky.

Max differences for the different data:

Adjusted SPY max difference: 4.14%
Adjusted TLT max difference: 12.95%

--

--