Evolution and market behavior with endogenous investment rules