class_docstr: An object designed to perform optimisations based on minimising a cost/objective function.
  It can find parameters for portfolios with
  
  - minimum volatility
  - maximum Sharpe ratio
  - minimum volatility for a given target return
  - maximum Sharpe ratio for a given target volatility
  
  It also provides functions to compute the Efficient Frontier between a range
  of Returns, plot the Efficient Frontier, plot the optimal portfolios
  (minimum Volatility and maximum Sharpe Ratio).
class_docstr_tok: ["An","object","designed","to","perform","optimisations","based","on","minimising","a","cost\/objective","function",".","It","can","find","parameters","for","portfolios","with","-","minimum","volatility","-","maximum","Sharpe","ratio","-","minimum","volatility","for","a","given","target","return","-","maximum","Sharpe","ratio","for","a","given","target","volatility","It","also","provides","functions","to","compute","the","Efficient","Frontier","between","a","range","of","Returns",",","plot","the","Efficient","Frontier",",","plot","the","optimal","portfolios","(","minimum","Volatility","and","maximum","Sharpe","Ratio",")","."]
docstr: Finds the portfolio with the maximum Sharpe ratio for a given
  target volatility.
  
  :param target: The target return of the optimised portfolio.
  
  :return: DataFrame of weights/allocation of stocks within the optimised portfolio.
docstr_tok: ["Finds","the","portfolio","with","the","maximum","Sharpe","ratio","for","a","given","target","volatility",".",":","param","target",":","The","target","return","of","the","optimised","portfolio",".",":","return",":","DataFrame","of","weights\/allocation","of","stocks","within","the","optimised","portfolio","."]
code: def efficient_volatility(self, target: NUMERIC) -> pd.DataFrame:
      """Finds the portfolio with the maximum Sharpe ratio for a given
      target volatility.
  
      :param target: The target return of the optimised portfolio.
  
      :return: DataFrame of weights/allocation of stocks within the optimised portfolio.
      """
      # Type validations:
      type_validation(target=target)
      args = (
          self.mean_returns.values,
          self.cov_matrix.values,
          self.risk_free_rate,
      )
      # here we have an additional constraint:
      constraints = (
          self.constraints,
          {
              "type": "eq",
              "fun": lambda x: min_fun.portfolio_volatility(
                  x, self.mean_returns, self.cov_matrix
              )
              - target,
          },
      )
      # optimisation
      result = sco.minimize(
          min_fun.negative_sharpe_ratio,
          args=args,
          x0=self.x_0,
          method=self.method,
          bounds=self.bounds,
          constraints=constraints,
      )
      # if successful, set self.last_optimisation
      self.last_optimisation = "Efficient Volatility"
      # set optimal weights
      self.weights = result["x"]
      self.df_weights = self._dataframe_weights(self.weights)
      return self.df_weights
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import matplotlib.pylab
  import numpy
  import pandas
  import scipy.optimize
  import finquant.minimise_fun
  from finquant.data_types import ARRAY_OR_DATAFRAME, ARRAY_OR_LIST, FLOAT, INT, NUMERIC
  from finquant.quants import annualised_portfolio_quantities
  from finquant.type_utilities import type_validation
label_desc: Use image node_id 5 for calling the EfficientFrontier obj's underlying member method code with example usage: obj.efficient_volatility(target) and returns: self