You are tasked with building a predictive model that analyzes historical daily stock prices over the past ten years to forecast future market trends. Which model architecture is designed to capture the temporal dependencies inherent in this time-series dataset?
Select an answer to reveal the explanation.
Short Explanation
Here's the deal: stock prices aren't independent events, so you need a model that remembers yesterday, last week, and last month. An RNN or LSTM tracks that sequence over time, while K-Means just groups data and 2D CNNs chase image patterns. Stick with RNNs or LSTMs when your data flows over time.
Full Explanation
Time-series data, such as historical stock prices, is characterized by temporal dependencies, meaning that sequential order and historical patterns are critical for making predictions. To model such data effectively, an architecture must have the capacity to maintain memory of past inputs and process data sequences of variable lengths. Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks are specifically engineered for sequence modeling. Unlike feedforward architectures, RNNs pass hidden state information from one time step to the next, creating a temporal chain that captures dependencies over time. LSTMs improve on basic RNNs by introducing cell states and gates (forget, input, and output gates) that prevent the vanishing gradient problem, allowing the network to learn both short-term fluctuations and long-term historical trends. Let's look at why the other options are less effective: the standard Feedforward Neural Network that processes each day's price independently without historical context processes inputs in a single forward pass without temporal context or memory, treating sequential inputs as independent. The unsupervised K-Means clustering model to group stock prices into distinct, independent clusters is an unsupervised algorithm designed for partitioning data into clusters based on static feature similarity, not for forecasting values in a time series. The two-dimensional Convolutional Neural Network (CNN) optimized for spatial feature extraction in static images is designed for spatial feature extraction in grid-like data such as images, making it unsuitable for processing one-dimensional temporal sequences of stock prices. Therefore, an RNN or LSTM network is the correct architecture for time-series forecasting.