Stock patterns are those that occur frequently in stock time series, containing valuable forecasting information. In this paper, an approach to extract patterns and features from stock price time series is introduced. Thereafter, we employ two ANN-based methods to conduct clustering analyses upon the extracted samples, which are the self-organizing map (SOM) and the competitive learning. Besides, and we introduce an improved version of the rival penalized competitive learning (RPCL), and furthermore conduct a comparative study between the clustering performances of the improved RPCL and the SOM. Experimental results show that a better clustering performance can be achieved by the former.