Wells Fargo shares traded 3.1% lower Friday, giving up earlier gains, as a weak profit outlook overshadowed stronger-than-expected quarterly earnings.

CFO John Shrewsberry told analysts in a call that the bank expects net interest income to fall by 2% to 5% in 2019. The bank previously expected growth to range from negative 2% to positive 2%.

"Several factors have driven a shift in our view, including a lower absolute rate outlook, a flatter curve, tightening loan spreads resulting from a competitive market with ample liquidity, and continued upward pressure on deposit pricing," he said in the call.

Earlier Friday, Wells Fargo shares had risen as much as 2.3% after the company reported strong earnings on the back of strong consumer transactions and a pick-up in auto loans.

Here's how the company's results compared with expectations in a Refinitiv survey of Wall Street analysts:

Earnings: $1.20 per share vs $1.09 per share expected

Revenue: $21.609 billion vs $21.012 billion forecast

Wells Fargo said credit card transactions totaled $18.3 billion in the quarter, up 5% from a year earlier, while debit card purchases increased by 6% to $86.6 billion. Auto loans surged 24% to $5.4 billion.

The bank also said it returned $6 billion to shareholders in the quarter through dividend payments and buybacks. It increased its quarterly dividend to 45 cents per share, up from 43 cents in the fourth quarter of 2018.