Altria Group (MO 0.06%) stock has struggled the match the market's meteoric rise. Over the past five years, the S&P 500 has roughly doubled in value. Altria stock, meanwhile, is up by only 40% over that time period.

But don't think this tobacco company is destined to lag the market. In fact, over the next five years, there's a chance Altria could become a safe haven for your portfolio.

Two problems with Altria stock right now

As a tobacco company, Altria is facing the same challenges as the rest of its industry. The core issue is falling volumes for combustibles like cigarettes. According to data compiled by Statista, the volume of cigarette sales in the U.S. has been declining nearly every year since 1980. Back then, around 600 billion cigarettes were sold in the U.S. every year. Today, it's under 175 billion.

No one expects this downward trend to reverse anytime soon, if ever. Offsetting the volume decline, however, has been a dramatic rise in pricing.

In 1980, the average price of a pack of cigarettes was less than $0.50. By 2012, the average price had exceeded $5 per pack. Today, it's around $9 per pack. Much of this price increase is diverted to higher taxes. But tobacco companies have figured out how to keep a rising share for themselves.

That said, price increases can only go so far in the face of falling volumes. Over the next five years, Statista Market Insights believes that U.S. cigarette industry revenue will fall by around 0.22% per year -- a figure that already accounts for a rise in pricing.

Altria's problem right now isn't just declining cigarette volumes. As a tobacco company, Altria is the quintessential "defensive" stock. While cigarette revenues are expected to gradually decline over the next five years, overall sales won't gyrate as much as economic conditions.

In a bear market, this is a great advantage for Altria, causing the stock to typically outperform market indexes during times of turmoil. But in a strong bull market like the one right now, this slow-but-steady approach becomes a major weakness. Altria's current P/E ratio, for instance, is around 9.5 -- a 35% reduction over the last five years. The S&P 500, meanwhile, currently trades at 28.5 times earnings -- a 30% increase over the last five years.

Current conditions are just downright unfavorable to Altria right now. Its core business is slowly fading, while markets simply aren't interested in defensive value stocks. But there are two potential things to look forward to in the years to come.

Don't jump ship just yet

The first thing is that Altria very much understands the decline of its core combustibles business. In fact, one of its core priorities over the long term is to reduce cigarette usage in the U.S.

That's a comfortable stance to have, given the company markets some of the most popular noncombustible nicotine products today, including Zyn pouches and Juul vaporizers. From 2020 to 2023, for instance, sales of e-cigarettes in the U.S. spiked by 46.6%. With a deep understanding of the nicotine market plus unparalleled access to retail store shelves, Altria is investing heavily in a noncombustible future.

Despite some early missteps, the company seems to be navigating the transition well. Over the past five years, total company sales has grown by around 4%. That's not a mouthwatering figure, but it strongly suggests that over the next five years, Altria has a chance to not only maintain its current sales base, but build upon it through the introduction of noncombustible product lines.

And while no one can predict when the next market crash will occur, if one does arrive over the next five years, expect Altria to navigate the storm with ease. So far, noncombustible nicotine products have demonstrated the same recession resistance as their smokable counterparts. In 2022, for instance, when the S&P 500 lost 18% of its value, Altria stock actually rose by around 4%. That performance was helped by an annual increase in industry smokeless product sales, a feat that occurred despite difficult economic conditions.

At its core, Altria stock should be a simple story over the next five years. Expect combustibles sales to continue falling, while noncombustible sales race to offset the decline. Meanwhile, if markets continue to surge, expect the stock to underperform.

The exception would be a market downturn, in which Altria's strong free cash flow, recession-resistant products, and bargain valuation will help it trounce market indexes -- as it has proven capable of doing time and time again throughout history.