U.S. stocks ended little changed on Friday, losing ground late after Federal Reserve Chair Janet Yellen's comments on the economy unnerved investors, Reuters reported. Financial shares finished up, giving the S&P 500 its biggest boost after stronger-than-expected bank results, but gave up most of their early gains. Healthcare shares led declines. Yellen, in a speech at a conference of policymakers and academics, laid out the deepening concern at the Fed that U.S. economic potential is slipping - and may need aggressive steps to rebuild it. Yellen did not address interest rates or immediate policy concerns directly. Traders have currently priced in a 67-percent chance of a rate hike in December. The S&P 500 financial index was up 0.5 percent. JPMorgan Chase and Citigroup trounced third-quarter estimates. Wells Fargo & Co barely beat expectations as a sales scandal engulfed the bank. S&P 500 earnings for the quarter are still expected to have declined 0.4 percent from a year ago, Thomson Reuters data showed. The Dow Jones industrial average closed up 39.44 points, or 0.22 percent, to 18,138.38, the S&P 500 gained 0.43 points, or 0.02 percent, to 2,132.98 and the Nasdaq Composite added 0.83 points, or 0.02 percent, to 5,214.16. For the week, the Dow was down 0.6 percent, the S&P 500 was down 1 percent and the Nasdaq fell 1.5 percent. Shares of Twitter fell 5.1 percent to $16.88 after Salesforce.com's chief executive ruled out bidding for Twitter. Salesforce.com shares jumped 5.2 percent to $74.27. HP Inc fell 4.4 percent to $14.48 after the company said it would cut about 3,000 to 4,000 jobs over the next three years. About 6.0 billion shares changed hands on U.S. exchanges, below the 6.6 billion daily average for the past 20 trading days, according to Thomson Reuters data. Advancing issues outnumbered declining ones on the NYSE by a 1.03-to-1 ratio; on Nasdaq, a 1.07-to-1 ratio favored decliners. The S&P 500 posted 3 new 52-week highs and 3 new lows; the Nasdaq Composite recorded 27 new highs and 80 new lows.