After touching bear territory last year, the S&P 500 is showing some optimism this year. The index has climbed more than 11% since the start of January. Many stocks have followed along, recovering and even going on to advance significantly. Those players may be attracting your attention these days.

But it's important to take a look at shares that have underperformed the market, too. In some cases, you might find buying opportunities -- or at least a company to put on your watch list. Let's take a look at three top stocks that haven't kept up with the market so far this year. Is now the time to buy?

1. Etsy

Shares of e-commerce company Etsy (ETSY -2.17%) have dropped more than 20% so far this year. That leaves them trading for only 20 times forward earnings estimates. This looks cheap for a few reasons.

First, Etsy has managed to keep the gains it made over the past few years. The company's total gross merchandise sales (GMS) soared more than 200% in the first quarter compared to the same quarter four years ago. The number of active buyers also climbed in the triple digits over that time period.

Yes, the economic slowdown is weighing on growth. For example, Q1 GMS slipped year over year. But the increases in sales and customers over time suggest Etsy's well positioned to benefit once economic pressures ease.

Meanwhile, another reason to like Etsy has to do with its business model. It's capital light, meaning it doesn't require massive investments to spur growth. For example, Etsy doesn't invest in warehouses or transport. The independent sellers who have shops on Etsy's platform take care of stocking and sending their goods to customers. That means Etsy can maintain a very high level of free cash flow.

So, considering all of this, now is a great time to buy this beaten-down stock.

2. Moderna

Moderna (MRNA 0.89%) shares have fallen as investors worry about what's next for the coronavirus vaccine giant. After all, the vaccine is the company's only product right now. And vaccine sales are on the decline.

But there's reason to be optimistic about Moderna. The company is still likely to generate blockbuster revenue from the vaccine as people return for annual boosters. Even though revenue is set to fall from peak levels, that's OK. Moderna is on track to become a multi-product company, and that means it's likely to have many revenue sources down the road. This will reduce risk and make Moderna a stock that could deliver healthy growth over time.

The company aims to become a leader in respiratory vaccines. Here, we're talking flu, coronavirus, and respiratory syncytial virus (RSV). Moderna is preparing to launch flu and RSV products next year if all goes smoothly. The company's goal is to capture as much as half of the $30 billion respiratory vaccines market in 2027.

Moderna is also working on many other promising products, including a personalized cancer vaccine. It recently reported solid survival data from a phase 2 clinical trial combining its vaccine candidate with Merck's Keytruda.

Taking all this into account, Moderna looks like a bargain today, trading at about 8 times forward earnings estimates.

3. Walgreens Boots Alliance

Walgreens Boots Alliance (WBA -1.33%) isn't only underperforming this year. The stock hasn't delivered gains to investors in quite some time. Over the past five years, it's lost 50%.

The company hasn't stood out when it comes to earnings growth either. Its biggest revenue driver -- the U.S. retail pharmacy business -- reported a 0.3% decline in sales in the most recent quarter. The segment's gross profit fell in the double digits due to a slowdown in coronavirus vaccination and testing. Total prescriptions filled were also on the decline.

Finally, Walgreens has faced legal settlements related to the filling of opioid prescriptions in recent years. That's weighed on operating income.

Still, there's reason to take a second look at Walgreens. The company aims to become a leader in primary care and is rapidly launching centers as part of its investment in VillageMD. Why could Walgreens succeed here? Its proximity to customers is a big advantage. More than 75% of Americans live only a few miles from a Walgreens.

Does all this mean you should buy this underperforming stock? Today, it's trading for only 7 times forward earnings estimates -- a reasonable price. But I would rather pay a bit more for a company that offers growth. Walgreens may eventually deliver growth thanks to primary care, but it's too early to be sure. That's why you may be better off leaving Walgreens on your watch list for now.