S&P/TSX composite ends down for third straight week on events coming out of China