A method may include obtaining blood glucose level readings over a diurnal period for each of a plurality of days and determining an estimated variability of the blood glucose levels over the diurnal period for the plurality of days. The method may also include modifying, based on the estimated variability of the blood glucose level, a target blood glucose level to a modified target blood glucose level, and delivering insulin, using an insulin pump, during the diurnal period based on the modified target blood glucose level.