code: def simulate_paths(is_returns, num_days,
                     starting_value=1, num_samples=1000, random_seed=None):
      
  
      samples = np.empty((num_samples, num_days))
      seed = np.random.RandomState(seed=random_seed)
      for i in range(num_samples):
          samples[i, :] = is_returns.sample(num_days, replace=True,
                                            random_state=seed)
  
      return samples
docs: Gnerate alternate paths using available values from in-sample returns.
  
      Parameters
      ----------
      is_returns : pandas.core.frame.DataFrame
          Non-cumulative in-sample returns.
      num_days : int
          Number of days to project the probability cone forward.
      starting_value : int or float
          Starting value of the out of sample period.
      num_samples : int
          Number of samples to draw from the in-sample daily returns.
          Each sample will be an array with length num_days.
          A higher number of samples will generate a more accurate
          bootstrap cone.
      random_seed : int
          Seed for the pseudorandom number generator used by the pandas
          sample method.
  
      Returns
      -------
      samples : numpy.ndarray