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: Plots markers of the optimised portfolios for
  
  - minimum Volatility, and
  - maximum Sharpe Ratio.
docstr_tok: ["Plots","markers","of","the","optimised","portfolios","for","-","minimum","Volatility",",","and","-","maximum","Sharpe","Ratio","."]
code: def plot_optimal_portfolios(self) -> None:
      """Plots markers of the optimised portfolios for
  
      - minimum Volatility, and
      - maximum Sharpe Ratio.
      """
      # compute optimal portfolios
      min_vol_weights = self.minimum_volatility(save_weights=False)
      max_sharpe_weights = self.maximum_sharpe_ratio(save_weights=False)
      # compute return and volatility for each portfolio
      min_vol_vals = list(
          annualised_portfolio_quantities(
              min_vol_weights,
              self.mean_returns,
              self.cov_matrix,
              freq=self.freq,
          )
      )[0:2]
      min_vol_vals.reverse()
      max_sharpe_vals = list(
          annualised_portfolio_quantities(
              max_sharpe_weights,
              self.mean_returns,
              self.cov_matrix,
              freq=self.freq,
          )
      )[0:2]
      max_sharpe_vals.reverse()
      plt.scatter(
          min_vol_vals[0],
          min_vol_vals[1],
          marker="X",
          color="g",
          s=150,
          label="EF min Volatility",
      )
      plt.scatter(
          max_sharpe_vals[0],
          max_sharpe_vals[1],
          marker="X",
          color="r",
          s=150,
          label="EF max Sharpe Ratio",
      )
      plt.legend()
  
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 8 for calling the EfficientFrontier obj's underlying member method code with example usage: obj.plot_optimal_portfolios() without return types