The S&P 500 may be trading near its all-time high, but not all companies are participating equally in the rally. In fact, it's been a brutal year to be an investor in the apparel maker Under Armour (NYSE:UAA) (NYSE:UA). Shares have been decimated over the last year, falling by more than a third over concerns that future profit growth is going to slow:

UA Chart

UA data by YCharts.

With shares now trading at a two-year low, I think it is a great time for investors to consider getting greedy.

The business

In the mid '90s a fullback at the University of Maryland named Kevin Plank grew tired of having to swap out his sweat-soaked T-shirts. That lead him to create a T-shirt of his own that used moisture-wicking fabric instead of cotton. He showed the shirt to his teammates and friends, who all loved the concept, and he continued to innovate from there. He set up a small company to sell the shirts, named it Under Armour, and the rest is history.

Fast-forward to today, and the company has turned into a multibillion-dollar franchise. Under Armour now counts some of the best athletes in the world as spokespeople, and it continues to gobble up market share in areas like apparel, footwear, and accessories.

Image source: Under Armour.

The company's financial results have been nothing short of phenomenal, and long-term shareholders have made out like bandits:

UA Revenue (TTM) Chart

UA Revenue (TTM) data by YCharts.

Investing in the future

During its most recent quarterly report, Under Armour reported that top-line growth exceeded 20%. That was the 26th quarter in a row that it achieved that feat, which is a remarkable winning streak. But even now, management believes it is just scratching the surface of what is possible.

Here's a quote from CEO Plank that sums up the company's opportunity in the U.S. alone:

Consider this: Our two largest competitors generated approximately $18 billion in revenue in North America over just the past 12 months. So while we recognize that our trailing 12-month North American revenues of $3.95 billion is 85% of our business, it is just a fraction of the opportunity that we believe exists for our brands. Whether through share gains, market growth, new distribution or sheer brand heat, we know we have tremendous runway in our home market.

That opportunity suggests that more growth is ahead, but management spooked the markets when it stated that the company needed to invest heavily in the business to continue to gain market share.

Image source: Under Armour.

Here's what Chip Molloy, Under Armour's CFO, said on a conference call:

This is a moment in time. We could choose to optimize for more near-term profits, but we believe it is more prudent to invest to maintain superior growth rates while gaining both share and scale. Growth, share, and scale are the priorities for our brand. With that said, we will invest more heavily in areas that we can grow faster, such as footwear, direct-to-consumer and international, as well as more aggressively enter sport fashion like UAS and the much broader sport lifestyle category.

As a result, management dialed back the company's long-term profitability targets. While management continues to expect that revenue growth will exceed 20% annually over the next few years, profits are only expected to only grow in the "mid-teens."

Traders didn't take the news well. Shares dropped on the day of the earnings report, and have continued to drift lower ever since.

Don't let the high P/E ratio fool you

Under Armour's critics have long claimed that the company's nosebleed P/E ratio was a reason to stay far away from the stock. Even today, after its huge dive, the C shares still trade for around 53 times trailing earnings. That's not exactly a number that value investors would consider "cheap."

However, I'd argue that the P/E is not the best metric to use to value Under Armour's stock. The reason is that earnings are being held back by continued investments in the business. If those investments pay off -- which I'll admit is a big "if" -- then the company's profit margin should be able to rise, too.

How high could it go? There's no way to know for sure, but I find it helpful to compare Under Armour's net profit margin to that of Nike (NYSE:NKE), a much more mature apparel maker:

UA Profit Margin (TTM) Chart

UA Profit Margin (TTM) data by YCharts.

As you see, Nike's profit margin is more than double that of Under Armour. That suggests that the company could be far more profitable today if it chose to stop investing in growth. That's why I don't find the P/E to be all that useful.

Instead, I like to look at the price-to-sales ratio of these two companies to get a better idea of value:

UA PS Ratio (TTM) Chart

UA PS Ratio (TTM) data by YCharts.

As you can see, Under Armour's recent drubbing has all but erased its massive premium. Shares actually trade at a similar valuation to Nike, despite having far more room for growth ahead.

Under Armour looks undervalued

I'm convinced that Under Armour is one of those rare companies that never looks cheap but can still go on to put up market-beating returns. With the investments that it is making in footwear, digital fitness, and its international business, I believe that the company's future is looking extremely bright. With shares trading at a rare discount, I think it is a great time to consider getting greedy.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.