Shares of online pet food retailer Chewy (CHWY -1.22%) jumped as much as 31.4% this week after reporting quarterly earnings, according to data provided by S&P Global Market Intelligence. At 3:30 p.m. ET, shares were still up 27.2% for the week and holding strong.

Margins are the story

Sales were only up 3.1% in the quarter to $2.88 billion, but net income more than tripled from a year ago to $67.3 million, or $0.15 per share. Management said gross margins improved 130 basis points to 29.7%, and net margin jumped 150 basis points to 2.3%.

Chewy's growth has leveled off, but margins have improved rapidly over the last five years, and the company is now reporting consistent, increasing profits.

CHWY Revenue (TTM) Chart

CHWY Revenue (TTM) data by YCharts

Where does Chewy go from here?

The slowing sales growth is troubling because it may be a sign that Chewy is reaching a point of saturation for its products. But the company needed to improve margins, and that's exactly what we're seeing.

Shares are pretty reasonably priced as well, with the stock trading for 0.7x next year's sales estimates and 22x forward earnings estimates.

What will keep me out of the stock is the potential lack of growth opportunities. You can see above that revenue growth has slowed significantly, and I think there are limited opportunities to expand margins from here. Generating higher margins while getting the business back to growth mode may be much harder than the margin improvements that drove the stock higher this week.