Stocks are a proof of shares in a corporate enterprise and represent the ownership of the stockholder in the joint stock company. Stock trading is a dynamic and complicated project, stock history data is a non-linear and highly noisy time series. Considering the risky nature of stock trading, it is essential to provide an optimal prediction method to ensure stock trading security. The accuracy of traditional stock trading prediction is insufficient, so this study attempts to use reinforcement learning models for stock trading change prediction under big data. This paper proposes the median absolute deviation method (MAD) and Q-learning model to build a more effective prediction model. The simulation results based on NASDAQ Composite (^IXIC) data show that the new method can better help predict stocks. The method has some limitations and currently uses a combination of traditional econometric models and reinforcement learning models, which have some efficiency issues. However, the research in this paper provides a good extension to the theoretical aspects of stock prediction analysis and can provide investors with new research methods and perspectives.