code: def to_price_index(returns, start=100):
      
      return (returns.replace(to_replace=np.nan, value=0) + 1).cumprod() * start
docs: Returns a price index given a series of returns.
  
      Args:
          * returns: Expects a return series
          * start (number): Starting level
  
      Assumes arithmetic returns.
  
      Formula is: cumprod (1+r)