Herd Behavior and Financial Crashes: An Interacting Particle System Approach