Two-Level Optimization in Imitative Stock-Markets