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 (http://www.marketwatch.com/story/stock-markets-trump-rally-is-mostly-a-bank-rally-2016-11-17) 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 (http://www.marketwatch.com/story/which-us-markets-are-closed-for-martin-luther-king-jr-day-2017-01-12).

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 (http://www.marketwatch.com/story/jp-morgan-reports-better-than-expected-earnings-2017-01-13), 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 (http://www.marketwatch.com/story/wells-fargo-profit-falls-revenue-misses-estimate-2017-01-13) 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. (http://www.marketwatch.com/story/financial-etf-nears-highest-level-since-2008-after-bullish-bank-results-2017-01-13)

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."

(http://www.marketwatch.com/story/what-to-expect-from-wells-fargo-earnings-impact-of-sales-tactics-scandal-2017-01-12)See also:Bank ETFs still favored as investors see growth and Trump bump ahead (http://www.marketwatch.com/story/bank-etfs-still-favored-as-investors-see-growth-and-trump-bump-ahead-2017-01-11)

In the latest economic data, U.S. retail sales rose 0.6% in December (http://www.marketwatch.com/story/retail-sales-climb-06-in-december-2017-01-13), less than hadbeen expected, while holiday sales (http://www.marketwatch.com/story/holiday-retail-sales-rise-4-to-beat-nrf-expectations-2017-01-13) were up a better-than-expected 4%. Separately, producer prices were up 0.3% (http://www.marketwatch.com/story/producer-prices-jump-along-with-energy-costs-2017-01-13) while business inventories rose 0.7% (http://www.marketwatch.com/story/business-inventories-surge-in-november-2017-01-13).

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 (http://www.marketwatch.com/story/chinas-exports-fall-2-in-2016-extending-decline-2017-01-13) 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 (http://www.marketwatch.com/story/fiat-chryslers-stock-plunges-epa-issues-notice-of-violation-2017-01-12).

Other markets:Oil futures (http://www.marketwatch.com/story/oil-higher-after-saudi-arabia-cuts-output-china-imports-rise-2017-01-13), gold futures and a key dollar index (http://www.marketwatch.com/story/dollar-recaptures-lost-ground-after-losses-linked-to-trump-conference-2017-01-13) were all trading lower. European stocks (http://www.marketwatch.com/story/fiat-rebound-sends-european-stocks-higher-into-the-weekend-2017-01-13) finished higher, and Asian markets closed mixed (http://www.marketwatch.com/story/asian-markets-largely-retreat-on-profit-taking-2017-01-12).

--VictorReklaitis contributed to this report.

(END) Dow Jones Newswires

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

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