Abstract:This paper introduces the trend moving average price index into traditional statistical methods of stock capital flows. The advantage of using the trend moving average price index is that it takes the stock not involved in the transaction into consideration,and can make up the shortcomings of traditional statistical methods. Taking the stocks of SSE 50 and GEM as research subjects, this paper makes an empirical study and the result proves the scientificity and rationality of the optimized method of stock capital flows.