Spatial filters for steady-state visual evoked potential (SSVEP) detection rely on the purely periodic assumption of the signal components. In this study, we propose discriminative periodic component analysis (\mathbfD\pi \mathbfCA) that takes advantage of the almost periodic nature of SSVEP without depending on ideal rigid templates. \mathbfD\pi \mathbfCA tries to maximize the signal to noise ratio (SNR) of SSVEP components by utilizing the time structure of the stimulus frequencies embedded in the electroencephalogram (EEG) data. The performance of the proposed method was compared with standard canonical correlation analysis (CCA) using data collected from ten subjects. The results suggest that the \mathbfD\pi \mathbfCA provides better detection accuracy compared to standard CCA across various window lengths and subjects. Furthermore, the statistical tests show that the \mathbfD\pi \mathbfCA provides consistent and significant performance improvement than CCA even at short window lengths. © 2018 IEEE.