A mean-field model of optimal investment | Synapse