The health-care sector is leaving tech in the dust. Some see more gains ahead. 

While Wall Street was putting out flames in tech earnings, one sector has had a stealth rally to lead the S&P 500.

Health care stocks are not only the best S&P 500 performer in the past month, rallying nearly 7 percent, but they're also closing in on record highs set in January.

Matt Maley, equity strategist at Miller Tabak, says the group has more room to run.

"Overall they look quite good," Maley told CNBC's "Trading Nation" on Friday. "Look at the XLV, and it's been making a nice series of higher lows and higher highs. The same thing in the IBB biotech chart, it's been doing the same thing."

The XLV health care ETF has had a strong summer. Since the end of May, it has rallied 9 percent and is just a 2 percent rally from an all-time high set on Jan. 29.

"If these two ETFs can take it one step further and move above their January highs and the IBB is very close to doing that, it's going to give it even more momentum," added Maley.

The IBB biotech ETF is still 2 percent lower than its 52-week highs set last week. It is up 10 percent for the year.

"If you see areas like the FANGS and some of these others see a downdraft, that money I think it will continue to flow into some of these health-care names," Maley said, referring to Facebook, Amazon, Netflix and Google parent Alphabet.

Gina Sanchez, CEO of Chantico Global, sees a shift in the market that could be a tailwind for health-care stocks.

"What we're seeing right now is seeing a general rotation, not just from technology to health care, but really from growthy stocks to sort of more robust stocks," Sanchez told "Trading Nation."

Value stocks often see a boost when investors anticipate any economic weakness. Value stocks prioritize cheaper valuation relative to the rest of the stock market, while growth stocks overlook high premiums in favor of expected profit and sales acceleration.

"Our view is that we're kind of peaking out. The market is starting to get more defensive, it's happening very subtly, but you're seeing value start to become more attractive and you're seeing staples, health care, these kinds of sectors are becoming very, very attractive," said Sanchez.

The health-care sector is the third-best performer on the S&P 500 this year, behind information technology and consumer discretionary.

Vote to see results
Total Votes:

Not a Scientific Survey. Results may not total 100% due to rounding.


Trades to Watch

Trader Bios


Trading Nation is a multimedia financial news program that shows investors and traders how to use the news of the day to their advantage. This is where experts from across the financial world – including macro strategists, technical analysts, stock-pickers, and traders who specialize in options, currencies, and fixed income – come together to find the best ways to capitalize on recent developments in the market. Trading Nation: Where headlines become opportunities.

Michael Santoli

Michael Santoli joined CNBC in October 2015 as a Senior Markets Commentator, based at the network's Global Headquarters in Englewood Cliffs, N.J.  Santoli brings his extensive markets expertise to CNBC's Business Day programming, with a regular appearance on CNBC's Closing Bell (M-F, 3PM-5PM ET). In addition, he contributes to CNBC and CNBC PRO, writing regular articles and creating original digital videos.

Previously, Santoli was a Senior Columnist at Yahoo Finance, where he wrote analysis and commentary on the stock market, corporate news and the economy. He also appeared on Yahoo Finance video programs, where he offered insights on the most important business stories of the day, and was a regular contributor to CNBC and other networks.

Follow Michael Santoli on Twitter @michaelsantoli

Read more