Roughly one year ago, I wrote an article about Ubiquiti Networks (UI 0.58%), saying that despite its 125% surge over the past 12 months, I thought the company could exit 2017 even higher. That ultimately proved true, with the stock ending 2017 13% higher than on the day my article was published, but not without plenty of excitement (and heartburn) along the way. Like a death-defying roller coaster, Ubiquiti stock endured several wild swings around earnings reports, the company introduced new experimental products, and the stock was the victim of a short-seller attack. Here are the big events in Ubiquiti's wild year.

A man puts his hands  on his head while staring at volatile stock charts

Ubiquiti Networks had a wild ride in 2017. Image source: Getty Images.

An immediate plunge

The (virtual) ink on my recommendation was barely dry when Ubiquiti's stock plunged roughly 25% after its February earnings release. So much for timing -- but hey, that's why we're long-term investors! The plunge was due to concerns over margin compression -- and therefore, competition -- with gross margins falling to 44.6% from 48.4% in the previous-year quarter. That big gap worried investors, even though revenue handily beat expectations. Ubiquiti's February report covered the quarter that ended Dec. 31, 2016.

There were several factors that played into the gross margin. One was aggressive pricing on the company's second-generation AirMAX AC equipment, the adoption of which CEO and founder Robert Pera believed was strategically important for the company. This is likely due to the upcoming release of AirFiber LTU, which is supposed to be a big leap forward in wireless broadband technology. 

In addition, Ubiquiti had a manufacturing hiccup with its new AmpliFi home router product, which it had to rush in order to have in time for the holiday season (which made shipping more expensive), and the company invested in new distribution centers to speed up deliveries in the future -- all of which came at a cost.

Out-there consumer products 

Despite several new releases in both its core AirMAX (wireless broadband) and UniFi (wireless LAN networking) segments, Ubiquiti showed it wasn't done experimenting in its new consumer division, Ubiquiti Labs. The summer saw the introduction of FrontRow, a wearable "life-logging" camera that hangs around your neck like a piece of high-tech bling. Yet despite the sleek design and impressive tech, with its own operating system and seamless integration with major social media apps, the product hasn't taken off.

One nifty innovation that may be more relevant to the consumer division is AmpliFi Teleport, unveiled in November. If you have an AmpliFi router in your home, Teleport allows you to connect with your home network over an encrypted connection from anywhere in the world.

The CEO sold stock, yet increased his stake

One element Fools will like about Ubiquiti is its huge insider ownership, as Pera currently owns over 56 million of roughly 78 million basic shares outstanding.

Another crazy thing that happened in 2017 was that Pera's ownership stake actually increased, even though he sold 1 million shares at $61.25 each. That wasn't necessarily a knock on the stock; Pera potentially will have to buy out his partners in the NBA's Memphis Grizzlies, which he co-owns, in the near future, so he might be selling to raise money for that. Still, it was Pera's first substantial sale since 2013.

Yet despite the sale, Pera's percentage ownership of Ubiquiti increased due to the company's well-timed share repurchases at much lower prices throughout 2017. In October 2016, Pera owned 57.3 million shares, which amounted to 69.5% of shares outstanding, according to the company's proxy statement. One year later, Pera owned 56.3 million shares, but now that amounts to 72.3%.

That shows how near-term volatility can be advantageous to shrewd capital allocators -- assuming all is well with the business, of course ... and that came into question in September.

A short-attack

To cap off a momentous year, Citron Research announced a short position on Ubiquiti on Sept. 18, laying out several "red flags" that led it to believe Ubiquiti is a "fraud." The stock plummeted, down to the $50 level, and short interest skyrocketed. Pera responded to the Citron report at the time with a tweet saying, in part, "I just put my head down and let the products and numbers speak for themselves."   

In the fall, I said I didn't think there was much substance to the short-case, due to the company's strong cash generation, increased buyback, and the fact that its bank, Wells Fargo, increased the company's credit line with terms unchanged. In addition, I noted high short-interest could be setting up a big short-squeeze if the fraud case petered out. Investors seemed to shake off the Citron allegations and the stock rallied more than 25% in the fourth quarter to finish the year at $71 per share, up about 23% for the year, slightly ahead of the S&P's gain. 

Looking ahead

Despite the craziness, investors should try to ignore the noise and focus on the long game for this competitively advantaged company. The main drivers of the stock in 2018 will still be adoption of second-generation AirMAX AC and its new LTU radios, as well as the potential for Unifi adoption in higher-end enterprises. You know -- the same drivers as last year!