code: def information_ratio(rets, bm_rets, scale=None, expanding=False):
      
      scale = _resolve_periods_in_year(scale, rets)
      rets_ann = returns_annualized(rets, scale=scale, expanding=expanding)
      bm_rets_ann = returns_annualized(rets, scale=scale, expanding=expanding)
      tracking_error_ann = std_annualized((rets - bm_rets), scale=scale, expanding=expanding)
      return (rets_ann - bm_rets_ann) / tracking_error_ann
docs: Information ratio, a common measure of manager efficiency, evaluates excess returns over a benchmark
      versus tracking error.
  
      :param rets: period returns
      :param bm_rets: periodic benchmark returns (not annualized)
      :param scale: None or the scale to be used for annualization
      :param expanding:
      :return: