The major averages posted back-to-back losses on Thursday, placing the S&P 500 on track for a fourth consecutive losing week.