It's been a rough year for mortgage REITs. In 2013, virtually all mREITs slashed their dividends. Many now trade below book value.

For the second-largest mREIT, American Capital Agency Corp. (NASDAQ:AGNC), weathering the taper talk hasn't been easy. But as trading closed on Wednesday, American Capital Agency revealed a big surprise: huge repurchases, and a decent dividend.

What's up with American Capital Agency?
The best way to describe American Capital Agency's 2013 is "derisking." The company worked to move its investments from 30-year mortgage backed securities to 15-year MBSes. In doing so, the company reduced its interest rate exposure, stating in a presentation that 15-year mortgages levered 9 times were as sensitive as 30-year mortgages levered only 6 times.

Now it's positioned to ride through interest rate hikes, but investors aren't buying it. In fact, American Capital Agency is presumably the biggest buyer of its own shares. The company announced that it bought back 7% of its shares in the last quarter.

Why buybacks make sense
Mortgage REITs are a very simple business. They borrow cheap funds to invest in mortgage-backed securities and pay out big dividends to avoid corporate income taxes.

Thus, at any one time, mREITs have a simple choice: Reinvest funds into new MBSes or simply buy back stock. When mREITs trade below book value, it makes much more sense to buy back shares at a discount than to make new investments in new mortgage-backed securities at full price. In essence, share repurchases allow a mortgage REIT to buy MBSes at a discount.

How it's paying for repurchases
There's no way to know with certainty how American Capital Agency is capable of buying back 7% of its shares in any given quarter. But, if I had to guess prior to the next earnings release, it probably wasn't from prepayments. The bulk likely came from profit-taking on its interest rate hedges, or selling mortgages in its portfolio to buy back shares less expensively.

American Capital Agency last reported that its constant prepayment rate was 10%, meaning about 10% of its mortgage balances are prepaid in any given year, usually because of refinancing.

In recent months, refinancing has fallen off a cliff as rates have moved higher. So, it's unlikely that its mortgages are being prepaid any faster today with rates at 4.5% than they were when mortgage rates were 3.5%. American Capital Agency is undoubtedly selling something -- either profitable hedges, or some of its MBS portfolio -- to buy back stock. So long as the company trades below book value, American Capital Agency should sell MBSes to buy back shares.

Financial engineering that pays off for shareholders
Financial engineering gets a bad rap, but when American Capital Agency can sell MBSes at full price and buy substantially similar MBSes by buying back its own stock, it's an obvious move to make.

If the discount to book value persists, American Capital Agency could make a mint for its shareholders, who will enjoy the prospect of owning more and more mortgages at a discount to their fair market value. Over time, American Capital Agency can simply sell off its MBSes and buy back stock, compounding book value in the process.

With an implied yield of 13% from its announcement of a $0.65 per share dividend, repurchases clearly aren't eating up the potential for big dividends, which is, after all, the reason most people buy mREITs in the first place.