The goal of index fund management is minimize the tracking error, however, the variation of cash percentage affects tracking performance. We extend the application of Leland and Connor's theory model about optimal cash percentage. With Monte Carlo simulation we can obtain the optimal low limits and up limits of cash percentage, while Leland and Connor only got the formula of up limits. With the same initial parameters, the results got by Monte Carlo simulation and formula are consistent. In practice, precision of optimal cash percentage is not very important, so Monte Carlo method would be satisfied. Finally, we explore the cash percentage of index funds in China market.