The market is in an uncertain state as we head into the new year. With the S&P 500 and Nasdaq Composite down 20% and 34% respectively in 2022, investors are in a cautious mood and wondering whether the market will rebound in the year ahead or if it will be another year of further losses.

I don't know the answer, but I do know that investing in stocks with undemanding valuations and solid dividends gives investors a margin of safety, which I think is the right approach for this market environment.

One stock that looks particularly well-suited for this approach is omnichannel home goods and furniture retailer Williams-Sonoma (WSM -0.54%). The shares are cheap and pay a market-beating dividend -- and the business has plenty of upside potential, too.

Here's why Williams-Sonoma is the right type of stock for ringing in the new year. 

Person admires vase bought online.

Image source: Getty Images

Why is the stock struggling?

Williams-Sonoma is the parent company of its namesake Williams-Sonoma brand as well as Pottery Barn, Pottery Barn Kids, PB Teen, West Elm, and more. It's a great company that unfortunately saw its stock fall 32% in 2022.

The shares have fallen because of concerns about consumer buying power during a time of rising inflation and an unsure economy. A cooling housing market has exacerbated matters as it affects furniture and home goods sales. As a result, management to say it will provide an update to its 2023 outlook during its next quarterly earnings call. At the same time, it pulled its guidance for 2024, sending its shares lower.

However, investors would do well to take a longer term perspective. The company has increased its earnings per share at a 50% rate over the past three years. Even during the most recent quarter, comparable-brand sales increased 8% year over year.

An underrated e-commerce growth story 

Williams-Sonoma also looks like it is still in the early innings of its growth story. This is an omnichannel furniture retailer, and data from Euromonitor shows that only 30% of home goods purchases are made online, which is well below the rate of many other industries. As more of these purchases move online, this should benefit a company with a large digital presence like Williams-Sonoma, which makes about 66% of its revenue through e-commerce sales.

Market share there for the taking

This is also a large, fragmented industry. Williams-Sonoma estimates that its total addressable market is $830 billion and that it has only about a 1% share today. While figures offered by management should be taken with a grain of salt, there is clearly a large opportunity here. Furthermore, no one company enjoys more than a 5% market share, so Williams-Sonoma isn't fighting against any 800-pound gorilla that dominates the space.

The company says that smaller regional players account for 50% of sales. This is a great setup for a well-resourced company like Williams-Sonoma to come in and take market share from smaller competitors with less scale. And Williams-Sonoma appears to be doing so with 22% revenue growth in 2021, far outpacing the U.S. furniture industry's 7% growth.

Continuing to gain market share could pay off big for the company and its shareholders. Williams-Sonoma says that capturing a 3% share would drive an additional $15 billion in revenue, or three times what the company makes today.

Compelling valuation and dividend

Shares of Williams-Sonoma are decidedly cheap, trading at under 8 times earnings. This inexpensive valuation gives investors a solid margin of safety. Additionally, Williams-Sonoma returns a significant amount of capital to shareholders through both dividends and share repurchases -- about $2.5 billion in total over the past five years.

The shares currently yield 2.7%, which is well above the average yield of the S&P 500, which currently clocks in at about 1.7%. Plus, the company has grown its dividend for 16 straight years -- and at an impressive 15% rate over the past five years alone. 

A great stock to ring in 2023 

The strength of the housing market and the consumer remain unclear heading into 2023. But at 8 times forward earnings, Williams-Sonoma's stock appears to have priced in these challenges. Investors have a chance to invest in a company that is outgrowing its industry at a discounted price. Not only that, but Williams-Sonoma is also at the spear point of the e-commerce transition in its industry, and winning market share in the fragmented industry.

The stock is attractively valued and is returning capital to shareholders through dividends and share repurchases. It looks like 2022's pullback has created a great opportunity to start a position in this long-term winner.