Available-for-Sale Securities and Fair Value Measurements | 3. Available-for-Sale Securities and Fair Value Measurements We define fair value as the exchange price that would be received for an asset or paid to transfer a liability (an exit price) in the principal or most advantageous market for the asset or liability in an Our valuation techniques are based on observable and unobservable inputs. Observable inputs reflect readily obtainable data from independent sources, while unobservable inputs reflect our market assumptions. We classify these inputs into the following hierarchy: • Level 1—Inputs are unadjusted, quoted prices in active markets for identical assets or liabilities at the measurement date; • Level 2—Inputs are observable, unadjusted quoted prices in active markets for similar assets or liabilities, unadjusted quoted prices for identical or similar assets or liabilities in markets that are not active, or other inputs that are observable or can be corroborated by observable market data for substantially the full term of the related assets or liabilities; and • Level 3—Unobservable inputs that are significant to the measurement of the fair value of the assets or liabilities that are supported by little or no market data. The following tables set forth our financial instrumen ts that were measured at fair value on a recurring basis by level within the fair value hierarchy (in thousands): March 31, 2018 Level 1 Level 2 Level 3 Total Cash and cash equivalents: Cash and money market funds $ 137,998 $ — $ — $ 137,998 Agency securities — 13,592 — 13,592 Commercial paper — 57,734 — 57,734 Total cash and cash equivalents $ 137,998 $ 71,326 $ — $ 209,324 Investments: Agency securities $ — $ 7,278 $ — $ 7,278 Corporate securities — 36,609 — 36,609 Commercial paper — 19,386 — 19,386 U.S. government securities — 59,150 — 59,150 Total investments $ — $ 122,423 $ — $ 122,423 December 31, 2017 Level 1 Level 2 Level 3 Total Cash and cash equivalents: Cash and money market funds $ 39,072 $ — $ — $ 39,072 Corporate securities — 999 — 999 Commercial paper — 33,416 — 33,416 Total cash and cash equivalents $ 39,072 $ 34,415 $ — $ 73,487 Investments: Agency securities — 12,718 — 12,718 Corporate securities — 28,345 — 28,345 Commercial paper — 21,432 — 21,432 U.S. government securities — 46,448 — 46,448 Total investments $ — $ 108,943 $ — $ 108,943 Our valuation techniques used to measure the fair value of money market funds were derived from quoted prices in active markets for identical assets. The valuation techniques used to measure the fair value of investments, all of which have counterparties with high credit ratings, were valued based on quoted market prices or model-driven valuations using significant inputs derived from or corroborated by observable market data. Investments are carried at fair value. During the quarters ended March 31, 2018 and 2017, there were no transfers between Level 1 and Level 2 of the fair value hierarchy. Available-for-sale investments are carried at fair value and are included in the tables above. The aggregate market value, cost basis, and gross unrealized gains and losses of available-for-sale investments by security type, classified in cash equivalents and investments, as of March 31, 2018 and December 31, 2017, are as follows March 31, 2018 Amortized Cost Gross Unrealized Gains Gross Unrealized Losses Total Fair Value Agency securities $ 20,881 $ — $ (11 ) $ 20,870 Corporate securities 36,666 1 (58 ) 36,609 Commercial paper 77,120 — — 77,120 U.S. government securities 59,208 — (58 ) 59,150 Total available-for-sale investments $ 193,875 $ 1 $ (127 ) $ 193,749 December 31, 2017 Amortized Cost Gross unrealized gains Gross unrealized losses Total fair value Agency securities $ 12,729 $ — $ (11 ) $ 12,718 Corporate securities 29,369 1 (26 ) 29,344 Commercial paper 54,848 — — 54,848 U.S. government securities 46,520 — (72 ) 46,448 Total available-for-sale investments $ 143,466 $ 1 $ (109 ) $ 143,358 At March 31, 2018, all of the available-for-sale securities have contractual maturities within fourteen months. We periodically review our available-for-sale investments for other-than-temporary impairment loss. We consider factors such as the duration, severity and the reason for the decline in value, the potential recovery period and our intent to sell. For debt securities, we also consider whether (i) it is more likely than not that we will be required to sell the debt securities before recovery of their amortized cost basis, and (ii) the amortized cost basis cannot be recovered as a result of credit losses. During the quarters ended March 31, 2018 and 2017 |