The major domestic equity indexes closed out the first trading day of the new quarter in positive territory after a choppy session. The Street suffered steep losses at the start of the session, but reversed course later with gains in Apple and other technology stocks offsetting worries about an escalating trade war between Washington and its trading partners.

Microsoft, Facebook, and Apple each rose one percent or more, pushing the S&P 500 information technology index up 0.99 percent, bringing gains for the year-to-date to 11 percent as investors bet on strong earnings from Silicon Valley in the approaching quarterly reporting season.

The Street was also taking note of the July 6 deadline for U.S. tariffs on $34 billion worth of Chinese goods to kick in, which pose the danger of a strong response from Beijing.

The European Union has warned the United States that imposing import tariffs on cars and car parts would likely lead to counter-measures on $294 billion of U.S. exports, while Canada has vowed to take punitive measures in response to U.S. steel and aluminum tariffs.

Only three of the 11 main S&P 500 sectors ended lower on Monday, with energy index down 1.55 percent on the back of a 2 percent drop in Brent crude.

On Tuesday, the domestic stock exchanges will close at 1 p.m. ahead of the Fourth of July holiday, when the exchanges will also be closed. With some investors already taking time off on Monday, volume was 6.2 billion shares, compared with the 7.3 billion share average over the past 20 trading days.

Also helping the market was Commerce Department data that showed construction spending increased 0.4 percent in May, more than estimated, amid gains in investment in private and public construction projects.

The Institute for Supply Management said national factory activity rose last month, likely as steel and aluminum tariffs disrupted supply chains, resulting in factories taking longer to deliver goods.

Tesla fell 2.3 percent after the electric car maker said it hit its target of producing 5,000 Model 3 sedans per week. There was skepticism regarding the financial impact of ramping up production and the quality of the cars being built. In addition, just before the market close, Tesla said its chief engineer was leaving the company.

Shares of casino companies fell as gambling revenue in the Chinese territory of Macau rose less than expected in June.

Wynn Resorts fell 7.89 percent, while Las Vegas Sands was down 6.67 percent after Bank of America downgraded the stock. MGM Resorts fell 3 percent.

Dell Technologies took a step closer to becoming a public company again with a deal to buy the tracking stock of its majority-owned VMware unit. The VMware tracking stock rose 9 percent, while VMware gained 10.24 percent.

Manufacturing Expands

According to the Institute for Supply Management in a report released on Monday, manufacturing expanded exceeded expectations last month as a gauge of supplier-delivery times was higher amid robust orders and increased production.

ISM factory index for June rose to 60.2, matching the second-highest reading since 2004, from 58.7.  A reading above 50 indicates expansion.

The index of supplier deliveries came in at 68.2, the second-highest reading since April 1979, from 62; figure shows lead times increasing as producers have trouble meeting demand. At the same time, new orders was little changed at 63.5. The Index of production increased to 62.3 from 61.5.

While indexes of orders, production and factory employment remained elevated, the ISM’s main gauge of June factory activity was inflated by a surge in the group’s measure of supplier deliveries, indicating lengthening lead times.

The delays potentially reflect purchasing managers’ efforts to acquire materials ahead of planned tariffs on Chinese products, which would follow levies on steel and aluminum from around the world. Such demand, coming on top of steady consumption and business investment, is testing capacity limits of both manufacturers and the transportation sector.

“Lead-time extensions, steel and aluminum disruptions, supplier labor issues and transportation difficulties continue,” Timothy Fiore, chairman of the ISM Business Survey Committee, said in a statement.

“Demand remains robust, but the nation’s employment resources and supply chains continue to struggle. Respondents are overwhelmingly concerned about how tariff related activity is and will continue to affect their business.”

Supply-chain disruptions are also helping to push up input prices. The ISM’s latest measure of costs of raw and other materials used in manufacturing fell in June but remained close to a seven-year high.

Manufacturers’ comments suggest that anxieties related to tariffs continue to build, but aggregate conditions look solid. New orders, production and even export orders are all showing little evidence of trade-related downdrafts.