Image source: Motley Fool. 

For the first time since the recession, Costco Wholesale (COST -0.24%) stock lost value last year. Shares of the warehouse retailer fell just 0.9% during in 2016, but that was a marked difference from the stock's steady rise since 2008 as it tripled in value. Last year's performance was also notably worse than that of the S&P 500, which gained 9.5% last year.

Why 2017 could be ugly

Going into 2017, Costco faces many challenges similar to those of last year. 

At a P/E of 29.3, Costco is considerably more expensive than its big-box retail peers. Though its membership-based model gives it a competitive advantage over rivals like Wal-Mart and Target, its stock has still outgrown earnings per share in recent years, meaning it could be set up for more multiple compression like it experienced last year.

Also much like 2016, a strengthening dollar should continue to weigh on profits as about a third of Costco's stores are overseas. Many of them are in Canada, where the currency has weakened substantially in recent years.

Competition from e-commerce, specifically Amazon.com, has also intensified, as weak holiday sales reports from department stores confirmed. Amazon Prime is in many ways a direct competitor to Costco as both are built on the membership model. However, research has shown that many American households have both Prime and Costco memberships, indicating Prime may not be as much of a clear threat yet. Still, Costco has been reluctant to make investments in e-commerce, and as Amazon improves it delivery and benefits Costco could end up losing.

But it might not be

Despite those concerns, there are some tailwinds that could benefit Costco this year that it didn't have last year. 

First, the company is starting off with momentum after reporting same-store sales up 3% in December after adjusting for fuel prices and currency, better than its 2% year-to-date. Those numbers indicate that Costco outperformed its brick-and-mortar peers, even though as a bulk retailer the company does not see the spike in holiday sales that department stores like Macy's do. Costco's comparable sales growth has moderated in recent years, so investors now seem content with a clip like 3%. 

Fuel prices have also risen over the past year, a boon to Costco as many of its locations have gas stations. As another perk for its members, Costco offers some of the cheapest gas available, and when gas prices rise customers are more likely to visit Costco to take advantage of the savings. Higher gas prices also allow the company to make slightly higher margins on fuel sales, so the company should benefit in several ways from higher gas prices this year.

Finally, Costco is expected to raise its membership fees this year -- it usually does every five or six years, and hasn't done so since 2011. Analysts expect the standard gold star membership to go up from $55 to $60 and for the executive membership to increase from $110 to $120. Since about 70% of Costco's operating profits come from its membership fees, raising them by about 9% should provide a nice boost to its net income. Costco's membership retention rate is near 90%, so a small increase in the fee is unlikely to have a major effect on cancellations.

Taking all of the above into account, it doesn't look like 2017 will be Costco's worst year yet as rising gas prices and a hike in the membership fee should mean that profits grow faster than they did last year. However, many of the challenges from last year remain, such as the stock's high valuation and structural changes in the industry that are threatening brick-and-mortar retailers. While 2017 could be kinder to Costco stock than last year, I would be surprised to see the stock do better than a single-digit percentage gain.