This article was originally published on RealMoney on Thursday, April 9. For a free trial to RealMoney , click here.

Did Goldman Sachs ( GS) really make out like a bandit on the AIG ( AIG) bailout, as has endlessly been reported by the media? Lately there has been so much misguided and reckless commentary about AIG being a "backdoor bailout" of Goldman and other firms that I feel the need to add my two cents' worth.

As most readers know, I am a proud Goldman alumnus, so I will save the "Goldman taking over the world" conspiracy theorists some time: If you believe in that nonsense, you can stop reading now, though I believe you are doing yourself a disservice by ignoring the actual story. I believe I have proven that I speak my own mind on enough topics that maybe we can invest the time to explore this situation a little further, speak about facts a little more accurately and not jump to conclusions based on a sound bite.

Goldman's CFO, David Viniar, hosted a call a couple of weeks ago on this topic, so I am surprised people continue to rant about this, but I will attempt to add some color. I am going to use rough numbers here, rounding to the nearest billion -- this is about the "forest" and not the "trees." It was reported that Goldman received a total of $13 billion after the AIG government intervention. This was in three large buckets, which we will examine in turn.

The first bucket consisted of about $5 billion as a result of a securities lending unwind. Most people are familiar with the concept of margin accounts and borrowing and lending stock. If you have a margin account, you have likely signed a hypothecation agreement, which says that the stock you hold can be lent out to others.

In the bond market, the lending of securities is a highly negotiated process. Institutions will lend out their own portfolios for various terms, rates and time frames. In exchange, they get money back, typically lent at an advantageous rate, so that the securities lender can in turn reinvest that money in the money markets and earn a spread. These lenders of bonds typically over-collateralize their counterparties by anywhere from a half a percent to upwards of 10% or 20%, on the basis of the riskiness of the bonds they lend, and that collateral is marked to market to protect the cash lender.

Technically, the securities lending programs are executed through what is known as a repurchase agreement (or "repo"). One party sells the securities to the other and agrees to buy them back at a price that imputes a loan rate for the cash. Repo is what makes the whole government bond market work. For those of you who speculate in the TBT, or ProShares UltraShort 20+ Treasury ( TBT), this is how you are able to borrow the bonds you are shorting.

So, returning to this first $5 billion, this was a securities lending program unwind. Goldman received $5 billion in cash that had been previously lent to AIG, and returned $5 billion in government and agency securities to AIG, which AIG had pledged via repo. If AIG did not pay the loan back, Goldman was free to liquidate the collateral it held -- whether AIG was in bankruptcy or not, as per the terms of the standard repo docs. So to not pay back the money would have simply meant that Goldman would have liquidated the bonds it held as collateral in order to get its money back. This is a total non-event.

The second bucket was $3 billion of new mark-to-market collateral posted vs. existing trades. I know there are people who think that AIG FP was a bunch of scheming "Dr. Evils," but that simply isn't the case. These folks may have been incredibly naive in not thinking about the amount of risk they were amassing, but they were not out to sink their firm or the world's financial system.

What AIG did was basically write what it thought to be way-out-of-the-money put options on investment-grade credit (and as we have seen, it wrote way too many of these way-out-of-the-money put options...). As these options increased in value, either because "vol" had effectively increased or because we had gotten a little closer to the OTM strike, AIG was required to post collateral to reflect the mark-to-market differential. If the market goes the other way, or if these trades expire without triggering, AIG will get that money back. (Note: In some cases, AIG may have ultimately chosen to unwind these trades to limit potential exposure.)

To interfere with contractual collateral posting mechanisms, and suggest that AIG shouldn't pay, is simply not thinking through the situation. Think of what that would imply for collateral posting mechanisms more broadly. The posting of collateral is a key risk mitigant that enables the credit markets to function. What would happen to mortgage rates if the banks had to consider that they may not have their loan secured by the collateral of the house and had to solely rely on the ability of the borrower to repay on the basis of credit score alone ... are people prepared to buy homes at credit card rates?

What about corporate bank loans? If the bank couldn't rely on having security, what happens to corporate liquidity? What do you think would happen with margin accounts? The ability to short stock would go away, because margin lending would cease. You think we are in a credit crunch now, just wait until people start interfering with collateral posting mechanisms.

The last bucket was $5 billion associated with the Maiden Lane III transaction arranged for AIG by the Federal Reserve. Maiden Lane was a way for AIG to liquefy exposure it already had on its books.

Let's take a quick step back for a short tutorial on credit default swaps (CDS) so that we are on the same page when discussing Maiden Lane. (Note: Changes are taking place this week in the triggering and pricing of CDS, but what is described here is applicable in the context of this discussion.) A basic CDS contract is an agreement between two parties where one offers to "protect" the other on the default of a bond (or set of bonds) in exchange for premium payments. When triggered, the contract is settled by the protection buyer delivering the bonds to the protection seller in exchange for a par payment. Default is typically defined as 1) bankruptcy, 2) failure to pay, or 3) some concept of debt restructuring.

Either party can trigger the contract. This is an important feature. Why would a seller of protection trigger a contract? Let's say Company XYZ restructures its debt. The protection seller may feel that he is better off taking a small hit now by triggering the contract than he would be by waiting around for an actual bankruptcy to occur. Of course, he could always unwind the contract, but sometimes the bid/ask is so wide that the best dispute resolution is to trigger the contract -- and the physical settlement has a way of keeping things honest, just as in commodities futures.

AIG had written CDS protection on a variety of multi-sector asset-backed securities CDOs (collateralized debt obligations). These were derivative trades, based on the performance of underlying cash bonds. So if AIG wrote protection on bond ABC, it was on the hook to pay par should that bond default. As the risk was on the books in derivative form, the best AIG could do was ride out the storm -- it did not control the destiny of these positions as physical security holders. Maiden Lane sought to terminate these contracts by buying the underlying cash bonds and thus have more optionality in the resolution of these assets.

Maiden Lane was in effect an early triggering of all these contracts -- a trigger not caused by a credit default event but outside of the scope of the contract. The counterparties were paid par in exchange for delivering the bonds. In most cases, AIG had already posted collateral against these trades, so upon delivery it was paid par less the value of collateral previously posted.

AIG (through Maiden Lane) now possesses the bonds that it insured. It is in a much more controlling position with regard to its destiny. The company no longer has to "let it ride" and can decide whether it likes the risk/reward of each position and whether to "hold 'em" or "fold 'em." It has physical assets that it can monetize at any time should cash need to be raised -- and indeed, as Debra Borchardt reported Wednesday, some Maiden Lane assets may end up getting sold into the Public Private Investment Program, or PPIP.

Now, many people have suggested that the counterparties should have taken a haircut. But keep in mind, AIG did get to liquefy its risk outside the scope of the contract, and it isn't like a total gift was bestowed upon the counterparties, either.

The counterparties had to deliver the actual bonds to AIG/Maiden Lane and tear up the contracts. If the counterparty did not hold the bond, it had to go out in the open market and buy that bond. The tearing up of the contract could have had actual costs to the counterparties.

Let's say I owned bond ABC as the result of facilitating a customer trade, but couldn't find protection or a market on ABC. But I could buy protection on bond XYZ that looks very similar to bond ABC, so I used the XYZ protection as my hedge. Now, by entering into the Maiden Lane deal, I have lost my XYZ protection. Yes, I may have been paid for some of the mark-to-market deterioration, but what if it gets worse? I no longer have my hedge. Now I need to go out and find a replacement hedge, and there are friction costs there, or I need to bear the risk of further market weakness.

Liquidity in the fixed-income markets relies on the ability of dealers to take principal risk. They are enabled to take principal risk by being able to hedge risk. When the ability to hedge is diminished, liquidity dries up. While some people may think Maiden Lane was a one-way street, in actuality there was give and take on both sides.

So could we have allowed AIG to fail? Not without a price -- a price we got an inkling of when Lehman failed. That was the whole purpose of the AIG intervention to begin with: to ensure the (semi) orderly functioning of markets, and to prevent an already vulnerable system from suffering a massive shock. This was the defusing of a bomb so that no further damage was done. We did so by having AIG be a viable, but unwinding, entity.

You have seen the roughly $13 billion Goldman received from AIG. Bucket one was return of collateral for return of cash lent. Bucket two was collateral posted based on market values. Bucket three was a transaction that unwound trades -- at a cost to both parties. Two of the buckets were unwinds of trades where bonds were exchanged for cash, and the third was posting of collateral that may very well be returned, depending on the future course of asset performance.

None of this should be controversial; this was not a gift of money from the taxpayer to the counterparty -- in fact, it allowed for the unwind of AIG in an orderly manner, a manner which protected the taxpayer's 80% stake in AIG. Maybe now we can drop the showboating witch hunt and perhaps focus on issues that have some validity.

Know What You Own: In midday trading on Thursday, the most active stocks included Bank of America ( BAC), Citigroup ( C), Wells Fargo ( WFC), the Financial Bull 3X ( FAS), the SPY Depositary Receipts ( SPY), the Financial Select SPDR ( NYSE) and Ford Motor ( F).
At the time of publication, Oberg was long Goldman Sachs.

Eric Oberg worked in fixed income, currencies and commodities for Goldman Sachs for 17 years before retiring as a managing director.

If you liked this article you might like

Patriarch Partners Founder : "I Bought a Tesla and Took it Apart Piece by Piece"

Patriarch Partners Founder : "I Bought a Tesla and Took it Apart Piece by Piece"

Here Are the Biggest Losers Monday From Each Major Index

Here Are the Biggest Losers Monday From Each Major Index

Patriarch Partners Founder Lynn Tilton: This Is My Story

Patriarch Partners Founder Lynn Tilton: This Is My Story



Warren Buffett Loves Quietly Using These Financial Weapons of Mass Destruction

Warren Buffett Loves Quietly Using These Financial Weapons of Mass Destruction