A New Measure of Herding Behavior: Derivation and Implications