code: def gross_lev(positions):
      
  
      exposure = positions.drop('cash', axis=1).abs().sum(axis=1)
      return exposure / positions.sum(axis=1)
docs: Calculates the gross leverage of a strategy.
  
      Parameters
      ----------
      positions : pd.DataFrame
          Daily net position values.
           - See full explanation in tears.create_full_tear_sheet.
  
      Returns
      -------
      pd.Series
          Gross leverage.