In this paper,we used the sequential trade framework of financial market microstructure model to study the herding mechanism in security markets.The result indicated that the inventory change can originate herd behavior.When the investor possesses low inventory of risky asset,he is reluctant to engage in buying herding behavior;on the contrary,when he possesses high inventory of risky asset,he is reluctant to engage in selling herding behavior.