code: def gain_to_loss_ratio(self):
          
  
          gt = self > 0
          lt = self < 0
          return (nansum(gt) / nansum(lt)) * (self[gt].mean() / self[lt].mean())
docs: Gain-to-loss ratio, ratio of positive to negative returns.
  
          Formula:
          (n pos. / n neg.) * (avg. up-month return / avg. down-month return)
          [Source: CFA Institute]
  
          Returns
          -------
          float