Goldman Sachs had itself one of those patented bouts of good luck that you only see on Wall Street - for one reason or another.

The investment banking giant reportedly was in the market buying up mortgage bonds during the panic selling that hit markets last month, ostensibly before the Fed came out and said they were going to backstop every industry and every market.

The bet has "certainly made money since the Federal Reserve unveiled massive stimulus turning a crash into a rally," according to Bloomberg.

Goldman was buying mortgage backed securities from funds that were deleveraging and were being forced to sell. Goldman charged a fee for helping other banks and funds exit their positions, as the bank was offering other parties in distress a quick way to free up cash and "escape margin calls".

Goldman was able to stock its coffers because of how leveraged the mortgage bond market is. Sharp drops in asset values lead to quick margin calls and forced liquidations. The move was so sharp over the last two months that some margin calls couldn't be met, resulting in several REITs asking counterparties for forbearance agreements.

Goldman swears that all it was doing was making a market and that it would have been able to find buyers for the bonds in relatively short order. The only question is whether or not they thought that "buyer" would be the Fed.

Goldman Sachs said in a statement: “Making markets -- buying from or selling to our clients -- is the core activity of our Global Markets division, and we do it regardless of markets conditions. We had no advance knowledge of any of the facilities the Fed announced and assumed risk when we bought securities from clients during this period.”

For now, the bet just looks to have been "well timed". The Fed stepped in soon thereafter and calmed the markets when it committed to buying unlimited amounts of Treasury bonds and mortgage securities. Goldman, in turn, sold some notes to the Fed.

One Bloomberg index shows theses mortgage bonds rising 3% over the last month. A Markit iBoxx benchmark of non-agency securities rose 14%.

Goldman also reportedly executed several large trades with key clients and approached several other structured credit hedge funds to seek out trades. The bank has seen a trading increase of about 75% as of early April.