It has been a rough few years for Under Armour (UA -1.57%) (UAA -1.21%) shareholders, but their patience is starting to pay off. The sportswear specialist's stock is up 60% so far in 2018, compared to a rise of just 2% in the broader market.

That performance has roughly tripled the returns that rival Nike (NKE) has managed, although the industry leader is sitting much closer to all-time highs today. Under Armour stock, in contrast, is well below the record it set in late 2015.

But the company is making encouraging strides in closing that gap.

A jogger stops for water.

Image source: Getty Images.

Building from a small base

This year's rally began with encouraging fourth-quarter earnings results. Following a brutal 2017 during which the stock was cut in half, Under Armour outperformed low expectations in its first report of the year. Yes, sales in the key U.S. market were down, and the company posted reduced profit margins as it cut prices to clear out excess inventory. However, revenue declines slowed to 5% from 12% in the prior quarter. Gross margin losses improved as well.

Those successes gave CEO Kevin Plank and his management team confidence to project a modest rebound in sales and adjusted profits this year, but that bright outlook only improved from there.

Under Armour's second-quarter report showed an 8% sales gain, or about the same expansion pace that Nike achieved. The industry leader paired that growth with rising profitability, which indicated a much stronger inventory position. However, Under Armour also showed progress at adjusting to the tough selling environment by stepping up its innovation and pivoting more aggressively toward the e-commerce sales channel.

Looking ahead

As of late October, Under Armour's outlook calls for sales to rise by between 3% and 4% this year while profit margin dips just slightly from last year's 45% rate. The company is expecting to book an operating loss in 2018, and that will mark a painful shift from the over $400 million of operating profits it booked in 2015 and 2016, before the business took a dramatic turn lower.

UAA Operating Income (TTM) Chart

UAA Operating Income (TTM) data by YCharts

But looking beyond the short-term earnings challenges, there are good reasons to expect the business to keep improving from here. Inventory levels have fallen across the industry in the U.S. market, after all, which has removed the single biggest drag on both Under Armour and Nike's growth. As a result, it's likely that Under Armour will follow its larger rival in reporting accelerating sales gains and rising margins. The company has plenty of room for growth internationally, too, with the segment on track to jump 25% this year.

With adjusted annual profits down 60%, Under Armour's business is far from the point where Plank and his team can claim a sustainable turnaround. The holiday shopping season also represents a risky time for the retailer, as even minor misses in demand predictions can force aggressive price cuts.

Yet Under Armour is in a far better inventory position today than it was a year ago. Its cost structure has improved, too. Better still, management has a more realistic, more humble approach that reflects the lessons it's learned since its streak of over 25 consecutive quarters of over 20% sales gains came to a quick halt.

Put it all together, and the conditions are favorable for the retailer to avoid another surprise demand shortfall and keep recovering. That outlook assumes that Under Armour continues developing apparel and footwear that resonate with its active customer base, both online and through its physical retailing network.