Average renewal premium rates (adjusted for change in exposures) increased 0.9% in 2017, 0.3% in 2016 and 1.2% in 2015. However, overall loss costs are also increasing, and current market price levels for certain lines of business remain below the prices required for the Company to achieve its long-term return objectives. A summary of gross premiums written in 2017 compared with 2016 by line of business within each business segment follows: Net premiums written were $6,261 million in 2017, a decrease of 3% from $6,424 million in 2016. Ceded reinsurance premiums as a percentage of gross written premiums were 16% in 2017 and 15% in 2016. Premiums earned increased less than 1% to $6,311 million in 2017 from $6,293 million in 2016. Insurance premiums (including the impact of rate changes) are generally earned evenly over the policy term, and accordingly recent rate increases will be earned over the upcoming quarters. Premiums earned in 2017 are related to business written during both 2017 and 2016. Audit premiums were $172 million in 2017 compared with $156 million in 2016. Net Investment Income. Following is a summary of net investment income for the years ended December 31, 2017 and 2016: Net investment income increased 2% to $576 million in 2017 from $564 million in 2016 primarily due to an increase in income from fixed maturity securities of $29 million, as well as real estate of $13 million and a decrease in investment expenses of $2 million, partially offset by a decrease in investment funds of $31 million. Investment funds are reported on a one quarter lag. The average annualized yield for fixed maturity securities was 3.3% in 2017 and 3.2% in 2016; accordingly the increase in fixed maturity securities income was mainly the result of a larger investment portfolio. The effective duration of the fixed maturity portfolio was 3.0 years at December 31, 2017, down from 3.1 years at December 31, 2016. Average invested assets, at cost (including cash and cash equivalents), were $17.5 billion in 2017 and $16.7 billion in 2016. Insurance Service Fees. The Company earns fees from an insurance distribution business, a third-party administrator, and as a servicing carrier of workers' compensation assigned risk plans for certain states. Insurance service fees were $135 million in 2017 and $139 million in 2016. Net Realized Gains on Investment Sales. The Company buys and sells securities and other investment assets on a regular basis in order to maximize its total return on investments. Decisions to sell securities and other investment assets are based on management’s view of the underlying fundamentals of specific investments as well as management’s expectations regarding interest rates, credit spreads, currency values and general economic conditions. Net realized gains on investment sales were $336 million in 2017 compared with $285 million in 2016. In 2017, realized gains were primarily related to the sale of an investment in an office building located in Washington, D.C. and the sale of some shares of a publicly traded common stock. In 2016, realized gains were primarily related to the sale of Aero Precision Industries and the sale of some shares of a publicly traded common stock. 45 Amount Average Annualized Yield (In thousands) 2017 2016 2017 2016 Fixed maturity securities, including cash and cash equivalents and loans receivable $ 473,101 $ 444,247 3.3 % 3.2 % Investment funds 68,169 99,301 5.7 8.1 Real estate 19,975 7,054 1.5 0.7 Arbitrage trading account 19,145 18,693 3.6 4.8 Equity securities available for sale 2,350 4,028 1.1 2.1 Gross investment income 582,740 573,323 3.3 3.4 Investment expenses (6,952 ) (9,160 ) — — Total $ 575,788 $ 564,163 3.3% 3.4% • Insurance gross premiums increased 1% to $6,870 million in 2017 from $6,796 million in 2016. Gross premiums increased $40 million (6%) for commercial auto, $37 million (5%) for professional liability, $6 million (less than 1%) for other liability, and $4 million (less than 1%) for short-tail lines, partially offset by a decrease of $13 million (1%) for workers' compensation. • Reinsurance gross premiums decreased 19% to $607 million in 2017 from $748 million in 2016. Gross premiums written decreased $108 million (35%) for property lines and decreased $33 million (7%) for casualty lines.