Last year was tough for consumer-related stocks as rising inflation weighed on companies' costs and shoppers' wallets. Investors turned their backs on these sorts of companies and favored stocks less dependent on consumer spending.

The good news is that many of these players have started to recover. In fact, consumer discretionary stocks were among the sectors leading gains in the first half.

But one solid player hasn't participated in this rally. I'm talking about Etsy (ETSY 0.34%). The online platform that brings together buyers and sellers of handmade goods saw its shares fall 29% in the first six months of the year.

Right now, should you buy, sell, or hold this e-commerce stock?

An early pandemic winner

First, a little background on Etsy. The company offers sellers of handmade and vintage goods the opportunity to open up a shop on its platform -- and buyers the opportunity to shop there. Etsy's earnings and share price took off during the early stages of the pandemic as people stayed home more and favored shopping online.

In recent times, though, the story hasn't been as bright. Economic factors, like higher inflation and negative currency impact, have hurt the company's growth. For example, in the most recent quarter, net income and Etsy marketplace gross merchandise sales (GMS) both declined.

Net income margin also slipped. And as mentioned above, the stock has been on the decline -- that's after falling 45% last year.

But before you decide to sell your Etsy shares or forget about buying the stock, hold on. It's important to note the progress Etsy has made over the past few years. The company has kept the gains made earlier in the pandemic. Etsy marketplace first-quarter GMS climbed 164% from the same period four years ago, and active buyers increased 119% over that time period.

Meanwhile, Etsy continues to invest in areas that make it easier for sellers to attract buyers and buyers to find the products they need. And Etsy should benefit over time from its acquisition of Elo7, a Brazilian platform much like Etsy itself, and Depop, an e-commerce platform for vintage clothing.

A capital light business

What I particularly like about Etsy is its capital light business structure. Etsy doesn't have to make big capital investments to store or transport goods -- sellers take care of logistics for their shops on the platform. This means the company is able to transform most of its adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) into free cash flow. In the quarter, this percentage was almost 90%, and Etsy finished the period with more than $1 billion in cash.

Now let's talk valuation. Today, Etsy is trading for less than 20x forward earnings estimates, down from more than 30x just a few months ago. This looks dirt cheap, considering the company's growth over the past few years -- and the business model that favors free cash flow.

What does this mean for you as an investor? Should you buy, sell, or hold?

It's true that Etsy hasn't taken part in the big first-half rally, which was led by consumer goods companies. That could make some investors nervous, and spur them to shy away from the company and instead go after consumer goods stocks with momentum right now.

But if you ignore Etsy for that reason, you might be making a mistake. Sure, the company may not rebound immediately, but its long-term prospects remain bright. Etsy has a solid cash position and is cheap, considering its growth and business model.

And let's not forget that the e-commerce market is high growth. It's set to expand in the double digits this decade.

These represent a lot of green lights for Etsy. And that's why I wouldn't sell the company's shares today. Instead, I would buy and hold for the long haul.