U.S. stocks ended higher on Friday as investors anticipated positive news out of next week's key earnings reports, while bullish broker comments gave a boost to tech shares.

The Dow Jones industrial average <.DJI> was up 78.07 points, or 0.80 percent, to end unofficially at 9,864.94. The Standard & Poor's 500 Index <.SPX> was up 6.01 points, or 0.56 percent, to finish unofficially at 1,071.49. The Nasdaq Composite Index <.IXIC> was up 15.35 points, or 0.72 percent, to close unofficially at 2,139.28.

The advance helped U.S. stocks achieve their best weekly gain since mid-July. For the week, the Dow rose 4 percent, while the S&P 500 gained 4.5 percent and the Nasdaq climbed 4.5 percent.

(Reporting by Edward Krudy; Editing by Jan Paschal)