Costco (COST  ) reported strong fiscal Q1 earnings that beat expectations and continued a strong 2021 for the company. The stock has moved up about 5% as the market digests these numbers, and some analysts have upgraded their outlooks for the company.

Overall, Costco shares are up 47% on a YTD basis. It's continued trending higher in an environment where many stocks are struggling and some are falling to new six-month lows. This isn't surprising as the stock tends to benefit during inflationary periods as consumers look to save money by buying in bulk. It's also a more defensive stock which outperforms during periods of market volatility.

Inside the Numbers

In its fiscal Q1, Costo reported $2.98 in earnings per share, topping estimates of $2.67 per share. Revenue came in at $50.4 billion, slightly beating estimates of $50.2 billion. Same-store sales increased 15% which was also better than expectations of 13% growth. E-commerce sales also grew by 13%.

Overall, earnings were 14% higher and revenue was up 17%. Throughout its history as a public company, COST has been noted as one of the top retailers and with an excellent business model that leads to high levels of customer loyalty and trust. However, many have noted that its valuation is quite expensive.

This is true now as COST has a forward P/E of 39 which is nearly twice that of the S&P 500 (SPY  ). And historically, its P/E tends to be about 30-40% above the S&P 500 which is unusual for a retailer. However, this is an example of a quality business mattering more than its valuation. Over the last 15 years, COST's shares are up by more than 1,000% which doesn't include dividend payouts.

Costco shares are also a bet on the engine of the global economy - the American consumer. Consumer spending is one economic series that only contracts in recessions and it tends to immediately bounce back after any sort of decline. While, some are concerned about the outlook given the expiration of stimulus payments, the strong labor market, rising wages, housing market, and strong market indicate that consumer spending should remain strong in 2022 which bodes well for COST.

A bigger threat to COST's stock price could be a risk-on market with rising rates and growth expectations. This could lead money to move into more value or cyclical stocks and out of defensive stocks like COST.