PurposeThe purpose of this paper is to propose a new dynamic margin setting method for margin buying in China and evaluate the validity of its performance with the current margin system adopted by stock exchanges in extreme episodes.Design/methodology/approachThis paper adopts the dynamic conceptual model of Huang et al. (2012) (which is based on Figlewski (1984)) but incorporates Markov chain to describe the data generation process of stock price changes. By applying the model to margin buying contracts for the period of March 16, 2018, to May 2, 2018 (baseline study) and June 15, 2015, to July 27, 2015 (robustness test), the model’s superiority to the current margin system adopted by stock exchanges is also tested.FindingsThe paper has several important findings. First, the margins derived by this system vary with market conditions, rising (declining) when stock prices go down (up), and are generally lower than the requirements imposed by stock exchanges. Second, this margin system induces lower overall percentage of costs than that adopted by stock exchanges. Third, parameter estimation plays an important role on shaping empirical results.Research limitations/implicationsThe primary limitation of this paper lies in the fact that it does not solve the issue of determining optimal parameters of the Markov chain model. On the implication of findings, policy-makers and regulators on supervising margin buying activities may need a tune-up on the current margin system which features static margin requirements. Dynamic margins that incorporate market factors are virtually useful to balance the trade-off between liquidity and prudence.Originality/valueTo the best of the authors’ knowledge, this study is the first of its kind to develop a dynamic margin setting method for margin buying in China, aiming to balance the trade-off between liquidity and prudence. It not only takes into account the uniqueness of Chinese markets but also allows for time variations in both initial and maintenance margins.