change = price[\'adjclose\'].diff(1) change.dropna(inplace=True) positive = change.copy() negative = change.copy() positive[positive<0] = 0 negative[negative>