March is here, and the strong market gains investors were experiencing in the first two months of the year are beginning to slip. The S&P 500 is up 5% year to date as of this writing, lower than its earlier gains.

If that's worrisome, consider that the S&P 500 is an average, and many great stocks continue to climb. The flip side is that lower prices give you an opportunity to buy shares before they start to rise. Costco Wholesale (COST 1.20%), Williams-Sonoma (WSM 0.05%), and Target (TGT 0.10%) are three great companies whose stock prices are rising this year but still look like bargains.

1. Costco: Buy the dip

After a stunning two-year run of elevated sales growth, Costco's ride has finally come to an end. Sales increased 6.5% year over year in the 2023 second fiscal quarter (ended Feb. 12) after many quarters of double-digit growth -- and in line with what a typical quarter looked like before the pandemic.

However, profitability continues to increase significantly despite the pressured environment. Earnings per share (EPS) were $3.30 this year vs. $2.92 last year. 

Costco stock fell after the earnings announcement last week even though it's still up 4% this year. The shares typically sport a high valuation compared with other supermarket and essentials stocks because investors know that Costco is reliable for consistent sales and income growth. While it may have deserved a richer premium when delivering unusually high gains, some investors have been waiting for the valuation to come down before buying shares.

For investors waiting to buy Costco stock at a more reasonable valuation, this is your chance. The shares are trading at a price-to-earnings ratio of 36, which is closer to recent historical norms, and far below the close to 50 it was trading at not too long ago. Costco stock has been an excellent performer over many years, easily outdoing the broader market's gains.

With its resilience under pressure, its fee-based membership model that generates robust net income, and its dividend, Costco is a no-brainer stock for long-term investors.

2. Williams-Sonoma: Bargain-basement valuation 

Williams-Sonoma sells pricey home goods through its network of specialty stores and a robust online presence. It has nailed the digital strategy, and e-commerce accounts for about two-thirds of total sales. This allowed the retailer to score sales increases throughout the pandemic.

Moreover, its focus on an affluent target market is providing it with resilience despite inflation. Although margins have been pressured due to the economy, EPS still increased 13% in the 2022 third quarter to $3.72.

Williams-Sonoma is a below-the-radar stock that offers long-term value. It has outperformed the market over time, but its stock trades at the dirt cheap valuation of 7 times trailing-12-month earnings, its cheapest in over a decade. 

WSM PE Ratio Chart

WSM PE Ratio data by YCharts

Management still sees ample room for growth. The company has 1% of what it says is an $830 billion market, and it's expanding into new segments and locations to grow its business.

Plus, Williams-Sonoma pays a dividend that yields 2.5% at the current price. The company reports fourth-quarter earnings in the next few weeks. Now is a great time to buy before the stock climbs.

3. Target: Look past the present

After enjoying some of its best performance ever during the pandemic as a favored essentials retailer, Target was blindsided by the fallout from inflation, which resulted in shoppers cutting back on non-essential spending and Target winding up with excess inventory.

The retailer has spent the better part of a year working toward rebalancing inventories, and in the fiscal 2022 fourth quarter (ended Jan. 28), total inventories decreased 3%.

Target places a strong emphasis on its omnichannel model, fueled by same-day services. It's an efficient system, with 95% of digital orders fulfilled in stores, and that gets products to customers faster and cheaper. 

The company has other differentiating factors, too. These include its own brands, which are popular with customers and cheaper to produce, as well as its variable store size formats, which get the right sized stores into the right locations.

These are still the building blocks of Target's development, and in an improved economy, they should lead to higher sales and a stronger operating margin.

Target stock is down 26% over the past year as investors are taking a wait-and-see approach. It's a great opportunity to buy shares before the economy gets back up to speed and Target stock soars. Target is also a Dividend King, and its dividend yields 2.5% at the current price.