The impact of stocks on economic development is significant, with most companies employing quantitative finance methods to analyze and trade stocks. In the present day, there is a growing plethora of stock prediction methods, requiring individuals to carefully select the appropriate means of prediction. This study aims to present the highly regarded machine learning algorithms of recent years. Machine learning enables the extraction of trading strategies by learning patterns from historical stock data. Deep learning, a subset of machine learning, eliminates the need for researchers to manually extract features, instead utilizing neural network models that have proven effective for stock analysis. This paper also provides an extensive analysis of Support Vector Machine (SVM) and Long Short-Term Memory (LSTM), elucidating their algorithmic principles and assessing their strengths and weaknesses based on the findings of other researchers. It is observed that SVM is effective for predicting small quantities, but lacks suitability for non-stationary data prediction due to the non-informative nature of financial time series data, which significantly diminishes the accuracy of SVM predictions. In contrast, LSTM emerges as the most comprehensive single algorithm, exhibiting high accuracy and efficiency across all aspects. The paper also explores advanced hybrid models, which demonstrate that combining the advantages of multiple models can lead to higher accuracy and efficiency. The future of stock prediction algorithms holds promise for development, with the potential to construct an intelligent system that automatically selects data for analysis.