More Videos:

Rates from

  • Mortgage
  • Credit Cards
  • Auto

Stocks Gain as S&P Books Record High

Tickers in this article: ALXN JPM UPS ^DJI ^GSPC ^IXIC

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 .