Machine learning involves many fields such as probability theory, statistics, and algorithm complexity theory. Using existing algorithms and models to make judgments or predictions without clear instructions, relying on existing data, patterns, and reasoning. It is a subset of Artificial Intelligence that includes statistical techniques and knowledge to deal with a dataset with vast amounts of data. It can be applied to our daily life, such as investment decisions of stocks, options futures and other derivatives. In this article, the author will predict price performance by using a just-in-time LSTM model. The goal of the mission is to use past historical price data to make accurate predictions about Tesla's stock price over the future. Due to the characteristics of Tesla's case of high-volatility stocks, this problem is extremely challenging and has become a popular research topic in stock price forecasting. From a machine learning perspective, this is a good, critical but challenging prediction problem. That's because Tesla is already a leader in electric vehicle (EV) production. The linear regression model and LSTM (long and short-term model) model are respectively used to forecast Tesla's stock price. The RMSE value is used to evaluate the accuracy of the two models and the results are obtained: the accuracy of the LSTM model prediction is much higher than that of a linear regression model.