By Sue Chang, MarketWatch , Ryan Vlastelica

J.P. Morgan, Wells Fargo, Bank of America all gain after results

U.S. stocks rose moderately on Friday after earnings from some of the country's biggest banks reassured investors that the financial sector's recent rally was justified. However, the Dow Jones Industrial Average struggled to gain a foothold in positive territory ahead of the long holiday weekend.

Markets have been in an uptrend since November's presidential election, with the bulk of the gains ( coming from the financial sector, as investors have bet banks would benefit from deregulation under President-elect Donald Trump's incoming administration and an environment that is expected to see rising interest rates.

The strength of the rally--the financial sector is up nearly 20% since the election--could have left stocks vulnerable if the results disappointed.

The Dow Jones Industrial Average slipped 8 points to 19,884. The S&P 500 added 4 points, or 0.2%, to 2,275 and the Nasdaq Composite Index climbed 32 points, or 0.6%, to 5,580.

For the week, the Dow is down 0.4% and the Nasdaq is up 1.1% while the S&P is flat. U.S. financial markets will be closed Monday for Martin Luther King Jr. Day (

Bruce Bittles, chief investment strategist at RW Baird & Co., said the market is still consolidating "Trump gains" from November and December.

It's "difficult to forecast if this is a topping phase or a sidewise movement correction in an ongoing bullish move," he said. "The best assumption is stocks are correcting an overbought [and] overbelieved period that would conclude when sentiment backs away from the excessive optimism seen in several investor surveys."

J.P. Morgan Chase & Co.(JPM) reported earnings and revenue that surged past expectations (, helped by its trading division, while earnings at Bank of America Corp.(BAC) rose 43%. On the downside, Wells Fargo & Co.(WFC) reported weaker-than-expected earnings ( and revenue in its first full quarter of results since its sales-tactics scandal erupted in September.

The Financial Select Sector SPDR ETF (XLF) rose 0.7%, coming off earlier highs. (

Wayne Kaufman, chief market analyst at Phoenix Financial Services, said the results proved that the sector's postelection rally had been warranted.

"J.P. Morgan had a terrific beat; BofA, a very nice one," said Kaufman. "You'd have to believe that the economy will be lackluster going forward to think that banks won't do well from here. Their valuations are still good because they have more earnings power than investors are giving them credit for."

( also:Bank ETFs still favored as investors see growth and Trump bump ahead (

In the latest economic data, U.S. retail sales rose 0.6% in December (, less than hadbeen expected, while holiday sales ( were up a better-than-expected 4%. Separately, producer prices were up 0.3% ( while business inventories rose 0.7% (

Check out:

In remarks late Thursday (said%20the%20U.S.%20economy%20faces%20no%20serious%20short-term%20obstacles), Fed chief Janet Yellen reiterated her support for existing regulations on banks and said the U.S. economy faces no serious short-term obstacles.

In overseas economic news, data showed that China's exports last month fell ( by 6.1%, more than expected.

Corporate movers: Car maker Fiat Chrysler Automobiles NV (FCA.MI) (FCA.MI) was in focus as its stock rebounded in European trading, but its U.S.-listed shares were down in premarket action. Fiat fell Thursday after the Environmental Protection Agency alleged the company had used software to cheat on diesel emissions testing (

Other markets:Oil futures (, gold futures and a key dollar index ( were all trading lower. European stocks ( finished higher, and Asian markets closed mixed (

--VictorReklaitis contributed to this report.

(END) Dow Jones Newswires

January 13, 2017 14:05 ET (19:05 GMT)

Copyright (c) 2017 Dow Jones & Company, Inc.