In late October 2007, as the financial markets were starting to come unglued, a Goldman Sachs trader, Jonathan M. Egol, received very good news. At 37, he was named a managing director at the firm.

Mr. Egol, a Princeton graduate, had risen to prominence inside the bank by creating mortgage-related securities, named Abacus, that were at first intended to protect Goldman from investment losses if the housing market collapsed. As the market soured, Goldman created even more of these securities, enabling it to pocket huge profits.

Goldman's own clients who bought them, however, were less fortunate.

Pension funds and insurance companies lost billions of dollars on securities that they believed were solid investments, according to former Goldman employees with direct knowledge of the deals who asked not to be identified because they have confidentiality agreements with the firm.

Goldman was not the only firm that peddled these complex securities -- known as synthetic collateralized debt obligations, or CDOs -- and then made financial bets against them, called selling short in Wall Street parlance. Others that created similar securities and then bet they would fail, according to Wall Street traders, include Deutsche Bank and Morgan Stanley, as well as smaller firms like Tricadia Inc., an investment company whose parent firm was overseen by Lewis A. Sachs, who this year became a special counselor to Treasury Secretary Timothy F. Geithner.

How these disastrously performing securities were devised is now the subject of scrutiny by investigators in Congress, at the Securities and Exchange Commission, and at the Financial Industry Regulatory Authority, Wall Street's self-regulatory organization, according to people briefed on the investigations. Those involved with the inquiries declined to comment.

While the investigations are in the early phases, authorities appear to be looking at whether securities laws or rules of fair dealing were violated by firms that created and sold these mortgage-linked debt instruments and then bet against the clients who purchased them, people briefed on the matter say.

One focus of the inquiry is whether the firms creating the securities purposely helped to select especially risky mortgage-linked assets that would be most likely to crater, setting their clients up to lose billions of dollars if the housing market imploded.

Some securities packaged by Goldman and Tricadia ended up being so vulnerable that they soured within months of being created.

Goldman and other Wall Street firms maintain there is nothing improper about synthetic CDOs, saying that they typically employ many trading techniques to hedge investments and protect against losses. They add that many prudent investors often do the same. Goldman used these securities initially to offset any potential losses stemming from its positive bets on mortgage securities.

But Goldman and other firms eventually used the CDOs to place unusually large negative bets that were not mainly for hedging purposes, and investors and industry experts say that put the firms at odds with their own clients' interests.

"The simultaneous selling of securities to customers and shorting them because they believed they were going to default is the most cynical use of credit information that I have ever seen," said Sylvain R. Raynes, an expert in structured finance at R&R Consulting in New York. "When you buy protection against an event that you have a hand in causing, you are buying fire insurance on someone else's house and then committing arson."

Investment banks were not alone in reaping rich rewards by placing trades against synthetic CDOs. Some hedge funds also benefited, including Paulson & Co., according to former Goldman workers and people at other banks familiar with that firm's trading.

Michael DuVally, a Goldman Sachs spokesman, declined to make Mr. Egol available for comment. But Mr. DuVally said many of the CDOs created by Wall Street were made to satisfy client demand for such products, which the clients thought would produce profits because they had an optimistic view of the housing market. In addition, he said that clients knew Goldman might be betting against mortgages linked to the securities, and that the buyers of synthetic mortgage CDOs were large, sophisticated investors, he said.

The creation and sale of synthetic CDOs helped make the financial crisis worse than it might otherwise have been, effectively multiplying losses by providing more securities to bet against. Some $8 billion in these securities remain on the books at American International Group, the giant insurer rescued by the government in September 2008.

From 2005 through 2007, at least $108 billion in these securities was issued, according to Dealogic, a financial data firm. And the actual volume was much higher because synthetic CDOs and other customized trades are unregulated and often not reported to any financial exchange or market.

... Goldman Saw It Coming

Before the financial crisis, many investors -- large American and European banks, pension funds, insurance companies, and even some hedge funds -- failed to recognize that overextended borrowers would default on their mortgages, and they kept increasing their investments in mortgage-related securities. As the mortgage market collapsed, they suffered steep losses.

A handful of investors and Wall Street traders, however, anticipated the crisis. In 2006 Wall Street had introduced a new index, called the ABX, that became a way to invest in the direction of mortgage securities. The index allowed traders to bet on or against pools of mortgages with different risk characteristics, just as stock indexes enable traders to bet on whether the overall stock market, or technology stocks or bank stocks, will go up or down.

Goldman, among others on Wall Street, has said since the collapse that it made big money by using the ABX to bet against the housing market. Worried about a housing bubble, top Goldman executives decided in December 2006 to change the firm's overall stance on the mortgage market, from positive to negative, though it did not disclose that publicly.

Even before then, however, pockets of the investment bank had also started using CDOs to place bets against mortgage securities, in some cases to hedge the firm's mortgage investments, as protection against a fall in housing prices and an increase in defaults.

Mr. Egol was a prime mover behind these securities. Beginning in 2004, with housing prices soaring and the mortgage mania in full swing, Mr. Egol began creating the deals known as Abacus. From 2004 to 2008, Goldman issued 25 Abacus deals, according to Bloomberg, with a total value of $10.9 billion.

Abacus allowed investors to bet for or against the mortgage securities that were linked to the deal. The CDOs didn't contain actual mortgages. Instead, they consisted of credit-default swaps, a type of insurance that pays out when a borrower defaults. These swaps made it much easier to place large bets on mortgage failures.

Rather than persuading his customers to make negative bets on Abacus, Mr. Egol kept most of these wagers for his firm, said five former Goldman employees who spoke on the condition of anonymity. On occasion, he allowed some hedge funds to take some of the short trades.

Mr. Egol and Fabrice Tourre, a French trader at Goldman, were aggressive from the start in trying to make the assets in Abacus deals look better than they were, according to notes taken by a Wall Street investor during a phone call with Mr. Tourre and another Goldman employee in May 2005.

On the call, the two traders noted that they were trying to persuade analysts at Moody's Investors Service, a credit rating agency, to assign a higher rating to one part of an Abacus CDO but were having trouble, according to the investor's notes, which were provided by a colleague who asked for anonymity because he was not authorized to release them. Goldman declined to discuss the selection of the assets in the CDOs, but a spokesman said investors could have rejected the CDO if they did not like the assets.

Goldman's bets against the performances of the Abacus CDOs were not worth much in 2005 and 2006, but they soared in value in 2007 and 2008 when the mortgage market collapsed. The trades gave Mr. Egol a higher profile at the bank, and he was among a group promoted to managing director on Oct. 24, 2007.

"Egol and Fabrice were way ahead of their time," said one of the former Goldman workers. "They saw the writing on the wall in this market as early as 2005." By creating the Abacus CDOs, they helped protect Goldman against losses that others would suffer.

As early as the summer of 2006, Goldman's sales desk began marketing short bets using the ABX index to hedge funds like Paulson & Co., Magnetar, and Soros Fund Management, which invests for the billionaire George Soros. John Paulson, the founder of Paulson & Co., also would later take some of the shorts from the Abacus deals, helping him profit when mortgage bonds collapsed. He declined to comment.

... A Deal Gone Bad, for Some

The woeful performance of some CDOs issued by Goldman made them ideal for betting against. As of September 2007, for example, just five months after Goldman had sold a new Abacus CDO, the ratings on 84 percent of the mortgages underlying it had been downgraded, indicating growing concerns about borrowers' ability to repay the loans, according to research from UBS, the big Swiss bank. Of more than 500 CDOs analyzed by UBS, only two were worse than the Abacus deal.

Goldman created other mortgage-linked CDOs that performed poorly too. One, in October 2006, was a $800 million CDO known as Hudson Mezzanine. It included credit insurance on mortgage and subprime mortgage bonds that were in the ABX index; Hudson buyers would make money if the housing market stayed healthy -- but lose money if it collapsed. Goldman kept a significant amount of the financial bets against securities in Hudson, so it would profit if they failed, according to three of the former Goldman employees.

A Goldman salesman involved in Hudson said the deal was one of the earliest in which outside investors raised questions about Goldman's incentives. "Here we are selling this, but we think the market is going the other way," he said.

A hedge fund investor in Hudson, who spoke on the condition of anonymity, said that because Goldman was betting against the deal, he wondered whether the bank built Hudson with "bonds they really think are going to get into trouble."

Indeed, Hudson investors suffered large losses. In March 2008, just 18 months after Goldman created that CDO, so many borrowers had defaulted that holders of the security paid out about $310 million to Goldman and others who had bet against it, according to correspondence sent to Hudson investors.

The Goldman salesman said that CDO buyers were not misled because they were advised that Goldman was placing large bets against the securities. "We were very open with all the risks that we thought we sold. When you're facing a tidal wave of people who want to invest, it's hard to stop them," he said. The salesman added that investors could have placed bets against Abacus and similar CDOs if they had wanted to.

A Goldman spokesman said the firm's negative bets didn't keep it from suffering losses on its mortgage assets, taking $1.7 billion in write-downs on them in 2008; but he would not say how much the bank had since earned on its short positions, which former Goldman workers say will be far more lucrative over time. For instance, Goldman profited to the tune of $1.5 billion from one series of mortgage-related trades by Mr. Egol with Wall Street rival Morgan Stanley, which had to book a steep loss, according to people at both firms.

Tetsuya Ishikawa, a salesman on several Abacus and Hudson deals, left Goldman and later published a novel, "How I Caused the Credit Crunch." In it, he wrote that bankers deserted their clients who had bought mortgage bonds when that market collapsed: "We had moved on to hurting others in our quest for self-preservation." Mr. Ishikawa, who now works for another financial firm in London, declined to comment on his work at Goldman.

... Profits From a Collapse

Just as synthetic CDOs began growing rapidly, some Wall Street banks pushed for technical modifications governing how they worked in ways that made it possible for CDOs to expand even faster, and also tilted the playing field in favor of banks and hedge funds that bet against CDOs, according to investors.

In early 2005, a group of prominent traders met at Deutsche Bank's office in New York and drew up a new system, called Pay as You Go. This meant the insurance for those betting against mortgages would pay out more quickly. The traders then went to the International Swaps and Derivatives Association, the group that governs trading in derivatives like CDOs. The new system was presented as a fait accompli, and adopted.

Other changes also increased the likelihood that investors would suffer losses if the mortgage market tanked. Previously, investors took losses only in certain dire "credit events," as when the mortgages associated with the CDO defaulted or their issuers went bankrupt.

But the new rules meant that CDO holders would have to make payments to short sellers under less onerous outcomes, or "triggers," like a ratings downgrade on a bond. This meant that anyone who bet against a CDO could collect on the bet more easily.

"In the early deals you see none of these triggers," said one investor who asked for anonymity to preserve relationships. "These things were built in to provide the dealers with a big payoff when something bad happened."

Banks also set up ever more complex deals that favored those betting against CDOs. Morgan Stanley established a series of CDOs named after United States presidents (Buchanan and Jackson) with an unusual feature: short-sellers could lock in very cheap bets against mortgages, even beyond the life of the mortgage bonds. It was akin to allowing someone paying a low insurance premium for coverage on one automobile to pay the same on another one even if premiums over all had increased because of high accident rates.

At Goldman, Mr. Egol structured some Abacus deals in a way that enabled those betting on a mortgage-market collapse to multiply the value of their bets, to as much as six or seven times the face value of those CDOs. When the mortgage market tumbled, this meant bigger profits for Goldman and other short sellers -- and bigger losses for other investors.

... Selling Bad Debt

Other Wall Street firms also created risky mortgage-related securities that they bet against.

At Deutsche Bank, the point man on betting against the mortgage market was Greg Lippmann, a trader. Mr. Lippmann made his pitch to select hedge fund clients, arguing they should short the mortgage market. He sometimes distributed a T-shirt that read "I'm Short Your House!!!" in black and red letters.

Deutsche, which declined to comment, at the same time was selling synthetic CDOs to its clients, and those deals created more short-selling opportunities for traders like Mr. Lippmann.

Among the most aggressive CDO creators was Tricadia, a management company that was a unit of Mariner Investment Group. Until he became a senior adviser to the Treasury secretary early this year, Lewis Sachs was Mariner's vice chairman. Mr. Sachs oversaw about 20 portfolios there, including Tricadia, and its documents also show that Mr. Sachs sat atop the firm's CDO management committee.

From 2003 to 2007, Tricadia issued 14 mortgage-linked C.D.O.’s, which it called TABS. Even when the market was starting to implode, Tricadia continued to create TABS deals in early 2007 to sell to investors. The deal documents referring to conflicts of interest stated that affiliates and clients of Tricadia might place bets against the types of securities in the TABS deal.

Even so, the sales material also boasted that the mortgages linked to CDOs had historically low default rates, citing a "recently completed" study by Standard & Poor's ratings agency -- though fine print indicated that the date of the study was September 2002, almost five years earlier.

At a financial symposium in New York in September 2006, Michael Barnes, the co-head of Tricadia, described how a hedge fund could put on a negative mortgage bet by shorting assets to CDO investors, according to his presentation, which was reviewed by The New York Times.

Mr. Barnes declined to comment. James E. McKee, general counsel at Tricadia, said, "Tricadia has never shorted assets into the TABS deals, and Tricadia has always acted in the best interests of its clients and investors."

Mr. Sachs, through a spokesman at the Treasury Department, declined to comment.

Like investors in some of Goldman's Abacus deals, buyers of some TABS experienced heavy losses. By the end of 2007, UBS research showed that two TABS deals were the eighth- and ninth-worst performing CDOs. Both had been downgraded on at least 75 percent of their associated assets within a year of being issued.

Tricadia's hedge fund did far better, earning roughly a 50 percent return in 2007 and similar profits in 2008, in part from the short bets.
* * *