Yahoo is selling stock (so it can buy it back)

November 22, 2013, 5:00 PM UTC
Yahoo CEO Marissa Mayer

FORTUNE — Wall Street deals haven’t gotten any less convoluted since the financial crisis. We got some more evidence of that this week.

On Tuesday night, Yahoo announced it was raising $1 billion and at the same time buying back $5 billion worth of its own stock. Reporters covering the deal focused on the buyback and said the company was paying for it by selling debt. But the difference between the two numbers should have been enough of a tip-off that there was something weird going on. Why did Yahoo (YHOO) need to raise $1 billion to announce a $5 billion share buyback? Why not just announce a $4 billion share buyback, not add a billion dollars of debt, and call it a day? Yahoo didn’t say, and it didn’t return my call to answer questions.

I have been critical of companies issuing debt to do stock repurchases in the past. It’s similar to a dividend recap, and my colleague Dan Primack has had somethings to say about those deals.

MORE: 40 under 40: Yahoo’s Marissa Mayer

But here’s where the Yahoo deal gets even weirder. The technology company wasn’t raising the $1 billion by selling typical debt. It was selling a convertible bond, which is in fact something very different. A normal debt deal works like this:

  1. 1. Company wants to raise money.
  2. 2. Investors agree to lend company money at an interest rate.
  3. 3. Company pays investors interest rate plus eventually gives them their cash back.

A convertible bond often works like this:

  1. 1. Company wants to raise money but not actually pay interest.
  2. 2. Investors agree to lend company money in exchange for the ability to turn that debt into stock at a discount if the stock goes higher.
  3. 3. Stock goes higher. Company grumbles and hands investors a whole bunch of shares for less than they are worth. Investors laugh.

Catch the difference. When a company sells a convertible bond, what it’s really selling is stock, albeit not immediately, but eventually. Put it all together and here’s what you get: Yahoo announced it was selling stock in order to raise money to buy stock, which seems pretty wacky. No?

But here’s where I have to stop and tell you that none of the people I talked to on Wall Street about the Yahoo deal found anything weird about it. Unusual, slightly, but not weird. I talked to bankers not on the deal and an investor in a large credit hedge fund. All of them said the deal looked pretty fair to both sides, investors in the deal, and Yahoo. Other companies have done similar deals.

MORE: 5 reasons Yahoo is making a $1.1 billion mistake

And, indeed, the deal went off without a hitch. By Thursday morning, Yahoo had raised $1.25 billion from the deal, a quarter more than it initially expected. What’s more, the interest rate on the bonds is 0%, meaning investors were willing to give Yahoo money for free for now.

If Yahoo had done a typical bond offering, it would have cost the company about 4% a year in interest, which on $1.25 billion for five years is $150 million. The convertible is not free, though. As part of the deal, Yahoo is buying a hedge to protect it against the possibility that its stock price spikes, which, if left unhedged, would make the cost of eventually converting the debt expensive. A banker told me that Yahoo is paying around 8% of the deal for the hedge, or $100 million. And if its stock doesn’t rise, then that’s all Yahoo would owe.

And that’s less than a straight bond offering, but notice that the payment isn’t going to the same place. Instead of to investors, Yahoo’s $100 million is going to Wall Street, in this case likely JPMorgan Chase (JPM), which was the lead bank on the deal, for the hedge.

But JPMorgan isn’t getting that fee for free either. It’s taking on the other side of Yahoo’s hedge, a risk, which it will likely lay off in part by buying a derivative from someone else. In fact, according to the statement Yahoo issued on the bond, the deal could spawn a whole bunch of derivatives bought and sold by various players in the deal in order to ratchet up or lay off their risk.

MORE: Fortune’s 2013 Businesspeople of the Year

What’s more, convertible bond deals, like stock deals, typically make a company’s stock price go down. That’s because all else being equal, a company will have more shares in the future, which should lead to a lower price. Also, the fact that a company is issuing a convertible could signal that management thinks its stock isn’t likely to go up anytime soon, since that could make the convertible, at least for the company, a bad deal.

That’s why Yahoo announced the stock buyback, as cover for the convertible bond offering, to try to protect its stock price, and also to indicate that it doesn’t indeed think its stock is a bad investment. But there’s no guarantee it will end up buying $5 billion of stock. All the company has said is that it authorized that much. Yahoo said it was using $200 million of the money it raised in the convertible deal to immediately buy shares. Will it end up using the remaining $4.8 billion? I don’t know. But my guess is not anytime soon.

Warren Buffett has long said he’s not a big fan of stock buybacks. Companies would be better off investing that cash trying to expand their business and boost profits, rather than trying to do it by financial engineering. By that logic, borrowing money to do a buyback is even more foolish. Not that that’s stopping corporate America or the bankers who are handing out this advice. Debt for buyback deals happen all the time these days.

But hey, once you’ve started down the financial engineering path, just issuing some plain-vanilla debt, or better yet using the cash you already have on hand — which before this deal was $3.2 billion for Yahoo — to do a buyback, seems dumb, or at least not nearly as smart as doing stock-for-stocks deals that create derivatives that have to be passed around the financial system like a hot potatoes.

Wall Street is still weird.