Closed-end municipal bond funds bucked an otherwise dismal December and an equity fund focused on Mexico managed decent gains, even as other bond and equity counterparts took a beating amid the market rout.

Municipal debt CEFs posted an average return of 1.1% in December, even as closed-end bond funds as a whole saw declines of 0.37% in net asset value and 1.5% on a market basis, according to Lipper's FundMarket Insight Report.

Closed-end equity funds were hit even harder, with a 6.13% decline in net asset value and an 8.53% slide on a market basis.

While 56% of bond and other fixed-income closed-end funds saw gains in net asset value in December, only 7% of equity CEFs managed to stay out of the red. Overall, just 35% of all closed-end funds were in the black for the month, Lipper's FundMarket report notes.

"It was pretty much a meltdown," said Tom Roseen, Lipper's head of research services. "It was really kind of a rough month we saw."

New Jersey closed-end municipal bond funds racked up the best performance in the muni sector, with a 1.53% return on net asset value. Other state muni funds were not far behind, at 1.52%, followed by Pennsylvania muni bond funds, at 1.47%.

Returns of intermediate muni debt CEFs lagged at 1%, while national muni debt funds also came in below their single-state counterparts at 1.24%, the Lipper report noted.

On the equity side, a closed-end gold and precious metals fund and emerging markets CEFs were pretty much the sole positive story for the month.

ASA Gold & Precious Metals Limited saw its net asset value rocket 11.6%. The boost came as gold prices rose 4.76% in December to $1,278.3/ounce as investors sought out safe havens from the market turmoil.

"Gold did pretty well," Roseen said. "Some of the gold funds had the strongest performance for the time period."

The Mexico Fund (MXF) took second place for top returns on the equity side, with the closed-end fund rising 3.93%. The Mexico Equity & Income Fund, Inc. (MXE) came in No. 3, with a 3.34% rise, followed by the Gabelli Global Small & Mid Cap Value Trust (GGZ) , at 1.84%, and Variant Alternative Income Fund NICHX, an interval hybrid fund, with a 0.74% return.

While closed-end emerging market funds collectively posted negative returns, they did better than other categories in limiting their losses, with an average drop of 2.22%. CEFs focused on the Pacific region, excluding Japan, did the best of all, with a 0.8% decline, according to the Lipper report.

With dropping oil prices, closed-end energy MLP funds were the "cellar dweller" on the equity side for the second month in a row. Energy MLP CEFs drop 12.64%, followed by natural resources CEFs, which took a 10.35% hit.

The Tortoise Energy Independence Fund, Inc. (NDP)  shed 20.73% of its net asset value, followed by Goldman Sachs MLP and Energy Renaissance Fund (GER) , which plunged 17.59%. The losses came as crude oil prices declined 10.84% over the course of December, closing at $45.41/barrel, the report notes.

A tumultuous December also pushed discounts on closed-end funds, already at some of their lowest levels in a decade, even lower.

In the closed-end fund sector, share price and the value of the underlying investment portfolio move independently of each other.

This often allows investors to buy the stocks and bonds in funds at a discount, such as 90 cents on the dollar.

If the fund's price rebounds and the discount narrows, the investor earns a nice return. If it widens, the bet can backfire.

Amid a rocky 2018 for the stock market, more closed-end funds than ever are trading at a discount. And the discounts themselves have widened to levels not seen since the Great Recession.

CEFs as a whole saw their discounts widen 178 basis points to 11.97% in December. That was significantly wider than the 12-month moving average of 8.42%, Lippers FundMarket report notes.

Closed-end funds focused on bonds and fixed-income saw their discounts widen to 12.74%, or an increase of 117 basis points, while discounts on equity funds expanded by another 144 basis points, to 10.27%.

Closed-end funds with municipal debt portfolios spanning the country as opposed to focusing on an individual state, saw their discounts expand the most, rising 220 basis points to 12.12%.

Such high discount levels are unlikely to go unnoticed by investors, Roseen said, who predicts some bargain hunting ahead.

He noted some individual discounts on funds are as high as 30%. There may be some particularly promising deals on the bond side, especially if investors believe 2019 will bring a "softer, more livable" Fed when it comes to the pace of rate increases, Roseen said. Closed-end bond funds, and bond funds in particular, are particularly sensitive to rate increases.

"I think we are going to see some people doing some bargain shopping in January," Roseen said. "Some of the discounts are huge. There are some opportunities now for closed-end fund investors to make some pretty significant moves."