Is the stock market overpriced? Consider that the historical price-to-earnings (P/E) ratio for the S&P 500 over the past 146 years is 15.6. The current earnings multiple is over 25.5 -- more than 63% higher than its historical average value. 

The problem with using valuation metrics that look in the rearview mirror, though, is that the future is more important than the past for stock market performance. However, even using forward earnings multiples, the S&P 500 is still valued more highly than it has been in the last 13 years. The bottom line is that the stock market, at least as represented by 500 of the largest companies in the world, is overpriced. Sooner or later, there will be a reversion to the mean.

But not every sector in the market is overpriced. One sector is priced very close to its historic average. And, believe it or not, two sectors are actually trading at discounts to their historical averages. Here are these three sectors -- along with promising stock picks for each one.

Man holding out hand with two lines going up but one line is broken

Image source: Getty Images.

Healthcare

Healthcare stocks as a group are up nearly 21% so far in 2017. Even though that's higher than the 19% year-to-date gain for the S&P 500 index, healthcare stock valuations are still in line with their historical levels. Over the last five years, for example, the healthcare sector has traded at 16.3 times expected earnings. Currently, healthcare stocks as a whole trade at 16.4 times expected earnings. 

It might seem strange that healthcare hasn't become as overpriced as the overall S&P 500. However, uncertainty over the fate of Obamacare and the prospects of potential federal changes to control drug pricing dampened the outlook for biotechs and pharmaceutical companies for a while. As concerns eased, healthcare stocks took off.

Two healthcare stocks stand out, in my view, as being valued at especially attractive levels. Celgene (CELG) shares currently trade at less than 12.4 times expected earnings. The biotech was enjoying a great year until October, when a pipeline setback and revised financial outlook caused investors to panic. Celgene, however, should still grow adjusted earnings per share by 19.5% annually over the next several years. The stock is dirt cheap at its current price.

Scientists looking at image of DNA

Image source: Getty Images.

AbbVie (ABBV -1.03%), on the other hand, has had a terrific year that only picked up steam over the last few months. The big pharma stock trades at less than 14.7 times expected earnings, despite paying a dividend yielding nearly 3% and with the likelihood of growing earnings by more than 15% annually over the next five years. With continued momentum for top-selling Humira and a strong pipeline, AbbVie definitely looks like a healthcare stock to buy.  

Technology

The technology sector's forward earnings multiple of 18.8 is a good bit lower than its historical average. And that's despite tech stocks racking up year-to-date gains of nearly 33%, easily trouncing the S&P 500. 

There is something of a catch with technology stocks looking like bargains right now, though. The historical average forward earnings multiple for tech stocks is skewed by the heady days in the late 1990s and early 2000s. Tech valuations prior to the bursting of the dot-com bubble were so high, that nearly anything now looks cheap by comparison.

Still, there are some intriguing value opportunities in the technology sector. Seagate Technology (STX), for example, trades at less than 10 times expected earnings. The stock took a big hit in July following disappointing fiscal fourth-quarter results.

However, Seagate rebounded somewhat with its fiscal 2018 first-quarter results announced in October. The company remains a major player in the hard disk drive (HDD) market and is building its presence in the solid state drive (SSD) market. I think Seagate stock will rise in the coming years, and its dividend yield of over 6% pays investors to wait while the company turns things around. 

Telecommunication services

Pretty much everything I mentioned above for the technology sector applies to telecommunication services stocks as well. Telecom stocks are cheap compared to historical levels, with an average forward earnings multiple of 12.7. As with tech stocks, the dot-com bubble inflated the historical forward earnings multiple average for the telecom sector.

But there is one key difference between the telecom and tech sectors: While technology stock valuations have risen quite a bit over the last five years, that hasn't been the case for telecom stocks. 

There are several telecom stocks that trade at discounts right now. One that investors should consider is AT&T (T 1.88%). It hasn't been a great year for the telecom giant, with its stock falling more than 10% in 2017 so far. However, AT&T now trades at less than 12.7 times expected earnings. And it pays out a dividend yielding north of 5.4%.

The company faces some obstacles in closing its planned acquisition of Time Warner. AT&T also has a really high debt load. However, the telecom provider is selling off some assets to lower its debt and will likely make more divestitures. Investments in high-speed 5G networks and growth in connecting cars, drones, and wearables to the internet should pay off for AT&T over the long run.  

Spreading the risk around

For investors who are nervous about buying only one or two stocks in these sectors, exchange-traded funds (ETFs) could be a good alternative. Several ETFs are available that allow you to buy a basket of stocks in the healthcare, technology, or telecommunication services sectors.

Keep in mind, though, that just because a given sector is undervalued relative to the broader market or its historical averages doesn't mean that it will achieve a better performance in the short run. It's quite possible that all three of these sectors perform worse than the overall S&P 500 in 2018. But in my view, buying stocks or ETFs in sectors that aren't overpriced should pay off over the long run.