Optimal correction of the public debt and measures of fiscal soundness