Radian Group Inc. Notes to Consolidated Financial Statements - (Continued) Under the Second Quota Share Reinsurance  Transaction, for the year ended  December 31, 2012, ceded premiums written  were $9.6 million and ceded premiums earned were $0.5 million. Ceding commissions earned under the Second Quota Share  Reinsurance Transaction for the year ended  December 31, 2012 were $3.4 million. We and other companies in the mortgage insurance industry have participated in reinsurance arrangements with mortgage  lenders commonly referred to as “captive reinsurance arrangements.” Under captive reinsurance arrangements, a mortgage  lender typically established a reinsurance company that assumed part of the risk associated with the portfolio of that lender ’s  mortgages insured by us on a flow basis (as compared to mortgages insured in structured transactions, which typically are not  eligible for captive reinsurance arrangements). In return for the reinsurance company’ s assumption of a portion of the risk, we  ceded a portion of the mortgage insurance premiums paid to us to the reinsurance company . The captive reinsurers are typically  required to maintain minimum capitalization equal to  10% of the risk assumed. We have also participated, on a limited basis, in  “quota share” captive reinsurance agreements under which the captive reinsurance company assumed a pro rata share of all  losses in return for a pro rata share of the premiums collected. In most cases, the risk assumed by the reinsurance company was an excess layer of aggregate losses that would be  penetrated only in a situation of adverse loss development. During the recent housing and related credit market downturn in  which losses have increased significantly , most all captive reinsurance arrangements have attached, requiring our captive  reinsurers to make payments to us. In all cases, the captive reinsurer established a trust to secure our potential cash recoveries.  We generally are the sole beneficiary under these trusts, and therefore, have the ability to initiate disbursements under the trusts  in accordance with the terms of our captive reinsurance agreements. We are protected against losses in excess of our expectations on some of the risk associated with non-prime products.  We  initiated this protection by reinsuring this business through Smart Home reinsurance transactions. In 2004, we developed Smart  Home as a way to effectively transfer risk from our portfolio to investors in the capital markets. Smart Home mitigates our risk  against losses and concentrated positions. Since 2004, we completed  four Smart Home reinsurance transactions. Each transaction began with the formation of an unaf filiated, offshore reinsurance company . We then entered into an  agreement with the Smart Home reinsurer to cede to the reinsurer a portion of the risk (and premium) associated with a  portfolio of loans. The Smart Home reinsurer was funded in the capital markets through the issuance to investors of a series of  separate classes of credit-linked notes. Each class of notes relates to the loss coverage levels on the reinsured portfolio and is  assigned a rating by one or more of the three major rating agencies.  We retained the risk associated with the first-loss coverage levels and the risk associated with the senior most tranche of  coverage. Holders of the Smart Home credit-linked notes bear the risk of loss from losses that would be paid to us under the  reinsurance agreement, which consists of the layers of risk in between those that we retain.  The Smart Home reinsurer invests  the proceeds of the notes in high-quality short-term investments approved by the rating agencies. Income earned on those  investments and a portion of the reinsurance premiums that we pay are applied to pay interest on the notes as well as certain of  the Smart Home reinsurer’s expenses. The rate of principal amortization of the credit-linked notes is intended to approximate  the rate of principal amortization of the underlying mortgages. In 2011, we exercised our option to terminate two of these transactions, with RIF of approximately  $41 million. In the  second quarter of 2012, we terminated  one of our remaining reinsurance transactions under our Smart Home program with RIF  of approximately $243 million that was scheduled to mature in November 2012. These early termination did not have a  material impact on our financial or risk-to-capital position, statutory capital, results of operations or cash flows.  The final  remaining Smart Home transaction is scheduled to mature in May 2013.  The ultimate recoverable amount from this last  transaction will depend upon the amount and timing of paid losses through the May 2013 maturity date. Approximately $0.4 billion (or 1.1%) and $0.8 billion (or 2.7%) of our primary mortgage RIF was ceded through Smart  Home reinsurance transactions at December 31, 2012 and 2011, respectively. 221 Ceded losses under the Reinsurance Transactions are immaterial.