The biotech sector has brought its share of big gains to investors' portfolios, from coronavirus success stories such as Moderna to long-established names like Biogen. Moderna, the maker of a top-selling coronavirus vaccine, has climbed more than 600% over the past two and a half years. Biogen has advanced 11,000% since its trading debut.

It's clear biotech companies make a great addition to a diversified portfolio. So, which players should you buy these days? Look for companies with a solid pipeline and strong revenue prospects ahead. And if they're already generating revenue, that's a huge plus. Let's check out two stocks to buy right now.

1. AbbVie

The bad news for AbbVie (ABBV 1.03%) is that its major blockbuster drug, the rheumatoid arthritis treatment Humira, will face competition in the U.S. as of next year. The good news is that the rest of AbbVie's immunology portfolio may eventually compensate for the loss.

Sales of immunology drugs Skyrizi and Rinvoq are booming -- and the company has gained approvals across several indications. In the second quarter, Skyrizi revenue surged more than 85% to $1.25 billion. And Rinvoq revenue rose 56% to $592 million.

The U.S. Food and Drug Administration (FDA) recently approved Skyrizi for moderately to severely active Crohn's disease -- its third indication. And the FDA approved Rinvoq for ankylosing spondylitis -- its fifth indication in chronic immune diseases.

AbbVie also has a strong aesthetics portfolio, with wrinkle treatment Botox and filler Juvederm. Juvederm sales suffered in the most recent quarter due to coronavirus lockdowns in China and a halt of the company's business in Russia. But the company expects a rebound thanks to two new filler launches in the U.S. and an eventual loosening of coronavirus restrictions in China.

AbbVie is trading for less in relation to 12-month trailing earnings than it was just a couple of years ago. It's trading for 19 times earnings compared to more than 40 early last year.

2. Vertex Pharmaceuticals

Vertex Pharmaceuticals (VRTX 2.61%) is the leader in the world of cystic fibrosis (CF) treatments. The company sells four drugs -- and the newest of those, Trikafta, is a blockbuster. Last year, Trikafta generated more than $5.6 billion in revenue for Vertex. And it helped the company reach about $2.3 billion in profit.

Here's some even better news. Vertex is likely to keep this lead for quite a while. The biggest threat to Trikafta is actually a candidate under development at Vertex. The company is studying that CF candidate in a phase 3 trial. It's administered once daily, versus Trikafta's twice-a-day regimen. This could be a practical option for patients.

So, buying Vertex for its CF portfolio is a good idea. But there's another reason to buy this stock. That's for another potential blockbuster -- outside of the CF business -- on the horizon. It's a one-time curative treatment for beta thalassemia and sickle cell disease. Vertex plans on submitting this candidate for blood disorders for regulatory approval in the U.K. and Europe by the end of this year. A submission to the U.S. should happen in the near future too.

And let's not forget the rest of the pipeline. Vertex is working on promising candidates for type 1 diabetes, pain management, and more. Today Vertex is trading for about 23 times 12-month trailing earnings. The company was trading at more than 48 in 2020 -- when visibility on non-CF pipeline programs wasn't as clear as it is now.

So, both AbbVie and Vertex are less expensive than they were in the past. At the same time, they're generating billions of dollars in revenue. And we can clearly identify the treatments or potential treatments that will drive revenue over the coming years. All of this means right now is a great time to get in on these biotech stories -- and benefit from your investments over time.