Which machine learning algorithm is commonly used for time series forecasting and predicting stock prices?

Linear Regression
Support Vector Machine (SVM)
Recurrent Neural Network (RNN)
Random Forest

The correct answer is C. Recurrent Neural Network (RNN).

RNNs are a type of artificial neural network that are well-suited for tasks that involve sequential data, such as time series forecasting and predicting stock prices. They work by having a feedback loop that allows them to remember information from previous time steps. This makes them able to learn long-term dependencies in the data, which is important for tasks like predicting stock prices.

Linear regression is a statistical method that is used to find the line of best fit for a set of data points. It is a simple and easy-to-understand method, but it is not very good at handling complex data sets.

Support vector machines (SVMs) are a type of machine learning algorithm that is used for classification and regression tasks. They are known for their ability to generalize well to unseen data. However, they can be difficult to train and can be computationally expensive.

Random forests are a type of machine learning algorithm that is used for classification and regression tasks. They are made up of a number of decision trees, and they are known for their ability to handle noisy data. However, they can be slow to train and can be sensitive to the choice of hyperparameters.

In conclusion, RNNs are the best choice for time series forecasting and predicting stock prices because they are able to learn long-term dependencies in the data.