US stocks gave up large gains and finished barely higher on Friday.
Banks and technology companies traded higher, while stocks that pay large dividends fell thanks to a jump in bond yields.
Stocks were on track for large gains early in the day as reports showed consumers in both the US and China appeared to be spending more.
Banks rose after JPMorgan Chase and Citigroup disclosed solid quarterly results.
But the gains faded as the day wore on. Drug company stocks continued to fall and energy companies slipped.
"The retail sales numbers on the surface looked pretty good but when you dig into them they were not that great," said Mike Baele, managing director at US Bank's Private Client Reserve. "It seems like every good report we get, we get an offsetting weaker report."
The Dow Jones industrial average, which had jumped as much as 162 points in the morning, finished up 39.44 points, or 0.2 % , at 18,138.38. The Standard & Poor's 500 inched up 0.43 points to 2,132.98. The Nasdaq composite gained 0.83 points to 5,214.16.
Goldman Sachs was responsible for most of the Dow's gains. It rose 3.10 dollars, or 1.9 % , to 170.52 dollars after the High Court in London threw out a one billion dollar lawsuit against the company. Libya's sovereign wealth fund had accused Goldman Sachs of duping the fund into making risky deals.
Bond prices fell. The yield on the 10-year Treasury note rose to 1.80 % from 1.75 % . Higher bond yields also help banks because they lead to higher interest rates on loans, and that allows banks to make bigger profits from lending.
JPMorgan Chase and Citigroup reported results were better than investors expected. The reports may have raised investor hopes for companies that will report their results next week, like Morgan Stanley, Charles Schwab, and BlackRock.
"It was a good kickoff to earnings season" for banks, said Baele. "It was actually some decent revenue as well with both investment banking and trading."
Rising bond yields attracted investors' attention, and they sold utilities, real estate investment trusts, and other stocks that pay large dividends as a result. Those payments are more appealing to investors seeking income when bond yields are low. PG&E Corp. fell 57 cents to 59.80 dollars and Duke Energy slid 73 cents to 77.21 dollars.
The Commerce Department said retail sales bounced back in September as spending on restaurants, cars and gas improved. The agency also said business stockpiles and sales grew in August, which is a sign that economic growth could get stronger.
Reports suggested consumers in China are starting to spend more, which helped technology companies recover some of Thursday's losses. Microsoft climbed 50 cents to 57.42 dollars while Intel rose 48 cents, or 1.3 % , to 37.45 dollars and Apple picked up 68 cents to 117.66 dollars.
Computer and printer maker HP said it will cut between 3,000 and 4,000 jobs over the next three years as demand for those products continues to fall. HP stock lost 67 cents, or 4.4 % , to 14.48 dollars.
Twitter fell 91 cents, or 5.1 % , to 16.88 dollars after Salesforce.com told the Financial Times it is not interested in buying the company. Twitter has lost 32 % of its value since October 5 on reports that potential buyers were not going to make offers. Salesforce investors were not enthusiastic about the potential offer, and its stock jumped 3.64 dollars, or 5.2 % , to 74.27 dollars.
Health care stocks, which are by far the worst-performing industry on the S&P 500 this year, continued to slip. EpiPen maker Mylan lost 1.39 dollars, or 3.7 % , and closed at a three-year low of 36.49 dollars. Cancer drug maker Celgene sank 2.13 dollars, or 2.1 % , to 98.50 dollars.