NEW YORK ( TheStreet) -- Major U.S. stock markets finished higher Friday after strong earnings and soft economic data produced a sideways trade for most of the session. The S&P 500 gained 0.31% to hit an all-time closing high at 1,680.19. The index gained 2.96% for the week. The Dow Jones Industrial Average added 0.02% to 15,464.30. The blue-chip index increased 1.07% for the five-day period. The Nasdaq closed up 0.61% to 3,600.08. The tech-heavy index tacked on 3.47% this week. "Everyone's kind of emotionally exhausted from the Federal Reserve," said Brad McMillan, chief investment officer of Commonwealth Financial. "That was the big news this week." McMillan said Friday was a mixed bag for the equity markets, with good earnings for financials, and softer-than-expected reports for the producer price index and consumer sentiment. J.P. Morgan Chase kick-started second-quarter bank earnings announcements with a second-quarter profit that rose 31% from a year earlier, beating expectations, boosted by stronger-than-expected trading revenues and a continuing decline in credit costs. At the same time, the bank cautioned that "if primary mortgage rates remain at or above current levels, refinance volumes and margins will be under pressure and Mortgage Production profitability will be challenged." JPMorgan shares fell 0.31% to $54.97. Wells Fargo beat second-quarter earnings expectations as the nation's fourth largest bank by assets was able to grow its earnings for a fourteenth consecutive quarter. Wells Fargo saw strong performance from its less prominent businesses such as investment banking and mortgage servicing. Net charge-offs on loans continued to fall, dropping to their lowest level since the second quarter of 2006. Still, the bank's mortgage earnings confirmed widespread sentiment that consumer and housing market activity remain well below levels they should be in a normal economy. Wells Fargo shares added 1.77% to $42.63. The July reading on the University of Michigan consumer sentiment index came in at a lower-than-expected 83.9, down from 84.1 in June, marking the second straight monthly decline and reflecting a spiking of energy prices. On average, economists were expecting a print of 85 for July. Before the market open, the Bureau of Labor Statistics reported Friday that the producer price index rose by a more-than-expected 0.8% in June after increasing by 0.5% in May. Economists were anticipating a rise of 0.5% according to a survey of economists by Thomson Reuters. The core part of this inflation gauge, which excludes the food and energy components, ticked up 0.2%, also more than expected, up from a 0.1% increase the prior month. A 0.1% uptick was predicted. Still, the gains weren't doing much to challenge the market and the Federal Reserve's expectations of stable longer-term inflation conditions. The benchmark 10-year Treasury was slipping 3/32, boosting the yield to 2.589%.The dollar was rising 0.25% to $82.96 according to the U.S. dollar index. UPS ( UPS ) was the biggest decliner in the S&P, dropping more than 5.5% to $86.12 after the largest overnight package company said second-quarter earnings will not meet expectations and also reduced its full-year guidance.Boeing ( BA) was the second largest percentage decliner on the S&P 500 after reports emerged that a fire on one of the company's Dreamliner airplanes shut down London Heathrow Airport. Shares of Boeing lost 4.7% to $101.87. Alexion Pharmaceuticals ( ALXN), was the biggest gaining stock in the index after Bloomberg reported that Roche Holding AG was seeking billions of dollars in financing to potentially acquire the pharmaceutical company. Roche is the world's largest producer of cancer drugs. Shares of Alexion surged 12.6% to $114.26. Follow @atwtseWritten by Andrea Tse and Joe Deaux in New York >To contact the writer of this article, click here: Andrea Tse.>.