When it comes to investing, knowing when to buy, sell, or hold a stock can mean the difference between making money and losing it in the market. However, making the best decisions for your investments can be challenging. Fortunately, investors can minimize risk by weighing both the pros and cons of a given stock before deciding how to act. Today, we'll dig up dirt on Riverbed Technology (Nasdaq: RVBD) and evaluate whether investors should buy, sell, or hold this wide-area networks specialist.

Buy
Riverbed Technology services a wide variety of industries by providing customers with hardware and software offerings that improve the performance of wide-area networks. Last year, WAN optimization accounted for about 90% of the company's income. Today, Riverbed is focusing on smart acquisitions and new product offerings in an effort to add new revenue streams.

Most notably, Riverbed teamed up with Akamai (Nasdaq: AKAM) to create Steelhead Cloud Accelerator, which enhances the performance of software-as-a-service applications in the cloud. Smart partnerships like this along with ongoing product innovation will fuel future growth at Riverbed. Meanwhile, the rise of cloud computing continues to strengthen Riverbed's position in the industry.

Around this time last year it bought Zeus Technology, a company that laid the groundwork for software-based application delivery controllers, or ADCs. The acquisition should start to pay off this year as it enables Riverbed to better compete with F5 Networks (Nasdaq: FFIV) in the ADC market.  

Sell
Riverbed is not without its challenges. Weakness in IT spending remains an industrywide concern as businesses delay purchases as a result of the troubling economic climate. Also, Riverbed hit some speed bumps in the first half of 2012 that slowed growth at the company. That's particularly concerning considering larger competitors including Cisco Systems (Nasdaq: CSCO) and Juniper Networks (NYSE: JNPR) picked up some of the slack during that time. 

Cisco doesn't directly compete with Riverbed in the niche market of WAN optimization. However, Cisco has extra resources available to it, which means the networking giant can be more competitive in regard to pricing and functionality in other areas. For now, a more immediate concern for Riverbed is increased competition from F5 Networks.

In fact, fellow Fool analyst Evan Niu went as far as to sell his shares of Riverbed in favor of F5 Systems. By reinvesting the cash in F5 he hopes to capitalize on the company's promising growth rate. This is a better play for more conservative investors who would rather not deal with the volatility inherent in Riverbed shares.

Let's see how Riverbed stacks up to industry rivals in terms of total returns over the last year.

RVBD Total Return Price Chart

RVBD Total Return Price data by YCharts

Unfortunately, these historical returns don't paint a rosy picture for Riverbed. And with a price-to-earnings ratio of 44, the stock looks expensive compared to some of its peers, including F5 with a P/E of 29 and Juniper Networks at 26. Potential investors may want to consider these cheaper stocks over Riverbed. However, current Riverbed shareholders shouldn't jump ship just yet.

Hold
The company is set to report its second-quarter earnings next month, and if the report card is anything like the previous quarter, investors may continue running for the hills. In April, shares slid 29% after Riverbed reported first-quarter earnings that disappointed. Management blamed new product offerings in the company's Steelhead division for a 47% plunge in net income during the quarter.

The new product introductions also caused the wireless networking equipment maker to lower its guidance for 2012 sales growth. Shares hit a 52-week low earlier this month and are down more than 35% so far this year.

Nevertheless, I think this was the right play for Riverbed. As an investor, I'll take a short-term loss any day if it means longer-term success and a greater return on my money down the road. That's why shareholders would be wise to sit tight as Riverbed works through the remaining growing pains related to this ongoing product transition. If you already own Riverbed here, I'd hold the stock.

Final answer?
Riverbed may be the underdog, but I think these are temporary setbacks that the company faces. Investors who don't mind a wild ride have an opportunity to buy shares of Riverbed near 52-week lows. Looking ahead, a broader product lineup will help the company grab revenue outside of WAN optimization. This positive catalyst paired with the stock's recent pullback in price is why I'm giving shares of Riverbed a three-year outperform rating on my profile in Motley Fool CAPS.

Nevertheless, this is a risky investment. That's why I encourage more conservative investors to read the Motley Fool's free report, titled: "The Only Stock You Need to Profit From the NEW Technology Revolution." Unlike Riverbed, the company that's highlighted in this report has already proven itself to investors. Click here for instant access to this free report, while it's still available.