- The tech-heavy index closed 0.4 percent higher as Amazon and Netflix rose 1.1 percent and 1.9 percent, respectively. Mylan also contributed to the gains, rising 3.8 percent.
- But the rest of the market struggled for gains as trade tensions between the U.S. and key partners put a lid on bullish sentiment.
The Nasdaq Composite index rose to all-time high on Tuesday, led by Netflix and Amazon, while the rest of the market struggled for gains amid U.S. trade tensions.
The tech-heavy index closed 0.4 percent higher at 7,637.86 as Amazon and Netflix rose 1.1 percent and 1.9 percent, respectively. Mylan also contributed to the gains, rising 3.8 percent.
The slight gains for the Nasdaq came after the index posted a record close the day before. Tuesday marked a new intraday high, surpassing levels last reached in March.
"I think it makes sense that we're seeing a rally in tech right now," said Sylvia Jablonski, managing director of capital markets at Direxion on CNBC's "Closing Bell." "We're seeing "positive news around Apple announcing new software, new apps. Amazon's sales are growing, [and] Microsoft has the GitHub takeover."
"There could be a lot of momentum in that area," Jablonski said.
But the rest of the market lagged the Nasdaq on Tuesday. The Dow Jones industrial average fell 13.71 points at 24,799.98, with Merck as the worst-performing stock in the index. The rose just 0.1 percent to 2,748.79. The two indexes struggled for gains as Wall Street fretted over tensions between the United States and some of its key trading partners.
"This thing keeps dragging and dragging and dragging," said Peter Boockvar, chief investment officer at Bleakley Financial Group. "No one wins with tariffs like this. Steel prices have gone up a lot and there's more users of steel that producers of steel."
Last week, the Trump administration slapped tariffs on steel and aluminum imports from the European Union and Canada. The EU threatened the same, saying it would impose countermeasures of its own, while Canada Foreign Minister Chrystia Freeland said the country plans to slap dollar-for-dollar tariffs on the U.S. Mexico, meanwhile, unveiled tariffs of its own Tuesday, targeting products like pork, cheese and steel.
"There are direct and indirect consequences to the tariff tiff," said Katie Nixon, chief investment officer at Northern Trust Wealth Management. "First, the direct impact will be on import prices and will be borne by companies and industries that rely on imported steel and aluminum. The increased prices will either be passed onto consumers, or will impact margins."
"From an indirect perspective, the process around trade negotiations has been fraught with stutter steps and reversals, and has contributed to a general sense of uncertainty over the direction of the global economy," said Nixon. "It is unequivocal that broad based tariffs or a trade war will put a constraint on global growth while lifting the structural governor on inflation."
Leaders from seven of the largest economies in the world are meeting in Canada this week, with trade discussions expected to be at the forefront.
Elsewhere, White House economic adviser Larry Kudlow said President Donald Trump is considering having separate talks with Canada and Mexico as NAFTA negotiations continue.
"His preference now, and he asked me to convey this, is to actually negotiate with Mexico and Canada separately," Kudlow said. "He may be moving quickly towards these bilateral discussions instead of as a whole."
However, a Canadian government official said they will continue negotiating NAFTA as a trilateral agreement.
Investors also looked at developments between U.S.-China trade negotiations. The Wall Street Journal reported earlier on Tuesday — citing sources — that China would agree to buy nearly $70 billion worth of U.S. agriculture and energy products if the U.S. holds off on implementing tariffs against Chinese goods.
In economic data news, the ISM non-manufacturing index reached 58.6 in May, above an expected print of 57.6. A reading above 50 indicates expansion in the service sector while a reading below 50 signals contraction.