While market losses were racking up, this group of stocks was breaking out to all-time highs and looks set for even more gains. The group is Big Pharma. It's been long viewed as stodgy by investors looking for quicker price gains. Recently, however, as other stocks slid, these companies have become more attractive because of stable business models and steady dividends. "Some of it is that they are defensive," said Louise Chen, a managing director at Cantor Fitzgerald who follows pharmaceutical and biotech companies. "The market isn't what it used to be. There's a lot of headwinds. These guys have good balance sheets. They have a good pipeline.They had been beaten down a little bit because of the 'patent cliff.'" The patent cliff is the anticipated expiration of major drug patents, which then allows competitors to make generic versions. She said that is more of an issue for Merck and Pfizer. The Big Pharma companies also have proven to be inflation proof for now, with strong margins. "I think they've got upside," said Chen. "I think they have good balance sheets. They're diversified and not one thing is going to bring them down." She said inflation could ultimately catch up with the sector, but it's proven resilient. "So far, they've survived the macro stuff. They survived Covid. They survived the Russian Ukraine war that's still going on. They survived higher interest rates," she said. Chen noted the industry's business models have been beneficial. "Their business models, people look at and say that's something durable," she said. "They're safer than biotech." On Monday, Merck set a new intraday high, and Bristol-Myers Squibb moved to a fresh all-time high last week. Both Eli Lilly and Johnson & Johnson hit new highs in April, and are now about 3% below those levels. But that compares with the broader S & P 500 , which has been down more than 20% from its highs, with many components showing much steeper losses. Merck and J & J were slightly higher Tuesday, with the S & P down about 1.5%. Lilly was unchanged and Bristol-Myers was down slightly in afternoon trading. Separately, Pfizer , up slightly, is nearly 14% off its high, set in December. In Pfizer's case, there have been some concerns about the longevity of its revenue from the Covid-19 vaccine, Chen said. "Of the ones I cover, Lilly has done the best," she said, citing two very innovative products as drivers of its gains. One is a product for the control of diabetes that also may be used for obesity , and the other is an Alzheimer's drug. Cantor has a 12-month target of $335 on Lilly. The firm's target on Merck is $107 and J & J is $215. All are rated overweight. Lilly has a dividend yield of 3.9%, while J & J's is 2.5% and Merck has a yield of 2.9%. Over the longer term, the group has also been held back by regulatory concerns and fears that drug prices would be controlled. Mark Newton, head of technical strategy at Fundstrat, said he's been watching the group's charts and expects there is further upside. "Technically, these are some of the best charts I've seen in a long time," Newton said. "It's rare you're seeing something making a 15- to 20-year long base. It's just starting to move higher." He said even though Pfizer made its move in December and pulled back, "that's good risk reward now." "Bristol-Myers is right on the verge. It based for the last month and a half," he said. While it set a new high, the stock is still close to the peak levels it reached in 2000 and 2016. Newton said over the past 10 years, this is the time of year that health care does the best, from June into July. November is also a good time. "This move is just getting underway, in relative terms and health care is nearing one of its best times of the year seasonally speaking, which is June and July. ... Now you're seeing the entire group showing evidence of strength," Newton said. "Not only is it a great tailwind for the market, along with the financials. I think pharma, in particular, could be nearing a time when many of these are beginning to work well. I love the group." The average return in XLV, the S & P Select Sector SPDR Healthcare ETF, over 10 years has been 3.23% in July and 1.62% in June, Newton said. So health-care stocks are turning higher at a normally bullish time. Newton said he also likes medical devices within health care, but he sees a lot of promise in pharmaceuticals. "This would be my number one group for the next five years," he said. "This is an intermediate, long-term bullish call. When you see breakouts like these, it's exciting."