docs: def max_ret_portfolio(exp_rets):
      """
      Computes a long-only maximum return portfolio, i.e. selects
      the assets with maximal return. If there is more than one
      asset with maximal return, equally weight all of them.
      
      Parameters
      ----------
      exp_rets: pandas.Series
          Expected asset returns (often historical returns).
  
      Returns
      -------
      weights: pandas.Series
          Optimal asset weights.
      """
      if not isinstance(exp_rets, pd.Series):
          raise ValueError("Expected returns is not a Series")
  
      weights = exp_rets[:]
      weights[weights == weights.max()] = 1.0
      weights[weights != weights.max()] = 0.0
      weights /= weights.sum()
  
      return weights