Historically, the stock market has performed poorly when gasoline prices top $4 per gallon.