The stock market closed lower, in line with weakness in global stocks, amid fears the coronavirus epidemic would hit Chinese demand.