Despite a terrible year for the stock market, some companies have escaped the sell-off. Biotech giant Gilead Sciences (GILD -0.56%) is a member of this elite club, having seen its shares rise by 15% year to date. Further, the drugmaker is riding momentum that could help it deliver another solid performance in 2023.

Let's consider two reasons why Gilead Sciences is worth serious consideration heading into the new year. 

GILD Chart

GILD data by YCharts

1. Improving HIV-related business 

Gilead Sciences' most important unit by some margin remains its HIV business. Here is some evidence. In the first nine months of the year, the company generated total revenue of $19.9 billion, representing a year-over-year decrease of almost 1%. The biotech's HIV sales of $12.4 billion -- which rose by 5% year over year -- accounted for 62.4% of its top line.

Gilead Sciences' HIV segment encountered headwinds due to the pandemic. Screening and prescription volume dropped, leading to lower sales than the company would have recorded otherwise. However, things are slowly but surely getting back to normal. As management recently reported: 

We are encouraged that on a year-over-year basis, the HIV treatment market across the U.S. and Europe has grown for five consecutive quarters (...) The market growth we are seeing suggests that activity has returned to pre-COVID trends.

The company expects the HIV treatment space to continue expanding at 2% to 3% per year. Few drugmakers are better positioned than Gilead Sciences to profit from that, be it in 2023 or beyond. The biotech boasts the leading HIV treatment in the U.S., Biktarvy, which enjoyed a 45% share of the market in the third quarter.

Descovy is another important product in Gilead Sciences' HIV arsenal. What's more, the company is on the verge of another critical regulatory decision in the U.S. Gilead Sciences is awaiting the potential approval of lenacapavir -- a potential long-lasting regimen for some HIV patients. Lenacapavir failed to earn the nod from regulators earlier this year as a result of manufacturing issues. But Gilead is confident it has worked out these issues, and it expects word from the U.S. Food and Drug Administration (FDA) on whether this therapy will be approved in the country by Dec. 27.

There is one more key reason why Gilead Sciences' HIV-related operations will look much stronger next year and lift its entire business. In 2020, the company lost patent exclusivity for two HIV treatments: Truvada and Atripla. Thankfully, the effect of these patent cliffs on the company's financial results continues to fade. In the first nine months of the year, Truvada contributed $102 million in sales, compared to $310 million reported in the comparable period of the previous fiscal year. Gilead Sciences' "other" HIV revenue, which includes sales of Atripla, came in at $45 million, representing a 70.6% year-over-year decline.

Truvada and Atripla's impact fading into insignificance, the FDA approval of lenacapavir, and the HIV market growing more should all help the biotech's most important segment perform even better next year. 

2. Ongoing diversification 

Gilead Sciences may be too reliant on its HIV business. But the company is looking to develop innovative therapies in other areas. Within oncology, the biotech has 11 ongoing late-stage trials and many more in phase 1 or 2 studies. Even a modest 50% success on the company's phase 3 trials will yield key brand-new approvals or label expansions. 

Gilead Sciences' inflammatory diseases pipeline is less mature, with most of its ongoing programs in this area in phase 1 studies. But we're seeing the biotech make a conscientious effort to diversify its lineup away from its HIV business. Gilead Sciences' revenue from Veklury, a COVID-19 medicine, helped the company stay afloat for the past three years.

The solid pipeline progress it will almost certainly record next year provides more evidence that it can thrive even if sales of Veklury drop substantially. That's excellent news for the company's future. 

Buy and forget 

The market is forward-looking, and although Gilead Sciences' hasn't delivered blowout financial results this year, the company's stock has outperformed partly due to the company's solid prospects. Still, the biotech remains reasonably valued, with a forward price-to-earnings ratio of 12, compared to the S&P 500 index's 19.4 and the biotech industry's 15.2. That's not to mention the drugmaker's solid dividend profile. Just one more reason why at these levels, Gilead Sciences is a buy heading into 2023.