Investors in Costco Wholesale Corporation (NASDAQ:COST) have been on something of a roller coaster ride.

Shares of the company have been pushed around by the overall retail environment than anything company specific -- fears involving the threat from e-commerce and fierce competition in the grocery space have weighed on the stock in recent months and that seemed to continue in the wake of its recent financial release.

Investors had hoped to see a continuation of the positive results from the previous quarter as well as updates on the new branded Visa card, annual shopper memberships, and its e-commerce initiatives. While the company provided results that exceeded many of the expectations set by stakeholders, it wasn't enough to overcome concerns about the future, and the stock fell nearly 6% following the financial report.

Costco location with many cars in parking lot.

After better than expected results, why is Costco stock down? Image courtesy of Costco Wholesale.

Results were better than expected

Costco reported total revenue of $42.3 billion, an increase of 15.7% over the prior year quarter, exceeding analyst's consensus estimates of $41.55 billion. Earnings per share of $2.08 increased 17.5% year over year, exceeding expectations for $2.02 per share.

Part of the increase was the result of an extra week in the fourth quarter compared to last year. Factoring out the results of the extra week, comparable sales increased by 6.1%, or 5.7% when excluding foreign exchange effects and volatile gasoline prices. This was the result of gains of 5.8% in the U.S. market, 4.8% in Canada, and 6% in other international markets.

Costco also got a boost from 12 new locations that were opened during the quarter, bringing the total new stores for the year to 26. The company has 741 locations worldwide.

While membership fees for the year rose 13% to $943 million, part of this was the result of the recent increase in the annual membership fee in the U.S. and Canada by $5 per member, up from $55 to $60. Renewal rates fell slightly from last quarter, however, with business members renewing at 94%, and Gold Star members at 89.3%.

Chief financial officer Richard Galanti chalked that up to the conversion to the new credit card program last June. Many customers were setup to auto-renew the membership on their credit card, but the switch to the new branded Visa has resulted in some membership lapses. Costco management expects that to moderate over the next two quarters, similar to what occurred in connection with the earlier conversion in Canada.

But investors still had concerns

Declining margins and competition seemed to give investors pause. Costco stated that this was the result of "investing in price," which is another way to say lowering prices due to heavy competition. Investors are well aware of the entry by Amazon.com, Inc. (NASDAQ:AMZN) into the grocery category via its acquisition of Whole Foods. Its first action of note was to lower prices on many staples at those stores in a move to increase foot traffic. This caused many grocery chains to immediately lower their prices to compete.

Costco has been making moves to better compete in the realm of e-commerce, and saw positive results in its own e-commerce sales, which increased 21% year over year, and 11% sequentially. Costco also announced two new delivery options for online shoppers in an effort to more effectively compete in the e-commerce arena. With Costco Grocery, shoppers can get free two-day delivery on orders of $75 or more, and choose from a list of 500 nonperishable items. Costco is also partnering with Instacart and will offer same day delivery on 1,700 items from 376 U.S. Costco stores.

It's all about perception

It may seem counter-intuitive that a solid beat on top and bottom line and increases in same-store-sales would be met with such skepticism. Many believe that the Whole Foods acquisition won't hurt Costco over the long term. The company is placing more emphasis on its own e-commerce channels which it hopes will minimize defections to online competition. Considering the largely positive financial results, the sell-off may be overdone, providing long-term investors with an opportunity.

Danny Vena owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon. The Motley Fool recommends Costco Wholesale. The Motley Fool has a disclosure policy.