As any seasoned investor knows, the market wields a sledgehammer and takes no prisoners. But that doesn't mean it's always right. Take fertilizer producer Intrepid Potash (IPI 0.72%) as an example.

Following years of poor decisions from management, mounting debt, and runaway dilution, the company finally appears to be turning things around -- and there's still plenty of room for it to expand if fertilizer selling prices improve. Although the business made undeniable progress this year, the stock has dropped nearly 28% since the beginning of 2018.

Investors who carefully pore over the numbers and regulatory filings might conclude that Intrepid Potash stock is being unfairly punished. Here's why it may be worth giving this beaten-up stock a closer look.

A question mark drawn on a stack of colorful index cards

Image source: Getty Images.

A lack of respect for a solid turnaround

This time last year it wasn't very difficult to write off Intrepid Potash. For starters, the company hasn't been very good at creating shareholder value in recent years. The macro environment made matters even worse, as fertilizer selling prices were reeling from oversupply, brought on by awful decisions made by the handful of companies that control the global market. Peek over the horizon, and risks from lithium production (which creates a lot of potash as a byproduct) and new agricultural biotech products (which may one day reduce or eliminate fertilizer inputs) didn't paint a very optimistic outlook for fertilizer markets.

But investors -- including myself -- should give credit where it's due. Intrepid Potash has kept its head down and executed against its stated objectives in 2018. Revenue is up, production costs and interest expense are down, and water sales to oil and gas drillers in the Permian Basin are providing a healthy boost to operating cash flow. That has led to a dramatic improvement in operating performance through the first nine months of 2018, compared to the year-ago period:

Metric

First Nine Months, 2018

First Nine Months, 2017

Change (YOY)

Total revenue

$140.7 million

$127.7 million

10%

Cost of product revenue

$84.6 million

$85.2 million

(0.8%)

Operating income

$6.6 million

($11.5 million)

N/A

Interest expense

$2.6 million

$10.6 million

(75.5%)

Net income

$4.1 million

($21.5 million)

N/A

Operating cash flow

$52.9 million

$10.5 million

402%

Data source: Intrepid Potash SEC filing. YOY = year over year.

Solar evaporation ponds are continuing to lower potash production costs, which dropped 11% in the first nine months of 2018 compared to the year-ago period. Combine that with a 6% uptick in selling prices, and the company's potash segment saw a year-over-year improvement of 61% in gross profit.

Things aren't quite as rosy for the Trio segment (Trio is the company's brand of langbeinite fertilizer), but the outlook is the best it's been in years. The segment cut its gross loss to just $178,000 in the third quarter of 2018, thanks to a 7% jump in selling prices compared to the prior-year period. If prices can hold or improve, then Intrepid Potash would be on good footing to erase the $4.5 million gross loss accrued by the segment in the first nine months of this year.

And last but not least, Intrepid Potash is cashing in on its strategy of selling some of its excess water reserves to oil and gas drillers in the Permian Basin. The company reported $12.5 million in water revenue in the first nine months of 2018, up from just $3.4 million in the year-ago period, and generated an impressive $9.6 million in gross profit in that span.

An oil rig in a field

Image source: Getty Images.

When including cash received for water volumes that have yet to be delivered, water transactions in the first three quarters of the 2018 swell to $23.1 million. While that could be viewed as a positive sign for the business, Wall Street balked at the idea that $9.1 million in water sales are pending delivery -- up from $5.4 million at the end of the second quarter. That may not be an overreaction, considering Permian Basin production is being pressured by a lack of infrastructure in the region, which could pose a risk to Intrepid Potash's newest cash cow.

Intrepid Potash stock is worth a closer look

Investors can't dismiss the inherent risks of the fertilizer industry, especially with new threats on the horizon from lithium production and new biotech products. Intrepid Potash also faces unique risks among its peer group, after hitching its wagon to water sales to oil and gas customers in the Permian Basin.

That said, the ongoing turnaround certainly isn't receiving the respect it deserves, as the numbers clearly indicate. And water sales are an obvious net benefit to the business. Those factors make this fertilizer stock worth a closer look, at the very least.