When it comes to investing, disaster looks a lot like opportunity.

Coming out of the housing crash, many of the firms propping up the sub-prime mortgage industry made for the exits, eager to get the ailing assets off their balance sheets. Hoping to fill the power vacuum left behind, Two Harbors Investment (NYSE:TWO) was incorporated on May 21, 2009.

The company was willing to fight the herd mentality of the market and walk against the crowd. It's a strategy that continues to serve them well.

At the end of last year, a wholly owned subsidiary of Two Harbors bought a firm that is eligible to administrate loans that are securitized by the Federal National Mortgage Association (Fannie Mae) or the Federal Home Loan Mortgage Corporation (Freddie Mac). The acquisition represents an important shift in Two Harbors' comparative advantage. 

Let's take a look. 

A harbor overrun by pines
The story of Two Harbors Investments (NYSE:TWO) actually begins before its inception. The real estate income trust (REIT) is the brainchild of Pine Rivers Capital Management, a limited partnership company named after a small town in Minnesota.

When Two Harbors was formed in 2009, Pine River was listed as the sole shareholder.

To beef up their balance sheet, the still-privately owned Two Harbors absorbed Capitol Acquisition Corp and their $500 million in residential mortgage-backed securities. It's a competitive market for young upstarts, especially ones looking for high-quality assets, so the company has had to be aggressive in expansion.Aside from a handful of independent directors on the Board, Two Harbors is managed and operated by PRCM Advisors, an arm of Pine River. Everyone from the chairman down is employed and paid by PRCM, putting a low ceiling on the firm's labor costs.

Since it's established as a REIT, Two Harbors is obliged to pay out at least 90% of its income to shareholders in the form of dividends. So as the economy continues its slow march back to health, investors of pass through entities like Two Harbors can expect a steady stream of income. 

Steady but flexible
Agency loans are a staple in every REIT's portfolio, but Two Harbors' competitive advantage -- what makes them more attractive than their peers -- has been in the sub-prime market. 

At the end of 2009, the company picked up huge pools of non-agency RMBS at steep discounts. Sub-primes were the most distressed assets you could find at the time, also making them the most lucrative. Betting that prices had already hit rock bottom, Two Harbors raised their sub-prime exposure (as a percentage of their non-agency portfolio) from 48% to 84% in just one year (2011-2012).

Over that period, the wqaverage quarterly return on non-agency loans doubled that of their federally insured counterparts. 

But the landscape looked different by 2013. Wary of an inevitable end to the Fed's bond buying program, Two Harbors adapted their strategy. In a sale that would have dropped every bargain hunter's jaw, the company bought mortgage servicing rights (MSRs) on a mortgage pool worth $40 billion. They paid just $500 million.

Of course, much of the outstanding principal will never be paid back, but the fraction of financially sound borrowers is estimated at 29%. That's still about $11.2 billion, or more than 22 times the purchase price. 

Many of the larger market players in the mortgage business, such as the commercial banks, have been mired in litigation over past lending practices. While Citigroup, JP Morgan, and the rest were negotiating with regulators, Two Harbors cleverly pressed their advantage on sub-primes.

Now that a new wave of optimism is sweeping the industry, lenders are looking to reignite mortgage originations. But the very fact that it's a trend makes it likely to be overpriced.

The Foolish Bottom Line
Moving with the "bulls" is still a herd mentality, so I like companies that look for diamonds in the rough. Two Harbors is consistently cost conscious in what they buy and when they buy it; in part because they people who work there -- all Pine River staff, remember -- built the company from the ground up. If you're in it for the long haul, that's the kind of company to bet on.