Stocks Close Lower; Nasdaq Posts Record-Setting Loss In First Half