code: def drawdown_idx(self):
          
  
          ri = self.ret_idx()
          return ri / np.maximum(ri.cummax(), 1.0) - 1.0
docs: Drawdown index; TSeries of drawdown from running HWM.
  
          Returns
          -------
          TSeries