Fair value of investment portfolio. The Company categorizes the fair values of its debt and equity securities using a three-level hierarchy for fair value measurements that distinguishes between market participant assumptions developed based on market data obtained from sources independent of the Company (observable inputs) and the Company’s own assumptions about market participant assumptions developed based on the best information available in the circumstances (unobservable inputs). The hierarchy for inputs used in determining fair value maximizes the use of observable inputs and minimizes the use of unobservable inputs by requiring that observable inputs be used when available. The hierarchy level assigned to each security in the Company’s investment portfolio was based on management’s assessment of the transparency and reliability of the inputs used to estimate the fair values at the measurement date. See Note 14 Fair Value Measurements to the consolidated financial statements for a more detailed description of the three-level hierarchy and a description for each level.
Net realized investment losses for the specialty insurance segment were $7.4 million for 2018 and were primarily from a decrease in the fair values of equity securities of $6.1 million and losses from the sales of debt securities. Net realized investment gains totaled $4.6 million and $4.1 million for 2017 and 2016, respectively, and were primarily from the sales of debt and equity securities, and for 2016, included $2.3 million of gains from the sale of real estate.
In addition to being a party to master repurchase agreements, the Company’s federal savings bank subsidiary, First American Trust, FSB, maintains a secured line of credit with the Federal Home Loan Bank and federal funds lines of credit with certain correspondent institutions. As of December 31, 2018, no amounts remained outstanding under any of these facilities.
Trust assets held or managed by First American Trust, FSB totaled $3.6 billion and $3.7 billion at December 31, 2018 and 2017, respectively. Escrow deposits held at third-party financial institutions and trust assets are not considered assets of the Company and, therefore, are not included in the accompanying consolidated balance sheets. However, the Company could be held contingently liable for the disposition of these assets.
The Company does not consider these adjustments to be material, individually or in the aggregate, to any previously issued consolidated financial statements.
The preparation of financial statements in accordance with GAAP requires management to make estimates and assumptions that affect the statements. Actual results could differ from the estimates and assumptions used.
Title insurance, property and casualty insurance and home warranty companies, like other types of insurers, are generally not subject to state income or franchise taxes. However, in lieu thereof, most states impose a tax based primarily on insurance premiums written. This premium tax is reported as a separate line item in the consolidated statements of income in order to provide a more meaningful disclosure of the taxation of the Company.
Investments in debt securities at December 31, 2018, by contractual maturities, are as follows:
Included in debt securities at December 31, 2018, were bank loans totaling $144.6 million, of which $133.2 million were non-investment grade; high yield corporate debt securities totaling $38.7 million, all of which were non-investment grade; and emerging market debt securities totaling $72.2 million, of which $9.6 million were non-investment grade.
Net periodic costs related to the Company’s unfunded supplemental benefit and funded defined benefit pension plans included the following components:
As of December 31, 2018, there was $28.1 million of total unrecognized compensation cost related to unvested RSUs that is expected to be recognized over a weighted-average period of 2.2 years. The fair value of RSUs is generally based on the market value of the Company’s shares on the date of grant. The weighted average grant-date fair value of RSUs was $54.80, $39.56 and $36.70 for the years ended December 31, 2018, 2017 and 2016, respectively. The total fair value of shares distributed for the years ended December 31, 2018, 2017 and 2016 was $54.5 million, $34.6 million and $29.0 million, respectively. At December 31, 2018, 1.0 million shares were vested but not distributed.
During the year ended December 31, 2017, the Company completed acquisitions for an aggregate purchase price of $91.1 million. These acquisitions have been included in the Company’s title insurance and services segment.