# 9.38:  Use .shift().  Shift the close price by one day to compare with the current price and
# calculate daily return.

df['prev_close'] = df['close'].shift(1)
df['daily_return'] = (df['close'] - df['prev_close']) / df['prev_close']

df[['close', 'prev_close', 'daily_return']].head(10)

