The major domestic equity indexes closed out a day of heavy trading on Wednesday with the S&P 500 chalking up its largest percentage decline since late June as investors turned risk-averse on disappointing earnings and escalating global tariff worries.

Tencent Holdings reported its first profit decline in almost 13 years, putting pressure on our domestic tech sector. As a result, technology stocks were the largest drag on the S&P 500 and the Nasdaq, with the S&P 500 technology index down 1.1 percent.

Retail shares fell as Macy’s fell 15.9 percent after margin fears spooked investors, overshadowing its stronger-than-expected sales and earnings.

Second-quarter earnings have mostly been stronger than expected, with 79.1 percent exceeding Street expectations, according to Thomson Reuters I/B/E/S. Results are in for 460 of the 500 companies making up the S&P 500 index.

The trade fracas heated up as Turkish President Tayyip Erdogan doubled tariffs on some U.S. imports, and China lodged a complaint with the World Trade Organization against American trade policies.

The tariff-sensitive industrial sector fell 0.5 percent, with Caterpillar and Boeing weighing on the Dow Jones Industrial Average.

The S&P 500 energy index fell 3.5 percent as a decline in the price of crude oil was exacerbated by an unexpected increase in our domestic stockpiles. The energy index suffered its largest percentage loss since Feb. 5.

Metals prices fell, dragging down the materials sector, which ended down 1.6 percent. The S&P 1500 metals and mining index was down 4.8 percent.

Losses were somewhat offset by gains in defensive sectors, including real estate and utilities.

Tesla fell 2.6 percent as the Securities and Exchange Commission sent the company subpoenas regarding Chief Executive Elon Musk’s plan to go private.

Among gainers, Canada-based Canopy Growth rose 30.4 percent following Corona beer maker, Constellation Brands, announcement that it was upping its stake in the cannabis producer.

Chipotle closed out the trading day up 6.6 percent after Morgan Stanley upgraded the burrito chain to “overweight” from “equal weight.”

The Day’s Economic Data

Retail sales rose more than expected in July as households boosted purchases of motor vehicles and clothing, suggesting the economy remained strong early in the third quarter.

Other data on Wednesday indicated worker productivity growing at its fastest pace in more than three years in the second quarter, but a decline in labor costs pointed to moderate wage inflation. Strong domestic demand supports expectations the Federal Reserve will raise interest rates in September for the third time this year.

The Commerce Department reported on Wednesday that retail sales increased 0.5 percent last month. But data for June was revised lower to show sales gaining 0.2 percent instead of the previously reported 0.5 percent rise. Retail sales in July increased 6.4 percent from a year ago.

Excluding automobiles, retail sales of gasoline, building materials and food services, advanced 0.5 percent last month after a downwardly revised 0.1 percent dip in June. These so-called core retail sales correspond most closely with the consumer spending component of gross domestic product.

Core retail sales were previously reported to have been unchanged in June. Consumer spending is being supported by a tightening labor market, which is steadily pushing up wages. Tax cuts and higher savings are also underpinning consumption.

July’s increase in core retail sales suggested the economy started the third quarter on solid footing after logging its best performance in nearly four years in the second quarter.

Gross domestic product rose at an annualized 4.1 percent rate in the April-June period, almost double the 2.2 percent pace in the first quarter. While the economy is unlikely to repeat the second quarter’s robust performance, growth in the July-September period is expected to exceed 3.0 percent.

Last month, auto sales rose 0.2 percent after edging up 0.1 percent in June. Sales at clothing stores rebounded 1.3 percent after declining 1.6 percent in June. Receipts at service stations increased 0.8 percent.

Online and mail-order retail sales increased 0.8 percent, likely boosted by Amazon’s “Prime Day” promotion. That followed a 0.7 percent rise in June. Sales at restaurants and bars were up 1.3 percent.

However, receipts at furniture stores fell 0.5 percent and sales at building material stores were unchanged last month. Spending at hobby, musical instrument and book stores declined further in July, falling 1.7 percent.

In a separate report on Wednesday, the Labor Department said nonfarm productivity, which measures hourly output per worker, rose at a 2.9 percent annualized rate in the April-June quarter. That was the strongest rate since the first quarter of 2015.

Data for the first quarter was revised lower to show productivity increasing at a 0.3 percent pace instead of the previously reported 0.4 percent rate. Compared to the second quarter of 2017, productivity increased at a rate of 1.3 percent.

The government also revised data going back to 1947, which did not materially change the picture of lackluster productivity growth, though unit labor costs were stronger than previously estimated in 2017 because of upward revisions to hourly compensation.

The annual rate of productivity growth from 2007 to 2017 was revised up 0.1 percentage point to a rate of 1.3 percent.

Unit labor costs, the price of labor per single unit of output, fell at a 0.9 percent pace in the second quarter. That was the weakest pace since the third quarter of 2014. First-quarter growth in unit labor costs was revised up to a 3.4 percent rate from the previously reported 2.9 percent pace.

Labor costs increased at a 1.9 percent rate compared to the second quarter of 2017, pointing to moderate wage inflation.