class_docstr: An object to perform a Monte Carlo run/simulation for finding
  optimised financial portfolios.
  
  Inherits from `MonteCarlo`.
class_docstr_tok: ["An","object","to","perform","a","Monte","Carlo","run\/simulation","for","finding","optimised","financial","portfolios",".","Inherits","from","`","MonteCarlo","`","."]
docstr: Optimisation of the portfolio by performing a Monte Carlo
  simulation.
  
  :return:
      :opt_w: DataFrame with optimised investment strategies for maximum
          Sharpe Ratio and minimum volatility.
      :opt_res: DataFrame with Expected Return, Volatility and Sharpe Ratio
          for portfolios with minimum Volatility and maximum Sharpe Ratio.
docstr_tok: ["Optimisation","of","the","portfolio","by","performing","a","Monte","Carlo","simulation",".",":","return",":",":","opt_w",":","DataFrame","with","optimised","investment","strategies","for","maximum","Sharpe","Ratio","and","minimum","volatility",".",":","opt_res",":","DataFrame","with","Expected","Return",",","Volatility","and","Sharpe","Ratio","for","portfolios","with","minimum","Volatility","and","maximum","Sharpe","Ratio","."]
code: def optimisation(self) -> Tuple[pd.DataFrame, pd.DataFrame]:
      """Optimisation of the portfolio by performing a Monte Carlo
      simulation.
  
      :return:
          :opt_w: DataFrame with optimised investment strategies for maximum
              Sharpe Ratio and minimum volatility.
          :opt_res: DataFrame with Expected Return, Volatility and Sharpe Ratio
              for portfolios with minimum Volatility and maximum Sharpe Ratio.
      """
      # perform Monte Carlo run and get weights and results
      df_weights, df_results = self._random_portfolios()
      # finding portfolios with the minimum volatility and maximum
      # Sharpe ratio
      index_min_volatility = df_results["Volatility"].idxmin()
      index_max_sharpe = df_results["Sharpe Ratio"].idxmax()
      # storing optimal results to DataFrames
      opt_w: pd.DataFrame = pd.DataFrame(
          [
              df_weights.iloc[index_min_volatility],
              df_weights.iloc[index_max_sharpe],
          ],
          index=["Min Volatility", "Max Sharpe Ratio"],
      )
      opt_res: pd.DataFrame = pd.DataFrame(
          [
              df_results.iloc[index_min_volatility],
              df_results.iloc[index_max_sharpe],
          ],
          index=["Min Volatility", "Max Sharpe Ratio"],
      )
      # setting instance variables:
      self.df_weights = df_weights.astype(np.float64)
      self.df_results = df_results.astype(np.float64)
      self.opt_weights = opt_w.astype(np.float64)
      self.opt_results = opt_res.astype(np.float64)
      return opt_w, opt_res
  
file_path: FinQuant/finquant/monte_carlo.py
imports: from typing import Any, Callable, Dict, Optional, Tuple
  import matplotlib.pylab
  import numpy
  import pandas
  from finquant.data_types import FLOAT, INT
  from finquant.quants import annualised_portfolio_quantities
  from finquant.type_utilities import type_validation
label_desc: Use image node_id 4 for calling the MonteCarloOpt obj's underlying member method code with example usage: obj.optimisation() and returns: opt_w,  opt_res