Cash, Cash Equivalents, and Investments | Cash, Cash Equivalents, and Investments Cash, cash equivalents, and investments consisted of the following (in thousands): September 30, 2018 December 31, 2017 Cash $ 104,654 $ 97,951 Money market instruments 2,717 8,631 Cash and cash equivalents 107,371 106,582 Treasury bills 193,347 150,371 Corporate bonds 138,099 47,395 Asset-backed securities 71,438 59,203 Sovereign bonds 8,119 21,579 Municipal bonds 6,044 8,805 Agency bonds 2,969 10,608 Short-term investments 420,016 297,961 Corporate bonds 176,007 296,014 Asset-backed securities 60,111 71,727 Treasury bills 32,711 23,459 Sovereign bonds 6,318 13,147 Agency bonds 5,940 14,890 Municipal bonds 842 4,204 Long-term investments 281,929 423,441 $ 809,316 $ 827,984 Treasury bills consist of debt securities issued by the U.S. government; corporate bonds consist of debt securities issued by both domestic and foreign companies; asset-backed securities consist of debt securities collateralized by pools of receivables or loans with credit enhancement; sovereign bonds consist of direct debt issued by foreign governments; municipal bonds consist of debt securities issued by state and local government entities; and agency bonds consist of domestic or foreign obligations of government agencies and government sponsored enterprises that have government backing. All securities are denominated in U.S. Dollars. The following table summarizes the Company’s available-for-sale investments as of September 30, 2018 (in thousands): Amortized Gross Gross Fair Value Short-term: Treasury bills $ 193,631 $ — $ (284 ) $ 193,347 Corporate bonds 138,383 56 (340 ) 138,099 Asset-backed securities 71,646 1 (209 ) 71,438 Sovereign bonds 8,172 — (53 ) 8,119 Municipal bonds 6,050 — (6 ) 6,044 Agency bonds 2,969 — — 2,969 Long-term: Corporate bonds 175,881 469 (343 ) 176,007 Asset-backed securities 60,276 33 (198 ) 60,111 Treasury bills 32,718 7 (14 ) 32,711 Sovereign bonds 6,286 32 — 6,318 Agency bonds 5,930 10 — 5,940 Municipal bonds 855 — (13 ) 842 $ 702,797 $ 608 $ (1,460 ) $ 701,945 The following table summarizes the Company’s gross unrealized losses and fair values for available-for-sale investments in an unrealized loss position as of September 30, 2018 (in thousands): Unrealized Loss Position For: Less than 12 Months 12 Months or Greater Total Fair Value Unrealized Losses Fair Value Unrealized Losses Fair Value Unrealized Losses Treasury bills $ 137,108 $ (174 ) $ 63,030 $ (124 ) $ 200,138 $ (298 ) Corporate bonds 116,028 (386 ) 42,922 (297 ) 158,950 (683 ) Asset-backed securities 57,678 (207 ) 38,256 (200 ) 95,934 (407 ) Sovereign bonds 3,527 (6 ) 4,592 (47 ) 8,119 (53 ) Municipal bonds 2,854 (6 ) 842 (13 ) 3,696 (19 ) $ 317,195 $ (779 ) $ 149,642 $ (681 ) $ 466,837 $ (1,460 ) As of September 30, 2018 , the Company did not recognize any other-than-temporary impairment of these investments. In its evaluation, management considered the type of security, the credit rating of the security, the length of time the security has been in a loss position, the size of the loss position, the Company's intent and ability to hold the security to expected recovery of value, and other meaningful information. The Company does not intend to sell, and is unlikely to be required to sell, any of these available-for-sale investments before their effective maturity or market price recovery. The Company recorded gross realized gains and gross realized losses on the sale of debt securities totaling $283,000 and $17,000 , respectively, during the three-month period ended September 30, 2018 and $306,000 and $43,000 , respectively, during the three-month period ended October 1, 2017 . The Company recorded gross realized gains and gross realized losses on the sale of debt securities totaling $646,000 and $111,000 , respectively, during the nine-month period ended September 30, 2018 and $449,000 and $79,000 , respectively, during the nine-month period ended October 1, 2017 . These gains and losses are included in "Investment income" on the Consolidated Statement of Operations. Prior to the sale of these securities, unrealized gains and losses for these debt securities, net of tax, are recorded in shareholders’ equity as accumulated other comprehensive income (loss). The following table presents the effective maturity dates of the Company’s available-for-sale investments as of September 30, 2018 (in thousands): <1 year 1-2 Years 2-3 Years 3-4 Years 4-5 Years 5-7 Years Total Corporate bonds $ 138,099 $ 80,605 $ 68,684 $ 22,429 $ 1,434 $ 2,855 $ 314,106 Treasury bills 193,347 32,711 — — — — 226,058 Asset-backed securities 71,438 30,840 5,431 12,102 5,138 6,600 131,549 Sovereign bonds 8,119 6,318 — — — — 14,437 Agency bonds 2,969 — — 5,940 — — 8,909 Municipal bonds 6,044 842 — — — — 6,886 $ 420,016 $ 151,316 $ 74,115 $ 40,471 $ 6,572 $ 9,455 $ 701,945 |