It's been a terrible, horrible, no good, awful past seven months on Wall Street. Most companies are feeling the effects of macroeconomic headwinds such as inflation and supply chain issues, and few are managing to perform well on the market.

Thankfully, there are some companies in the black for the year. Two companies in this group are AbbVie (ABBV 0.92%) and Jazz Pharmaceuticals (JAZZ 1.90%). Both of these healthcare stocks also present attractive prospects. Let's consider why they are worth buying today. 

ABBV Chart

ABBV data by YCharts

1. AbbVie

AbbVie is a stable, blue-chip company that can deliver consistent revenue, profits, and growing dividends. Let's unpack that a little more. First, like its peers in the pharmaceutical industry, AbbVie sells products that consumers can hardly do without. The last thing the average patient wants to do is economize on life-saving medicines. That's why AbbVie can record decent revenue and profits even amid challenging economic conditions.

In the second quarter, AbbVie's revenue increased by 4.5% year-over-year (YOY) to $14.6 billion. The company's adjusted earnings per share (EPS) jumped by 11.2% YoY to $3.37. AbbVie's portfolio includes many products that are growing at a good clip. Immunology drugs Skyrizi and Rinvoq are among the most promising. Skyrizi's second-quarter revenue increased by 85.9% YOY to $1.3 billion.

Rinvoq's revenue came in at $592 million, 56.3% higher than the prior-year quarter. Rinvoq and Skyrizi are well on their way to replacing AbbVie's crown jewel, immunosuppressant Humira, which may start facing generic competition in the U.S. sometime next year.

In the meantime, Humira posted sales of $5.4 billion in the quarter -- 5.8% higher than the year-ago period -- despite the continued pressure of generic competition in Europe. Cancer drug Venclexta, Botox Cosmetics, and Botox Therapeutics are some of AbbVie's other franchises that are performing decently. And, of course, AbbVie boasts dozens of programs in development that should help it maintain a solid lineup and deal with patent cliffs as needed.

What about the dividend? AbbVie spun off from its former parent company, Abbott Laboratories, in 2013. Factoring in the time it spent under the name of Abbott, AbbVie is a Dividend King, having raised its payouts for 50 consecutive years. AbbVie currently offers an above-average yield of 3.96% and a modest cash payout ratio of 43.5%.

In short, AbbVie can offer both growth and income. That partly explains why it has outperformed the market this year, and it's also why it is worth stashing in your portfolio for years. 

2. Jazz Pharmaceuticals 

Jazz Pharmaceuticals has successfully expanded and diversified its lineup of drugs in the past couple of years, which has helped it improve its prospects. The company's portfolio now features cannabidiol-based rare epilepsy treatment Epidiolex, which it inherited through an acquisition. Jazz has also scored critical regulatory wins relatively recently.

These include daytime sleepiness associated with idiopathic hypersomnia and narcolepsy treatment Xywav, which first earned the green light in mid-2020. That may not seem that recent, but Xywav could continue to grow its sales for a while without the danger of generic competition. Jazz's revenue jumped by 24% YOY in the second quarter to $932.9 million. Adjusted EPS increased by 10.3% YOY to $4.30.

Xyrem, a treatment for daytime sleepiness in narcolepsy patients and Jazz's longtime best-selling drug, still generates more sales than any other. But other products are making headway.

Xyrem's revenue for the second quarter came in at $269.4 million, 19% lower than the year-ago period. But that was because patients are taking Xywav instead. Sales of Xywav soared by 89% YOY during the quarter, clocking in at $235 million. Epidiolex added $175.3 million in revenue, representing a YOY increase of 60%. Cancer drugs Zepzelca and Rylaze, also part of Jazz's new product portfolio, contributed meaningfully as well.

Jazz Pharmaceuticals can continue growing its revenue and earnings thanks to its expanded lineup of drugs. The company boasts more than a dozen pipeline programs, and will likely add indications to some of its existing products and earn approvals for brand new ones. The biotech is in a solid position to continue improving its financial results and delivering solid returns to its shareholders.