A calibration algorithm for simulation-based pricing models