Investments | Investments All of the Company’s debt and equity securities are classified as AFS and are carried at fair value. The Company evaluates whether AFS securities are other-than-temporarily impaired (OTTI) based on criteria that include the extent to which cost exceeds market value, the duration of the market value decline, the credit rating of the issuer or security, the failure of the issuer to make scheduled principal or interest payments and the financial health and prospects of the issuer or security. Declines in the value of AFS securities determined to be OTTI are recognized in earnings and reported as OTTI losses. Debt securities with unrealized losses are considered OTTI if the Company intends to sell the debt security or if the Company will be required to sell the debt security prior to any anticipated recovery. If the Company determines that a debt security is OTTI under these circumstances, the impairment recognized in earnings is measured as the difference between the amortized cost and the current fair value. A debt security is also determined to be OTTI if the Company does not expect to recover the amortized cost of the debt security. However, in this circumstance, if the Company does not intend to sell the debt security and will not be required to sell the debt security, the impairment recognized in earnings equals the estimated credit loss as measured by the difference between the present value of expected cash flows and the amortized cost of the debt security. Expected cash flows are discounted using the debt security’s effective interest rate. An equity security is determined to be OTTI if the Company does not expect to recover the cost of the equity security. Declines in the value of AFS securities determined to be temporary are reported net of income taxes as other comprehensive losses and included as a component of stockholders’ equity. Interest and dividend income, amortization of premiums, accretion of discounts and realized gains and losses on AFS securities are included in investment income. Interest income is accrued as earned. Dividend income is recognized as income on the ex-dividend date of the equity security. The cost of AFS securities sold is based on the first-in, first-out method. Following is a summary of AFS securities as of June 27, 2015 and December 27, 2014 : Amortized Cost Gross Unrealized Gains Gross Unrealized Losses Fair Value (Amounts are in thousands) June 27, 2015 Tax exempt bonds $ 3,400,539 12,465 6,944 3,406,060 Taxable bonds 1,983,197 3,108 5,210 1,981,095 Restricted investments 165,000 — 452 164,548 Equity securities 1,151,265 157,427 12,750 1,295,942 $ 6,700,001 173,000 25,356 6,847,645 December 27, 2014 Tax exempt bonds $ 3,205,647 17,460 4,011 3,219,096 Taxable bonds 1,569,828 3,005 4,592 1,568,241 Restricted investments 170,000 — 776 169,224 Equity securities 1,092,985 191,493 10,309 1,274,169 $ 6,038,460 211,958 19,688 6,230,730 Realized gains on sales of AFS securities totaled $27,656,000 and $43,922,000 for the three and six months ended June 27, 2015 , respectively. Realized losses on sales of AFS securities totaled $4,787,000 and $5,679,000 for the three and six months ended June 27, 2015 , respectively. Realized gains on sales of AFS securities totaled $15,558,000 and $21,731,000 for the three and six months ended June 28, 2014 , respectively. Realized losses on sales of AFS securities totaled $383,000 and $954,000 for the three and six months ended June 28, 2014 , respectively. The amortized cost and fair value of AFS securities by expected maturity as of June 27, 2015 and December 27, 2014 are as follows: June 27, 2015 December 27, 2014 Amortized Cost Fair Value Amortized Cost Fair Value (Amounts are in thousands) Due in one year or less $ 1,145,813 1,147,371 996,674 999,169 Due after one year through five years 3,893,543 3,895,836 3,493,708 3,501,821 Due after five years through ten years 252,350 250,759 183,552 183,168 Due after ten years 92,030 93,189 101,541 103,179 5,383,736 5,387,155 4,775,475 4,787,337 Restricted investments 165,000 164,548 170,000 169,224 Equity securities 1,151,265 1,295,942 1,092,985 1,274,169 $ 6,700,001 6,847,645 6,038,460 6,230,730 Following is a summary of temporarily impaired AFS securities by the time period impaired as of June 27, 2015 and December 27, 2014 : Less Than 12 Months 12 Months or Longer Total Fair Value Unrealized Losses Fair Value Unrealized Losses Fair Value Unrealized Losses (Amounts are in thousands) June 27, 2015 Tax exempt bonds $ 1,062,954 5,789 81,768 1,155 1,144,722 6,944 Taxable bonds 1,011,082 4,695 63,471 515 1,074,553 5,210 Restricted investments 164,548 452 — — 164,548 452 Equity securities 88,983 10,142 10,004 2,608 98,987 12,750 Total temporarily impaired AFS securities $ 2,327,567 21,078 155,243 4,278 2,482,810 25,356 December 27, 2014 Tax exempt bonds $ 689,909 2,359 93,454 1,652 783,363 4,011 Taxable bonds 936,512 3,666 68,035 926 1,004,547 4,592 Restricted investments 169,224 776 — — 169,224 776 Equity securities 107,352 8,373 6,229 1,936 113,581 10,309 Total temporarily impaired AFS securities $ 1,902,997 15,174 167,718 4,514 2,070,715 19,688 There are 385 AFS securities issues contributing to the total unrealized loss of $25,356,000 as of June 27, 2015 . Unrealized losses related to debt securities are primarily due to interest rate volatility impacting the market value of certain bonds. The Company continues to receive scheduled principal and interest payments on these debt securities. Unrealized losses related to equity securities are primarily due to temporary equity market fluctuations that are expected to recover. |