In the tech sector, growth is often valued more than stability, and stocks fall out of favor once sales and earnings growth start to fade. But as Benjamin Graham famously said: "'In the short run, the market is a voting machine, but in the long run, it is a weighing machine." In other words, stocks that are overvalued will inevitably fall, while stocks that are undervalued could rise back to fair values if their underlying businesses are sound.

To gauge whether or not a stock is "cheap," I usually check two key metrics first -- the trailing price-to-earnings ratio, and the five-year PEG ratio. The P/E ratio should be below the industry average, while the PEG ratio (calculated by dividing the P/E ratio by the expected earnings annual growth rate), should remain under one. Let's take a look at two tech stocks that fit this profile, why they became cheap, and whether they can recover.

Skyworks Solutions
Skyworks Solutions (NASDAQ:SWKS) makes RF chips for Apple's (NASDAQ:AAPL) iPhone, Samsung's Galaxy devices, and various other smartphones. The stock has fallen 35% during the past 12 months due to two big challenges.

Image source: Skyworks Solutions.

First, Oppenheimer & Co. estimates that up to 40% of its sales come from Apple, which posted its first year-over-year decline in iPhone sales last quarter. Second, Qualcomm (NASDAQ:QCOM) formed a new RF joint venture with TDK last year, which will develop competing RF chips for mobile devices, sensors, and wireless charging tech for smartphones, drones, and other devices. If Qualcomm bundles these chips with its SoCs to gain content share in phones, it could throttle demand for Skyworks' modules.

Skyworks' sales growth has slowed along with the global smartphone market. Sales rose just 2% annually last quarter compared to 15% growth in the previous quarter, and 58% growth a year earlier. To make matters worse, Gartner expects global smartphone sales to only rise 7% this year compared to 14% growth in 2015. On the bright side, Skyworks' non-GAAP net income rose 8% annually, thanks to an expansion in gross margin.

Skyworks currently trades at 12.5 times trailing earnings, which is lower than the industry average of 28. Analysts expect Skyworks' expansion into new markets -- like smart homes, cars, and wearables -- to diversify its business away from smartphones, and drive future sales and earnings growth. Analysts currently expect Skyworks to post 20% annual earnings growth during the next five years, which gives it a five-year PEG ratio of just 0.6.

Juniper Networks
Juniper Networks (NYSE:JNPR) is often considered a distant underdog in the networking-equipment market, which Cisco (NASDAQ:CSCO) dominates. IDC recently reported that Cisco controlled 59% of the global Ethernet switching market at the end of 2015, while Juniper controlled just 4%.

Juniper's sales rose 2% annually last quarter, which represents a slowdown from 20% growth in the previous quarter. Router sales stayed nearly flat, and switch sales improved slightly, but security revenue (10% of product sales) fell 21% due to weak enterprise demand, and possible competition from other security providers.

Image source: Pixabay.

Total enterprise revenue also fell 11%, partially offsetting its 9% growth in service-provider revenue. Despite those challenges, Juniper's non-GAAP net income improved 8%, thanks to expanding gross margin. To compete more effectively against Cisco -- which offers bigger bundles of hardware and software to service providers -- Juniper recently acquired hardware- and software-defined networking tools provider BTI Systems.

Shares of Juniper have fallen 17% during the past 12 months due to concerns about enterprise spending, delayed upgrades from telcos, and macro issues worldwide. Competition in the networking-equipment market is also heating up, with low-cost Chinese rivals like Huawei and ZTE hurting Juniper's and Cisco's growth in several overseas markets.

However, that decline has lowered Juniper's P/E to 14, which is slightly lower than the industry average of 15. Analysts expect Juniper's growth to rebound once enterprise spending improves, with 13% annual earnings growth during the next five years, which gives it an "undervalued" five-year PEG ratio of 0.9.

But are they value stocks or falling knives?
Skyworks and Juniper are both fundamentally cheap, but simply buying both stocks based on their low P/E and PEG ratios would be reckless. For Skyworks stock to rebound, the company must gradually diversify away from Apple and smartphones, while widening its moat against bigger rivals like Qualcomm. Juniper might need to buy more companies to compete against Cisco's bundles, or lower its prices to protect its market share from Huawei.

Simply put, Skyworks' and Juniper's valuations indicate that further downside could be limited, but investors should dig deeper to see if they can overcome their biggest challenges to become solid turnaround plays.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.