code: def cci(series, window=14):
      
      price = typical_price(series)
      typical_mean = rolling_mean(price, window)
      res = (price - typical_mean) / (.015 * np.std(typical_mean))
      return pd.Series(index=series.index, data=res)
docs: compute commodity channel index