<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def excess_ret(self, benchmark, method="arithmetic"):
 """Excess return. Parameters benchmark : {pd.Series, TSeries, 1d np.ndarray} The benchmark security to which `self` is compared. method : {{'arith', 'arithmetic'}, {'geo', 'geometric'}} The methodology used. An arithmetic excess return is a straightforward subtraction. A geometric excess return is the ratio of return-relatives of `self` to `benchmark`, minus one. Also known as: active return. Reference --------- .. _Essex River Analytics - A Case for Arithmetic Attribution http://www.northinfo.com/documents/563.pdf .. _Bacon, Carl. Excess Returns - Arithmetic or Geometric? https://www.cfapubs.org/doi/full/10.2469/dig.v33.n1.1235 """


        if method.startswith("arith"):
            return self - _try_to_squeeze(benchmark)
        elif method.startswith("geo"):
            # Geometric excess return,
            # (1 + `self`) / (1 + `benchmark`) - 1.
            return (
                self.ret_rels() / _try_to_squeeze(benchmark).ret_rels() - 1.0
            )