We consider a strictly stationary sequence of random vectors whose finite-dimensional distributions are jointly regularly varying with some positive index. This class of processes includes, among others, ARMA processes with regularly varying noise, GARCH processes with normally or Student-distributed noise and stochastic volatility models with regularly varying multiplicative noise. We define an analog of the autocorrelation function, the extremogram, which depends only on the extreme values in the sequence. We also propose a natural estimator for the extremogram and study its asymptotic properties under α-mixing. We show asymptotic normality, calculate the extremogram for various examples and consider spectral analysis related to the extremogram.