Twilio (NYSE:TWLO) has been a tough stock to own over the past few months. After going public at $15 per share last June, the stock surged to nearly $70 in late September before overheated valuations and a secondary offering sent the stock tumbling back to the low $30s.

All that drama might have convinced Twilio bulls -- who once believed that demand for its cloud platform would keep rising -- to finally give up. But before you sell this volatile stock, make sure you aren't doing it for these three reasons.

A businessman holding a floating cloud computing logo in his hands.

Image source: Getty Images.

1. Its lofty valuation

Analysts expect Twilio's revenue to rise 33% this year, but the stock isn't cheap -- its price-to-sales ratio of 10 is more than double the industry average of 4.5 for software companies. However, that ratio isn't terribly high relative to other cloud-based players with comparable sales growth.

Cloud-based CRM provider Veeva Systems (NYSE:VEEV), which analysts expect to post 19% sales growth this year, trades at 12 times sales. Cloud-based finance and HR services provider Workday (NYSE:WDAY), which trades at 11 times sales, is expected to grow its sales by 29% this year. Twilio's P/S ratio has also cooled down considerably since it peaked in the 20s last October. Therefore, Twilio's high valuation raises eyebrows, but it isn't necessarily a red flag.

2. Its lack of profitability

Twilio has never posted a GAAP profit, and hasn't offered a timeline for achieving profitability. But Twilio isn't the only cloud-based SaaS (software as a service) company with a bottom line stuck in the red.

That's because competing in the SaaS market requires high marketing expenses to secure new clients, low subscription fees to keep them locked in, and high R&D costs to add new services. Even SaaS giant Salesforce (NYSE:CRM) doesn't consistently post quarterly GAAP profits despite generating $8.4 billion in revenues last year.

The good news is that Twilio is adding more services -- like voice, video, security, and analytics tools -- to its ecosystem to generate additional revenues per customer. That's why its "dollar-based net expansion" rate, which measures its revenue growth per customer, rose 155% annually last quarter. That growth indicates that Twilio can eventually spend less on marketing and R&D as its customers rely on more of its services -- which could eventually pave the way toward profitability.

3. Its dependence on major customers

Twilio's two largest customers in 2016 were Facebook's (NASDAQ:FB) WhatsApp and Uber. WhatsApp accounted for 9% of its sales, and Uber accounted for "more than 10%". The bears will suggest that losing either customer would be disastrous -- but that's unlikely to happen anytime soon.

WhatsApp is a "Variable Customer Account" which never entered a 12-month minimum revenue commitment contract with Twilio -- so it doesn't pay minimum payments every month, and can end its service at any time. However, Twilio's dependence on WhatsApp has declined sharply -- the app accounted for 17% of its revenues back in 2015. Facebook also added Twilio services to Messenger last year, which tightens the relationship between the two companies.

Uber is a "Base Customer Account" which has signed a minimum revenue commitment contract with Twilio, and the company notes that Uber's usage has "significantly exceeded" those minimum payments. Last quarter, Twilio notes that its "base revenue", which excludes revenue from Variable accounts, rose 73% annually and accounted for 92% of its top line. This means that the company can bounce back on Base accounts growth even if it loses big Variable accounts like WhatsApp.

Why you should go against the grain

The market is extremely bearish on Twilio right now -- 39% of its float was being shorted as of Feb. 27. But when everyone is looking in one direction, it sometimes pays to be looking the other way.

Twilio's top line growth forecasts are still strong, its customer base and ecosystem are expanding, and its valuations are reasonable relative to those of peers with similar growth rates. Once institutional investors, who own just 52% of Twilio's shares, notice those strengths, there could be a big short squeeze -- which will reward investors who didn't sell the stock in the low $30s.

Leo Sun owns shares of Twilio. The Motley Fool owns shares of and recommends Facebook, Veeva Systems, and Workday. The Motley Fool recommends Salesforce.com and Twilio. The Motley Fool has a disclosure policy.