The movement of stock index is difficult to predict for it is non-linear and subject to many inside and outside factors. Researchers in this field have tried many methods, SVM and ANN, for example, and have achieved good results. In this paper, we select Radial Basis Functions Neural Network (RBFNN) to train data and forecast the stock index in Shanghai Stock Exchanges. In order to solve the problem of slow convergence and low accuracy, and to ensure better forecasting result, we introduce Artificial Fish Swarm Algorithm (AFSA) to optimize RBF, mainly in parameter selection. Empirical tests indicate that RBF neural network optimized by AFSA can have ideal result in short-term forecast of stock indices.