Time to call the codebreaker.

Last month's upheaval in the credit markets left a number of closed-end fund managers not only whipsawed but puzzled as well. Bond funds, once considered "defensive," turned toxic as their discounts were stretched. Equity fund discounts, meanwhile, held firm in the face of a ferocious flight to quality.

To solve this riddle, TheStreet.com called Dr. Richard Shaker, portfolio manager for Shaker Financial Services and former chief of mathematical research for the National Security Agency. Based in Annapolis, Md., Shaker manages more than $70 million in assets, employing various closed-end fund trading strategies, most notably discount mean reversion.

At the end of June, Shaker's fund had a one-year total return of 34.5%, compared with 20.6% for the S&P 500 Total Return Index. For the prior three- and five-year periods, Shaker handily beat that index by 10.6 and 8.2 percentage points, respectively.

TheStreet.com: After a wild July, were you happy to finally flip the page on the calendar?

Richard Shaker: Absolutely. The last two weeks of July was one of the most difficult trading periods in our 13-year history. In retrospect, given all that happened, especially holding fixed income funds we thought defensive, but turned out to be anything but, we count ourselves fortunate in July to have matched the S&P 500's 3% decline. That still left us up almost 9% year-to-date, more than 5% better than the market.

How have closed-end funds generally behaved during all this turmoil?

Equity funds were pretty well behaved. Of course, they fell as their net asset values fell, but discounts were stable. And although emerging markets were volatile as always, they outperformed U.S. equities during the July 16 to 31 period. We feel that on a discount basis they aren't the bargains they were in late June, but because we believe that they are the best place to invest for the long term, especially Asia, we maintain a significant exposure to emerging markets in our managed account program.

Fixed income was a whole different ballgame. Besides the havoc wreaked on net asset values, there was a general widening of discounts, on the order of 2% to 3% for funds that held anything other than governments or AAAs, and even investment grade bond funds widened close to 2%. So we were hit with a double whammy in the parts of our portfolio that we had considered defensive. Some of the widening was probably due to distrust of net asset value valuation. Some was probably sentiment, fear of having anything to do with fixed income.

So since your basic trading principle is regression to the mean, are you now going to load up on fixed income CEF's?

No. We respect sector moves and generally maintain a fixed asset allocation. Where we play regression to the mean is by trading individual funds within a sector. I would expect with tax-loss selling on the horizon -- it's never too early to worry about tax-loss selling -- sector discounts in fixed income are unlikely to return to their springtime levels this year. On the other hand, emerging market funds, with good records during the past several years, may see discounts continuing to narrow.

Do you trade any different in this time of turmoil?

Yes. It's not a matter of choice but rather a matter of opportunity. During times like this, there is frequently heavy selling of a particular fund. Our technical term for this is a "dump." We spent much of our time in July looking for and reacting to dumps.

July was like walking through a minefield. If the security dumped was one we own, that was unfortunate, but we still took advantage and added to our position. If not, we welcomed a new security to our clients' portfolios.

For example, just Wednesday, Aug. 1 , a 30,000-share dump of the Advent Claymore Convertible Securities & Income Fund ( AVK) knocked it down 5% from its last trade and 10% from the prior day close, sending it to a whopping 17% discount. Traders taking advantage of the wreckage could accumulate shares at a 14% discount. It slowly recovered throughout the day, closing at a 9.6% discount.

The Advent convertible fund invests below investment grade, but BlackRock Income Trust ( BKT), holds only AAA-rated bonds. Yet it was not immune to dumping. Already a buy at a 9% discount coming into the day, a 50,000-share block and several smaller trades drove it down 6%. An hour later, it was down 2% and closed down 1%, but there was plenty of time in between to accumulate BKT shares at a very favorable discount.

High-yield CEFs had similar trading events in mid-July. In one dump then, for example, First Strategic High Income Fund II ( FHY), which historically traded at a premium, sold down to a 7% discount and by the end of the month had recovered to a 1% discount.

Do you have any favorite security or sectors, or any that you believe are especially expensive?

First Israel Fund ( ISL) from time to time trades expensively. This is one such time. Recently, Indonesia Fund ( IF) got carried away by a recommendation in Barron's and has been trading for several weeks at a hefty premium. There are a number of Asian funds that we can pick and choose from, and trade between, to take advantage of discount fluctuations. Indonesia Fund used to be one, but no longer is because it is so expensive.

On the other hand, Greater China Fund ( GCH) has rejoined our trading group. GCH traded at a high premium in late 2006 and early this year, but now is at a low double-digit discount along with JF China Region Fund ( JFC) and China Fund ( CHN).

I know you are deciphering discounts daily, but do you have any intermediate-term plays?

We don't have very many intermediate term plays, but one we might mention is Korea Fund ( KF). Of course, its performance will be tightly tied to the performance of the Korean market. Korea was popular with a group of emerging-market experts surveyed by Barron's last week. But what piques our interest in this one is that it has announced it will pay a sizeable capital gains distribution in November. Our experience last winter was that discounts narrow dramatically as investors try to capture large capital gains distributions. We have been accumulating shares in this name.
Before joining TheStreet.com, Gregg Greenberg was a writer and segment producer for CNBC's Closing Bell. He previously worked at FleetBoston and Lehman Brothers in their Private Client Services divisions, covering high net-worth individuals and midsize hedge funds. Greenberg attended New York University's School of Business and Economic Reporting. He also has an M.B.A. from Cornell University's Johnson School of Business, and a B.A. in history from Amherst College.