Working code for Pareto curve generation that considers shared underlyings