Technical analysis, also known as "charting", has been a part of financial practice for many decades, yet little academic research has been devoted to a systematic evaluation of this discipline. One of the main obstacles is the highly subjective nature of technical analysis---the presence of geometric shapes in historical price charts is often in the eyes of the beholder. In this paper, we propose a systematic and automatic approach to technical pattern recognition using nonparametric kernel regression, and apply this method to a large number of US stocks from 1962 to 1996 to evaluate the effectiveness of technical analysis. By comparing the unconditional empirical distribution of daily stock returns to the conditional distribution---conditioned on specific technical indicators such as head-and-shoulders or double-bottoms---we find that over the 31-year sample period, several technical indicators do provide incremental information and may have some practical value.