Source: Wikimedia Commons

It's been a rough couple of months for biotech stocks. The bleak situation could be changing, though.

Moody's Investors Services, for example, recently upgraded its outlook for the global pharmaceutical industry from stable to positive. The firm thinks that promising pipelines along with merger and acquisition activity should translate to good news for biotechs and pharmaceutical companies. 

And although many biotech stocks have taken a beating lately, there are some signs that biotech is bouncing back. How can investors play this biotech bounce? Here's one smart way.

100 plus eggs in one basket
The SPDR S&P Biotech ETF (XBI -1.12%) has a lot going for it. This fund currently holds 104 biotech stocks. The biggest position in any one stock accounts for only slightly over 2% of the ETF's total assets. While the old maxim warns against putting all your eggs in one basket, the SPDR S&P Biotech ETF presents a great way to buy one basket with plenty of biotech "eggs" while reducing the risks if a few of those eggs crack along the way.

Investors who were savvy enough to buy the ETF five years ago and held on would now be sitting atop gains of well over 300%. Even if you only bought at the beginning of 2015, you'd still be up 16% year-to-date -- well above the broader indices.

XBI Chart

Granted, the last two months have pared those gains somewhat. In my view, though, this pullback makes the biotech ETF more attractive than it's been in quite a while. And with a gross expense ratio of only 0.35%, owning the SPDR S&P Biotech ETF won't take a big bite out of potential profits. 

Some good eggs
The most exciting thing about this ETF is the great growth potential for many of the biotech stocks that it holds. According to analysts' projections, the average upside potential over the next year for the top 10 holdings in the SPDR S&P Biotech ETF is nearly 19%. 

Wall Street has especially high hopes for Dynavax Technologies Corporation (NASDAQ: DVAX). The average analyst's one-year price target for Dynavax is more than 60% above the stock's current price. This cheery outlook stems largely from great expectations for hepatitis B vaccine HEPLISAV-B.

There was plenty of buzz about HEPLISAV-B a couple of years ago. However, the FDA rejected the vaccine over safety concerns. This time around, though, Dynavax looks to have a smoother ride. The biotech worked with the FDA to develop clinical studies to address the safety concerns. So far, the independent board monitoring HEPLISAV-B's safety data has given a thumbs-up to continuing the phase 3 study three times in a row.

Analysts aren't quite as excited about another top 10 holding in the SPDR S&P Biotech ETF -- Exelixis (NASDAQ: EXEL). The consensus one-year price target for Exelixis is barely above the stock's current price. However, Exelixis represents both reasons that Moody's is bullish on biotech and pharmaceutical stocks -- pipeline and acquisition potential.

On the pipeline front, Exelixis hopes to win approval for a new indication for Cometriq in treating advanced kidney cancer. The biotech also anticipates regulatory decisions later this year in the U.S. and Europe for cobimetinib combined with Roche's Zelboraf. The opportunities for these two drugs also keep Exelixis on some observers' short lists of possible buyout targets for larger drugmakers. 

Source: Celgene

While many of the holdings in the biotech ETF are relatively small, there are some big players with plenty of growth potential also. Celgene (NASDAQ: CELG) stands out. The biotech boasts a market cap just below $100 billion. Despite its size, Wall Street thinks Celgene's stock could rise more than 20% over the next 12 months.

Blood cancer drug Revlimid continues to generate billions in revenue for Celgene, and experience double-digit year-over-year sales growth. Cancer drug Abraxane and multiple myeloma drug Pomalyst are also big winners for the company. In addition to these great drugs, Celgene has been making some smart acquisitions -- most recently with the buyout of Receptos.  

Risk and reward
Buying the SPDR S&P Biotech ETF carries plenty of risk. Biotech stocks could continue to be weighed down by the broader market. Smaller companies like Dynavax or Exelixis could get bad news from clinical trials or from regulatory agencies. Even larger biotechs like Celgene might not perform as well as expected.

On balance, though, I think this biotech ETF gives investors significant opportunities for riding favorable industry trends towards rewarding gains while reducing some of the risks associated with investing in the biotech industry. Over the long run, the deck is stacked in biotech's favor in my view. Biotech will bounce back sooner or later -- and the SPDR S&P Biotech ETF provides an excellent vehicle to ride the bounce.