After doubling in price several times in 2017, shares of optical networking supplier Applied Optoelectronics (AAOI 3.94%) reversed course and nearly erased all of those gains through spring 2018. The stock has been showing signs of life as of late, though, notching a nearly 50% gain in May. Investors may be tempted to chase those kinds of returns, but it's important to know a few facts first.

Some background color

AOI's stock began to fall in late summer 2017 when the realization set in that its recent exponential growth in revenue and earnings wasn't sustainable. AOI's fiber optic products have been put to use in data centers as consumer demand for faster streaming and other cloud services has led companies like Amazon.com to build out new facilities. It was Amazon that was largely responsible for the stocks fast gains.

AAOI Revenue (TTM) Chart

Data by YCharts.

However, being a supplier to a larger company is a cyclical endeavor, and sales ebb and flow. New data center buildout has been on the decline as of late, causing the recent revenue and earnings contraction. In the first quarter of 2018, that trend persisted with results coming in lower than AOI management had forecast. Sales and earnings decreased 32% and 89%, respectively, from a year prior.

And that's what makes the recent stock price action so interesting. With data center construction in a lull at the moment, it looks purely speculative, but there is more at work here than bears are considering.

To buy or not to buy...

Even when factoring for the big year-over-year drop in profits, AOI shares are cheap. The company's trailing-12-month price-to-earnings ratio is at 12.8 even after the big rebound in May. Forward P/E is at 16.4, indicating some further downward pressure on the bottom line is in store. But with such a cheap valuation, some investors may have piled in and thus driven prices higher. Plus, most of the recent pain could now be in the past.

A couple of large orders from the company's biggest customers are due to be filled the second half of this year, and spending on fiber-optic networks is picking up speed once again. AOI has experienced pressure from competitors trying to undercut pricing, which has kept a lid on profit margins. However, the longer-term benefit is that AOI maintains a premium on current sales over its peers with its leading products, and continues to innovate so that it keeps that lead. With data streaming and cloud computing only gaining in importance, that creates a long-term tailwind for this supplier.

An artist's rendition of cloud computing. An animated cloud is surrounded by computers getting hooked up with cables to it.

Image source: Getty Images.

Second-quarter 2018 sales are expected to be $75 million to $81 million, another steep slide from the $117 million in the same period a year ago. However, the expected figures seem to add some weight to management's guidance for sales to recover during the second half of the year. If the forecast proves accurate, AOI's revenues will increase sequentially over the 2018 opener by 15% to 25%. That could be another reason for the May rally.

Nevertheless, it's important to bear in mind that suppliers are cyclical businesses, and Applied Optoelectronics is no exception. With only a handful of big customers, this stock will likely continue to be very volatile. There could be legs under the recent rebound, but it could be short-lived if AOI can't deliver on its expectations later in the year. Keep those investments small if you buy in.