This paper proposes a long short-term memory (LSTM) neural network model to predict daily stock price movements based on asset pricing factors (i.e., the five factors proposed by Fama and French, and the short-term momentum factor). Based on three independent experiments, we systematically evaluate the explanatory power and the predictive power of the LSTM model by employing 3316 A-share listed companies in the Shanghai and Shenzhen stock exchanges from the in-sample period January 1, 2008 to December 31, 2019. Furthermore, we propose a four-step approach to dynamically update the underlying stocks in different portfolios based on the empirical findings. All portfolios are simulated using out-of-sample data (i.e., from January 1, 2020, to May 31, 2021) to avoid look-ahead bias. The trading results suggest that our dynamic investment strategies are superior to the benchmark index and are able to generate significant returns with relatively low risks.