The stock market closed mixed Thursday after earlier gains vanished throughout the afternoon. The Nasdaq fell nearly 0.4% while the S&P 500 and Dow Jones industrial average added 0.1%. The main indexes’ negative price reversals were the latest instance of the volatility that has plagued stocks the past couple of weeks. Losers topped winners by about 2-to-1 on the NYSE, and the two sides were about even on the Nasdaq.