Equity markets are said to be forward looking. However, sometimes they fail to look far enough into the future by reacting too harshly to the challenges some companies face in the present. The good news is that this often creates opportunities for astute investors to pick up shares of great companies with excellent prospects on the dip.

And that's precisely what we have with Novo Nordisk (NVO 1.59%) and Vertex Pharmaceuticals (VRTX -1.40%), two leading drugmakers that have significantly lagged the market this year.

Pharmacist and customer talking.

Image source: Getty Images.

1. Novo Nordisk

After a major slide this year due to worse-than-expected financial results and clinical setbacks, Denmark-based pharmaceutical giant Novo Nordisk is starting to look like a steal. Here are two reasons why.

First, although the company's earnings haven't quite met Wall Street's expectations, they remain highly competitive when compared to those of similarly sized peers. Novo Nordisk's revenue for the first six months of the year grew by 16% year over year to 154.9 billion Danish kroner ($24.3 billion). The company's earnings per share (EPS) jumped by 23% year over year to 12.49 DKK ($2).

Large drugmakers tend to be happy with top-line growth in the high single-digit percentages -- and Novo Nordisk is well above that level. While the market may have expected even more, given its rich valuation, the correction has now made Novo Nordisk's shares attractive relative to their growth potential. Novo Nordisk is trading at 13.3 times forward earnings, below the 16.4 average for the healthcare industry.

Second, Novo Nordisk should maintain that momentum for the foreseeable future and possibly even accelerate revenue growth. The company's next-gen diabetes and weight management medicines should help on that front. These include CagriSema which, despite slightly disappointing phase 3 results, still looks like a highly promising prospect.

Novo Nordisk is working on newer products, including oral and subcutaneous versions of Amycretin, a medicine that mimics the action of two gut hormones: The famous GLP-1 and amylin, both of which help regulate blood sugar and satiety. The dual agonist approach has proved incredibly effective with Eli Lilly's Zepbound. Novo Nordisk is hoping to score a hit in that department with Amycretin, whose early-stage clinical trials were a resounding success.

Amycretin, CagriSema, and others should eventually improve Novo Nordisk's pipeline, and that's before considering the label expansions the company recently earned, which could add billions in sales to its existing products. Rybelsus earned approval for reducing the risk of cardiovascular events, such as heart attacks and strokes, while Wegovy earned the green light for treating metabolic dysfunction-associated steatohepatitis (MASH).

Oral Wegovy is also racing toward approval for obesity, which could make it the first oral GLP-1 approved in weight management. In short, Novo Nordisk's lineup is strong, and its pipeline is as well. The company is fairly valued while awaiting potential progress that could send its stock price up. Now is a great time to invest in the stock.

2. Vertex Pharmaceuticals

Vertex Pharmaceuticals faced some clinical setbacks this year. The company had to abandon the development of a medicine for type 1 diabetes (T1D), while another therapy in development for acute pain failed a phase 2 study. The biotech company also encountered issues in Russia where it had to deal with illegal copies of some of its drugs, which reduced its revenue.

But even with these troubles, Vertex Pharmaceuticals looks attractive. The company's financial results are still strong. Second-quarter revenue climbed by 12% year over year to $2.96 billion. Vertex continues to rely on its monopoly on the market for therapies that treat a rare lung disease called cystic fibrosis (CF).

Due to its dominant position, Vertex Pharmaceuticals has significant pricing power for medicines that patients typically need to take indefinitely. The company still has room to grow in this niche despite the modest number of CF patients worldwide.

Furthermore, despite recent setbacks with the pipeline, there are also things to look forward to ahead. The company is on track to submit applications for regulatory approval of three new medicines within the next 12 months. There is zimislecl for T1D, povetacicept for IgA nephropathy, and inaxaplin for APOL1-mediated kidney disease.

True, whether Vertex proceeds with regulatory applications will depend on the clinical trial results, but things look very promising so far. For instance, zimislecel has restored the ability of most patients to make their own insulin, something that people with T1D normally cannot do.

Meanwhile, recent approvals will also help the company improve its already strong financial results. Journavx for acute pain earned the green light earlier this year and has already been widely adopted by third-party payers. Casgevy for transfusion-dependent beta-thalassemia and sickle cell disease has been on the market for about two years. Eventually, the gene-editing medicine should make an impact on Vertex's revenue.

The biotech has a lot to look forward to, and even with a forward price-to-earnings (P/E) of 19.7, my view is that Vertex is worth a hefty premium, given its monopoly in CF, multiple new approvals, and a rich late-stage pipeline that should yield even more brand-new products within two years.