Market dynamics and wealth inequality