An empirical analysis of herd behavior in global stock markets