U.S. stocks ended mostly higher on Thursday, led by gains in banks even as Europe struggled again, a sign investors are betting a relatively strong U.S. economy will help U.S. stocks beat other markets.

Based on the latest available data, the Dow Jones industrial average <.DJI> was down 3.10 points, or 0.02 percent, at 12,415.32. The Standard & Poor's 500 Index <.SPX> was up 3.74 points, or 0.29 percent, at 1,281.04. The Nasdaq Composite Index <.IXIC> was up 21.50 points, or 0.81 percent, at 2,669.86.

(Reporting By Caroline Valetkevitch; Editing by Kenneth Barry)