A robust algorithm for utility-based shortfall risk (UBSR) measures is developed by combining the kernel density estimation with importance sampling (IS) using exponential twisting techniques. The optimal bandwidth of the kernel density is obtained by minimizing the mean square error of the estimators. Variance is reduced by IS where exponential twisting is applied to determine the optimal IS distribution. Conditions for the best distribution parameters are derived based on the piecewise polynomial loss function and the exponential loss functio...