U.S. stock-market indexes closed mostly higher on Thursday, as the European Central Bank announced that it plans to end its bond-buying program at the end of the year but pledged to keep rates at present levels until at least next summer. Stronger-than-expected economic data also lent support to stocks. The Nasdaq Composite Index closed at a record thanks to a rally in technology shares. The index gained 65.34 points, or 0.9%, to 7,761.04. The S&P 500 rose 6.86 points, or 0.3%, to 2,782.49. The Dow Jones Industrial Average lost 25.89 points, or 0.1%, to 25,175.31. Among the biggest gainers on the S&P 500, Twitter Inc. soared 6.1%.