Stock yield forecast has been an important issue and difficult task for both shareholders and financial professionals. In this paper, we introduce least square support vector machine (LS-SVM), an improved algorithm that regresses faster than standard SVM, and the parameters of model proposed are gained in the three levels of Bayesian inference. The work of this paper is as following: First, forecast daily stock Yield of Shanghai Security Exchanges of China using back propagation neural network (BPNN) and LS-SVM. Secondly, forecast the stock yield using LS-SVM in Bayesian framework. Finally, make a comparative analysis of the three algorithms. We reached conclusion that, in terms of forecast accuracy, LS-SVM outperforms BPNN, and when LS-SVM in Bayesian inference, the best result is achieved.