code: def min_cvar(self, s=10000, beta=0.95, random_state=None):
          
          args = (self.returns, s, beta, random_state)
          result = noisyopt.minimizeSPSA(
              objective_functions.negative_cvar,
              args=args,
              bounds=self.bounds,
              x0=self.initial_guess,
              niter=1000,
              paired=False,
          )
          self.weights = self.normalize_weights(result["x"])
          return dict(zip(self.tickers, self.weights))
docs: Find the portfolio weights that minimises the CVaR, via
          Monte Carlo sampling from the return distribution.
  
          :param s: number of bootstrap draws, defaults to 10000
          :type s: int, optional
          :param beta: "significance level" (i. 1 - q), defaults to 0.95
          :type beta: float, optional
          :param random_state: seed for random sampling, defaults to None
          :type random_state: int, optional
          :return: asset weights for the Sharpe-maximising portfolio
          :rtype: dict