It was lucky No. 7 for the S&P 500 — barely.