Stabilization of business cycles of finance agents using nonlinear optimal control