I wonder if general purpose functions such as mean_curve and  weighted_quantile_curve should stay in risklib