U.S. stocks closed higher on Friday, with several indexes posting all-time records, led by large gains in the tech sector. This was despite a mixed batch of second-quarter earnings from three major banks weighing on equities. The Dow Jones Industrial Average DJIA, -0.87% was up 0.4%, a record high. The Nasdaq Composite Index COMP, -1.07% was up 0.6%, its second highest reading ever. The S&P 500 SPX, -1.11% was up 0.5%, notching a fresh all-time high since June 19. Technology stocks posted large gains, with Apple AAPL, -3.17% up 0.9% and Nvidia Corp NVDA, -2.20% up 2.7%. On the other hand, banks were the big losers, with J.P. Morgan JPM, -0.21% slipping 0.8% after reporting a sharp fall in trading revenue. J.P. Morgan Chase & Co. JPM, -0.21% , Citigroup Inc. C, -1.47% , and Wells Fargo & Co. WFC, +0.08% all posted results on Friday, with the three nonetheless topping expectations. For the week, the Dow was up 1% while the S&P was up 1.4% and the Nasdaq was up 2.6%. Weak retail sales and inflation numbers also raised the prospect of dovish policy from the Fed, which is bullish for stocks.