The bond rating agencies are treating corporate debt even worse now than they did during the last recession, mostly because of junk bonds that look as if they may go bad.

In the first half of this year, Moody's Investors Service downgraded 217 companies, affecting $235 billion of debt. It upgraded only 52 companies, covering $50.5 billion in debt. For every company upgraded, 4.2 were downgraded. In the 1982 recession year, that ratio was 2.8-to-1.

Moody's gives two reasons for all these downgrades: the increase in questionable real estate loans that has affected banks and thrifts and the "diminished standing of thinly protected speculative-grade issuers." Speculative grade is the formal classification of what's commonly called junk; that means it's getting even junkier.

There were 116 downgrades of speculative-grade paper ($52.1 billion), compared with 22 upgrades of such bonds ($6.3 billion). That's a ratio of 5.3-to-1 for the first half of the year, compared with 1989's 2.4-to-1 ratio. Those 116 issues account for more than half of the downgrades in the period.

The Bond Investors Association reported that during the first half of 1990, only 22 new junk issues were marketed, totaling $2.7 billion, a considerable drop from the $30 billion sold over the same period in 1989. The association also said that it anticipates bond defaults will total $20 billion this year. Some large defaults so far have included Federated Department Stores, CenTrust Bank, Ames Department Stores, Western Union Corp. and Southland Corp.

It is interesting to note that it's the lower-rated speculative-grade issues that have been downgraded most frequently. This is easy to understand, since they have the least earnings to cover their debt. It should come as no surprise that during the first half of 1990, Moody's lowered 48 companies to Caa (close to, or near default). This compares with 50 for all of 1989. It looks as if the dire warnings of the anti-junk bond crowd are coming to pass.