New York stock market closes week lower