This study employs Long Short-Term Memory (LSTM) neural network models for stock price prediction. LSTM models excel in managing nonlinearities and time-series dependencies in data, thereby enhancing the accuracy of stock price forecasts, reducing investment risks, and increasing returns. Investors can reasonably use the LSTM model to predict stock prices and obtain greater returns. The research utilizes eight years of historical data from BYD, including opening prices, closing prices, highest prices, lowest prices, and trading volumes, as training data. By adjusting various hyperparameters such as epochs, learning rates, and training-test ratios, the study analyzes their impact on the predictive accuracy of the model and identifies optimal configurations through comparative experimental methods. We found that the best parameters were when epoch number was 25, training ratio was 90:10 (minimum mean square error was 0.00175572) and 4 years of training data was selected as the training set (minimum mean square error was 0.00146477).