Specialization and herding behavior of trading firms in a financial market