The backpropagation neural network (BPNN) algorithm of artificial intelligence (AI) is utilized to predict A+H shares price for helping investors reduce the risk of stock investment. First, the genetic algorithm (GA) is used to optimize BPNN, and a model that can predict multi-day stock prices is established. Then, the Principal Component Analysis (PCA) algorithm is introduced to improve the GA-BP model, aiming to provide a practical approach for analyzing the market risks of the A+H shares. The experimental results show that for A shares, the model has the best prediction effect on the price of Bank of China (BC), and the average prediction errors of opening price, maximum price, minimum price, as well as closing price are 0.0236, 0.0262, 0.0294 and 0.0339, respectively. For H shares, the model constructed has the best effect on the price prediction of China Merchants Bank (CMB). The average prediction errors of opening price, maximum price, minimum price and closing price are 0.0276, 0.0422, 0.0194 and 0.0619, respectively.