Finite horizon guaranteed cost for nonlinear quadratic systems