Fannie Mae and Freddie Mac have a friend on West 57th Street. That’s the New York address of Metacapital Management, the hedge fund founded by Deepak Narula.

The much-maligned mortgage aggregators were taken over by the federal government in 2008 and have since absorbed $140 billion in taxpayer bailout money. The head of the House Financial Services Committee wants to abolish them. Yet they still own or guarantee more than half of all U.S. housing loans — and for that reason, the administration of President Obama isn’t about to let them go belly up.

Narula, 49, has used Fannie and Freddie to build the world’s most successful hedge fund. His Metacapital Mortgage Opportunities Fund, which invests heavily in agency mortgages, returned 37.8 percent in the first 10 months of 2012, putting it at the top of the Bloomberg Markets list of the 100 best-performing hedge funds managing $1 billion or more. That comes on top of a 23.6 percent return in 2011. The Mortgage Opportunities fund is up 520 percent since it started trading in July 2008.

Three of the top five funds in the Bloomberg Markets list invested in mortgage securities, and two of them are run by Pine River Capital Management. Betting on mortgage securities outpaced every other strategy, with an average return of 20.2 percent, against an industry average of just 1.3 percent.

The most profitable fund in the first 10 months of 2012 was Steven A. Cohen’s SAC Capital International, which earned $789.5 million for its managers. In November, the Securities and Exchange Commission notified Cohen’s $14 billion firm, SAC Capital Advisors, that it was considering suing it for civil fraud related to insider trading.

Narula’s edge in 2012 was in reading the tea leaves of Washington policymakers. Toward the end of 2011, government-backed mortgage securities dropped in value as Obama expanded programs to help owners refinance and bonds without insurance fell amid the euro crisis.

Narula took advantage. He later concluded that the Federal Reserve was going to help homeowners and bought bonds ahead of its September announcement that it would buy $40 billion a month of agency — that is, Fannie-, Freddie- and Ginnie Mae-backed — mortgage bonds.

Following the Fed

“To revive the housing market, the Fed has thrown a lot of firepower at agency mortgage-backed securities,” Narula says. “Policymakers have worked hard to let homeowners refinance. They’ve been clear that’s their mission — and you want to be careful going against that mission.”

In addition to his intuition on Washington policy moves, Narula uses mathematical models to calculate how long homeowners will make payments at their current interest rates before refinancing or defaulting. The models predict behavior based on a homeowner’s credit score, address, loan size, loan age and other factors. The algorithms also allow sophisticated investors to hedge against wrong-way bets.

“You want to come up with wagers where if you’re right, you’ll do really well and if you are wrong, you don’t get hurt too badly,” Narula says.

No. 1 Metacapital is followed on the list by Steve Kuhn’s Pine River Fixed Income Fund, which also invests in mortgage bonds and returned 32.9 percent. Pine River captured Nos. 2 and 4 and tied for 19.

The No. 1 midsize fund, with assets from $250 million to $1 billion, is Cheyne Total Return Credit, operated by London-based Cheyne Capital Management. It boasted a 61.4 percent return.

Hedge underperformance

Those big gains came amid a fourth consecutive year of underperformance by hedge funds. The average return of 1.3 percent compared with a 14 percent gain, including dividends, for the Standard & Poor’s 500 Index through October.

Since Jan. 1, 2009, the average hedge fund gained a cumulative 13.5 percent compared with 69.8 percent for the S&P 500.

“Hedge funds probably oversold themselves for a long time, saying we’re going to get stocklike returns with lower volatility,” says Andrew Junkin, senior consultant at Wilshire Associates, which advises pension plans. “Then 2008 comes and blows those two myths out of the water. We compare their returns to 60/40 stocks and bonds, and over the last five years I’m paying a lot of money for something that really has not delivered.”

Poor returns forced an estimated 635 hedge funds to close in the first nine months of 2012, 8.5 percent more than a year earlier, according to Chicago-based Hedge Fund Research. Some big-name managers threw in the towel. Thomas F. Steyer, founder of $20 billion hedge fund Farallon Capital Management in San Francisco, retired at the end of 2012 to focus on public service. Boston Red Sox co-owner and hedge-fund manager John Henry closed his Florida-based John W. Henry & Co. and returned assets to investors.

Other titans also returned money. In August, Moore Capital Management founder Louis Moore Bacon said he would give back $2 billion, or 25 percent, of his flagship hedge fund’s assets because he couldn’t achieve the returns he had historically produced.

Narula attributes his success to long years of studying the bond markets. The son of an Indian diplomat, he earned an engineering degree from the Indian Institute of Technology in Kanpur, one of the country’s top schools. His real interest, however, was finance, and in 1985 he enrolled at Columbia Business School in New York, where he earned a PhD in management science while also studying finance. He then spent 11 years as a mortgage bond analyst and trader at Lehman Brothers Holdings.

Narula started Metacapital in 2002 with $15 million from friends and his own savings. In that year, he gained 17 percent while the S&P 500 fell 23 percent. Investors came running.

Narula saw the danger in the market for subprime mortgages as early as 2005 and started shorting them. His fund suffered when valuations kept rising, and investors headed for the door. In 2006, Narula returned $500 million, and in 2007 he closed the fund.

“We had the right idea in shorting the subprime,” he says, waving his arm in the direction of his 12-member team sitting in front of computer terminals in his sparsely furnished Manhattan office. “If you are too early, you are wrong.”

Narula launched his Mortgage Opportunities Fund in 2008 and has thrived on buying and selling agency-backed mortgages while keeping a close eye on the Fed.

“The Fed’s mission is to drive down the 30-year mortgage rate,” Narula says.

Mortgage merry-go-round

In the past five years, he has devised a series of trades to take advantage. In the third quarter of 2008, anticipating government intervention in the mortgage market, he bought agency bonds that were backed by 30-year mortgages while simultaneously selling U.S. Treasury securities. After agency mortgage prices had risen, he closed the trade, shorted 30-year mortgage bonds and bought 15-year bonds. At the end of 2011, he switched to buying 30-year mortgage bonds in anticipation of further government buying.

Beyond his Fed watch, Narula has geared up his algorithms to anticipate what homeowners will — and won’t — do. Because housing values have fallen and banks are stingy with new loans, many haven’t been able to respond to low interest rates by refinancing, even with new government programs.

“Betting that homeowners will not be refinancing has been a winning wager,” Narula says.

Pine River’s Steve Kuhn churns through massive amounts of data to determine which bonds to bet on.

“Everyone has the same research, but it depends on how you look at it,” Kuhn, 43, says.

Kuhn’s analysis persuaded him to bet on subprime mortgages.

“The best trade in 2012 was being long subprime,” says Kuhn, who has an economics degree from Harvard University. “It’s nice to be right about that one.”

In November 2011, Pine River bought subprime-mortgage-backed bonds as cheaply as 42 cents on the dollar. A year later, they had risen to 72 cents. Pine River reduced its subprime holdings through 2012, as other investors poured into the market.

“We like to say some of the new entrants are going to pay a tuition price,” he says. “They don’t know the market as well as we do.”

A Minneapolis native, Kuhn is well traveled. He started out trading municipal bonds at Piper Jaffray Cos. before working at commodities giant Cargill, Chicago-based hedge fund Citadel and, starting in 2002, Goldman Sachs Group. In 2005, Goldman sent him to China to educate staffers of sovereign-wealth funds and the central bank on the U.S. mortgage market. While there, he also taught finance to students at Tsinghua and Peking universities.

China connection

At Pine River, he has taken advantage of his Chinese connection. The firm opened an office in Beijing in 2010 that employs a squad of 33 quantitative analysts and software developers.

Kuhn was hired at Pine River in 2008, joining fellow Minnesotan Brian Taylor, who founded the firm in 2002 after spending 14 years at Minnetonka hedge fund EBF & Associates. Pine River, which also has offices in New York, is named after a town in Minnesota close to where Taylor has a lake house.

Kuhn plays in markets where Narula has a smaller footprint. He buys and sells non-agency mortgage bonds — that is, those not bought or backed by Fannie and Freddie. He uses several stratagems to hedge against a decline in their value.

Data mining

To determine which securities to buy, Kuhn and his team analyze massive amounts of data on servicers and borrowers, from credit scores and loan age to Zip codes and income.

Kuhn is now cutting his holdings in the subprime mortgage market. Narula, by contrast, thinks he can glean hefty returns from agency bonds for several more years.

Others think the game is just about up.

“Our expectations are much more muted,” says John C. Bailey, chief executive officer at Spruce Private Investors in Stamford, Conn., which advises clients on alternative investments. “The easy money’s been made.”

The full version of this Bloomberg Markets story appears in the magazine’s February issue.