code: def up_capture(self, benchmark, threshold=0.0, compare_op="ge"):
          
  
          slf, bm = self.upmarket_filter(
              benchmark=benchmark,
              threshold=threshold,
              compare_op=compare_op,
              include_benchmark=True,
          )
          return slf.geomean() / bm.geomean()
docs: Upside capture ratio.
  
          Measures the performance of `self` relative to benchmark
          conditioned on periods where `benchmark` is gt or ge to
          `threshold`.
  
          Upside capture ratios are calculated by taking the fund's
          monthly return during the periods of positive benchmark
          performance and dividing it by the benchmark return.
          [Source: CFA Institute]
  
          Parameters
          ----------
          benchmark : {pd.Series, TSeries, 1d np.ndarray}
              The benchmark security to which `self` is compared.
          threshold : float, default 0.
              The threshold at which the comparison should be done.
              `self` and `benchmark` are "filtered" to periods where
              `benchmark` is gt/ge `threshold`.
          compare_op : {'ge', 'gt'}
              Comparison operator used to compare to `threshold`.
              'gt' is greater-than; 'ge' is greater-than-or-equal.
  
          Returns
          -------
          float
  
          Note
          ----
          This metric uses geometric, not arithmetic, mean return.