Swimming pool manufacturer Latham Group (SWIM 1.31%) rode a wave of cost cuts to better-than-expected earnings. Investors are diving in, sending Latham shares up 42% as of 2:30 p.m. ET.

A more efficient pool maker

Latham designs and manufactures in-ground swimming pools in North America, Australia, and New Zealand. In the quarter, the company earned $0.11 per share, up 55% year over year and well above the $0.01 per share consensus estimate.

Revenue fell by about 10% year over year to $160.1 million, but the company boosted profitability via "improved cost structure and the impact of production efficiencies," according to CEO Scott Rajeski.

"Fiberglass pools are a key area of focus and are positioned to gain share due to their cost efficiency and installation and eco-friendly advantages over concrete pools," Rajeski said. "In the second quarter, we continued to increase awareness and adoption of fiberglass pools, building out our national dealer network and adding new products."

Latham also announced an agreement to acquire Coverstar Central, a dealer in automatic safety coverings for swimming pools, for $65.5 million. Latham said it expects that purchase to add about $20 million in annual sales.

Is Latham a buy?

Latham boosted its full-year sales guidance by $5 million to $495 million to $525 million and its adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) guidance by $15 million to $75 million to $85 million. The company is seeing strong demand for its products and hopes to see a sales boost as interest rates drop and large home improvements become more affordable.

But the company does have $282.4 million in debt. In the quarter, Latham reduced its net debt leverage ratio to 2.1 times EBITDA from 2.7 times EBITDA at the end of the first quarter but has more work to do in the quarters to come.

There is risk here, as a swimming pool is a luxury item that households can easily forgo when times are tight. But Latham is also chasing a potentially large long-term market opportunity. For those willing to accept some near-term headwinds, Latham could be an intriguing small-cap option.