When the bull market has its last hoorah, most likely technology and internet stocks will be at the top of the hill, leading the charge.

But before that, analysts have diverging views on how much and which names investors should hold in a group of stocks that are dogged by regulatory issues, trade war conflicts and earnings pressures.

The S&P information technology sector was unchanged Tuesday, coming right after a heady five-day run, where it gained 9%. That was a bounce after the sector's 10.6% loss from May 3 to early June. The losses in that period outpaced the S&P 500's 6.8% decline but tech has regained 8.5% since June 3. In the same period, the S&P has bounced back by 5.1%, and at 2,885, is edging closer to its all-time high of 2,954.

"We're still pretty cautious. [Tech] had a rebound, but if you look beyond [those] five days, it's a pretty big underperformer," said Dan Suzuki, portfolio manager with Richard Bernstein Advisors. "A part of this is a reversal based on sentiment."

Tech has been hit by worries about the trade war with China, and semiconductors were suffering a supply/demand imbalance in the beginning of the year. Internet names, in particular, have been overshadowed by a wave of regulatory interest from everyone from Congress to the Justice Department, state attorneys general and even the G-20, which wants to create new rules for taxing the digital companies globally.

"You tend to have all these risks, but at the same time, those are all factors we've been wringing our hands over for the last several weeks at least. It seems with all these things, the more we talk about them, the less significant they've become," said Paul Hickey, co-founder of Bespoke. "In order for the market to get to new highs, tech can't fall apart but it could be a market performer and even lag a little bit if other areas pick up the slack."

*Red line shows periods where the six-month forward return of tech underperformed the S&P 500, and the boxes indicate periods where tech underperformed and the market was in an uptrend.

Source: Bespoke

Hickey said tech is still commanding a rich premium. With a 23% gain for the year, it is the top performing of the major S&P sectors. Hickey said tech still has a high multiple, at 21.5 times trailing earnings, but the earnings multiple on the defensive utilities sector is 20 times trailing earnings, a sign of nervousness in the market.

Suzuki said he does see a scenario where tech could outperform for a period. If there's a typical end of the bull market, at that point, tech could take a leadership role. He also said the sector has the best balance sheets in the S&P, and in a downturn would encounter less pressure from debt concerns. In the 10-year-old bull market, tech has been the leader — gaining 572% since March 2009, compared with the 327% gain in the S&P 500.

"The most bullish argument for tech is if we get another bout of rising optimism for the markets, tech would be one of the big beneficiaries," he said.

Art Hogan, chief market strategist at National Securities, said he expects a China trade deal to be struck well before the end of multiple investigations against companies like Facebook and Alphabet, which could go on for years. A trade deal should help the performance of a whole range of companies, like Apple and semiconductor makers such as Qualcomm and Micron.

Hogan said the digital companies such as Facebook and Alphabet, which were among the hottest performers, will most likely give up leadership to other tech giants, like Cisco and Microsoft.



"There's never a quick fix to this," said Hogan. "That is a much longer overhang. I would expect that technology will still be leadership, but it's not going to be the names we're used to."

Strategists' views of the tech sector is also shaped by their expectations for the economy. Suzuki sees a slowing economy, negative for cyclicals like tech, but James Paulsen, chief investment strategist at Leuthold Group, expects an improving economy.

"I kind of think the global economy is going to pick up in the second half," he said. "I understand the obsession has been with China and trade, but I think the bigger elephant in the room that doesn't get much attention is there's been a ton of policy stimulus this year after tightening last year."

Paulsen said tech will lead and it's a good place to invest, but smaller-cap tech names in the S&P 600 may perform better than the big names that are under assault. "The FANG names have kind of lost their leadership," he said, referring to Facebook, Amazon, Netflix and Google parent Alphabet. "But [the] S&P 500 tech sector has certainly taken over." The tech sector includes software, chips and hardware names.