Complex price dynamics in a financial market with imitation