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: Computes random weights for the stocks of a portfolio and the
  corresponding Expected Return, Volatility and Sharpe Ratio.
  
  :result: Tuple of (weights (array), and array of expected return, volatility, sharpe ratio)
docstr_tok: ["Computes","random","weights","for","the","stocks","of","a","portfolio","and","the","corresponding","Expected","Return",",","Volatility","and","Sharpe","Ratio",".",":","result",":","Tuple","of","(","weights","(","array",")",",","and","array","of","expected","return",",","volatility",",","sharpe","ratio",")"]
code: def _random_weights(
      self,
  ) -> Tuple[np.ndarray[np.float64, Any], np.ndarray[np.float64, Any]]:
      """Computes random weights for the stocks of a portfolio and the
      corresponding Expected Return, Volatility and Sharpe Ratio.
  
      :result: Tuple of (weights (array), and array of expected return, volatility, sharpe ratio)
      """
      # select random weights for portfolio
      weights: np.ndarray[np.float64, Any] = np.array(
          np.random.random(self.num_stocks), dtype=np.float64
      )
      # rebalance weights
      weights = weights / np.sum(weights)
      # compute portfolio return and volatility
      portfolio_values: np.ndarray[np.float64, Any] = np.array(
          annualised_portfolio_quantities(
              weights,
              self.return_means,
              self.cov_matrix,
              self.risk_free_rate,
              self.freq,
          ),
          dtype=np.float64,
      )
      return (weights, portfolio_values)
  
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 2 for calling the MonteCarloOpt obj's underlying member method code with example usage: obj._random_weights() and returns: weights,  portfolio_values