Nonlinear response theory on the Keldysh contour