 Large stock market trends often begin and end with periods of frenzied buying (bubbles) or selling (crashes).Many observers cite these episodes as clear examples of herding behavior that is irrational and driven by emotion—greed in the bubbles, fear in the crashes.Individual investors join the crowd of others in a rush to get in or out of the market.