convex optimization for model calibration