def _summarize_simulations(self, mean_values, sim_vector, date_index, h, past_values):
        """ Produces forecasted values to plot, along with prediction intervals

        This is a utility function that constructs the prediction intervals and other quantities 
        used for plot_predict() in particular.

        Parameters
        ----------
        mean_values : np.ndarray
            Mean predictions for h-step ahead forecasts

        sim_vector : np.ndarray
            N simulation predictions for h-step ahead forecasts

        date_index : pd.DateIndex or np.ndarray
            Dates for the simulations

        h : int
            How many steps ahead are forecast

        past_values : int
            How many past observations to include in the forecast plot
        """         

        error_bars = []
        for pre in range(5,100,5):
            error_bars.append(np.insert([np.percentile(i,pre) for i in sim_vector], 0, mean_values[-h-1]))
        if self.latent_variables.estimation_method in ['M-H']:
            forecasted_values = np.insert([np.mean(i) for i in sim_vector], 0, mean_values[-h-1])
        else:
            forecasted_values = mean_values[-h-1:]
        plot_values = mean_values[-h-past_values:]
        plot_index = date_index[-h-past_values:]
        return error_bars, forecasted_values, plot_values, plot_index