NEW YORK (AP) --- U.S. stocks finished mostly higher Friday, but they surrendered most of an early gain as worries about rising tariffs once again dampened investors' enthusiasm as the second quarter came to an end.
The Federal Reserve allowed most of the largest financial institutions in the U.S. to pay bigger dividends to shareholders and buy back tens of billions of dollars in stock. Wells Fargo made its biggest gain since shortly after the 2016 Presidential election. Nike had its biggest surge in almost four years after it said sales in North America improved in its latest quarter.
The Commerce Department said spending by consumers rose a disappointing 0.2 percent in May. But wages continued to improve, and Shawn Cruz, manager of trader strategy for TD Ameritrade, said that suggests spending will rise.
"Investors wanted to see what the potential is for consumer spending in the future," Cruz said. "Wage growth came in solid enough that there wasn't a major concern."
The S&P 500 index edged up 2.06 points, or 0.1 percent, to 2,718.37. The Dow Jones Industrial Average gained 55.36 points, or 0.2 percent, to 24,271.41. The Nasdaq composite rose 6.62 points, or 0.1 percent, to 7,510.30. The Russell 2000 index of smaller-company stocks lost 1.95 points, or 0.1 percent, to 1,643.07.
Just before midday the Dow rose as much as 293 points, but those gains eroded as investors again focused on the trade concerns that have rocked the market since late February. Canada announced $12.6 billion in retaliatory tariffs on U.S. goods in response to the U.S. tariffs on steel and aluminum imports. General Motors warned that if the Trump administration places import taxes on cars and car parts, it will likely face retaliation and might have to eliminate jobs in the U.S.
The Federal Reserve allowed 32 of the 35 largest banks in the U.S. to raise their quarterly dividends and buy back more stock. The central bank determined that those institutions are in good enough financial shape to weather a major downturn in the economy.
Wells Fargo gained 3.4 percent to $55.44. While the Fed's "stress tests" measure a bank's financial health and are separate from its business tactics, investors felt the Fed's approval was a notable win for Wells. Earlier this year the Fed ordered the bank to replace several of its directors and limited its growth in response to abusive practices including opening accounts in consumers' names without permission. Those actions duped consumers out of millions of dollars.
Wells Fargo admitted to those practices in 2016 and has since agreed to pay more than $1.5 billion in fines, penalties and legal settlements.
Nike said revenue in North America grew after several quarters of declines, and its fourth-quarter profit and sales blew past Wall Street forecasts. The athletic apparel company also said it will buy back $15 billion in stock over the next four years. It gained 11.1 percent to $79.68.
With trade tensions in focus throughout the second quarter, stocks didn't make big gains after a very strong round of first-quarter corporate reports. The S&P 500 rose 2.9 percent over those three months and the Dow added just 0.7 percent.
Investors felt technology companies and smaller, more U.S.-focused companies were safe picks in case the trade tensions get worse. The Nasdaq composite jumped 6.3 percent and the Russell 2000 index advanced 7.4 percent. Both set records as recently as last week.
Only a week remains before the U.S. and China each place tariffs on tens of billions of dollars in imports. Cruz, of TD Ameritrade, said the outcome of the broader trade tensions will help determine what stocks do in the months to come: he said stocks might set more records if the situation is resolved in a way the market likes, but if the tensions end up hurting global economic growth, stocks could fall further.
Energy companies and oil prices continued to climb. Benchmark U.S. crude gained 1 percent to $74.15 a barrel in New York and rose 14 percent during the second quarter, to its highest price since late 2014. The S&P 500 index of energy companies climbed almost 13 percent this quarter, far better than the rest of the market and its biggest gain in six and a half years.
Brent crude, used to price international oils, rose 1.9 percent to $79.44 a barrel in London.
Wholesale gasoline climbed 2.2 percent to $2.18 a gallon. Heating oil jumped 1.4 percent to $2.21 a gallon. Natural gas lost 0.5 percent to $2.92 per 1,000 cubic feet.
Bond prices wobbled and turned lower. The yield on the 10-year Treasury note rose to 2.86 percent from 2.84 percent.
Gold added 0.3 percent to $1,254.50 an ounce. Silver gained 1 percent to $16.20 an ounce. Copper fell 0.2 percent to $2.97 a pound.
The dollar rose to 110.85 yen from 110.64 yen. The euro rose to $1.1672 from $1.1555.
France's CAC 40 gained 1.1 percent and the German DAX added 0.9 percent after a deal on migration relieved pressure on the coalition government of Chancellor Angela Merkel. Britain's FTSE 100 added 0.3 percent.
Japan's benchmark Nikkei 225 edged 0.2 percent higher. South Korea's Kospi advanced 0.5 percent and Hong Kong's Hang Seng added 1.6 percent.