Abstract:Stock market liberalization plays an essential role in China’s highlevel opening by optimizing the investor structure and improving market efficiency. Based on the heterogeneous agents model in the open economy, this paper explores the impact of the “ShanghaiHong Kong Stock Connect” program on irrational investor behavior and market efficiency. It is discovered that stock market liberalization influences the two representative irrational behaviors differently. The implementation of the “ShanghaiHong Kong Stock Connect” program has an insignificant impact on autonomous switching behavior but directly reduces herding. After the implementation of the “ShanghaiHong Kong Stock Connect” program, herding decreases when the RMB appreciates and when the Libor increases. This paper develops a market efficiency indicator incorporating both rational and irrational forces. It is found that the implementation of the “ShanghaiHong Kong Stock Connect” program improves the proportion of stock return volatility driven by fundamental force, thus increasing the efficiency of the local market. This paper extends the literature on stock market liberalization’s effect on microentities and provides an empirical basis for further liberalization.