Expense ratio is calculated by dividing other underwriting and operating expenses, excluding interest expense, by net premiums earned.
The increase in net investment income to $27.9 million for the year ended December 31, 2016 as compared to $19.9 million for the year ended December 31, 2015, was due to an increase in the weighted average balance of our investment portfolio and an increase in the pre-tax investment income yield. The average cash and investment portfolio balance increased to $1.4 billion during the year ended December 31, 2016 from $1.2 billion during the year ended December 31, 2015 primarily as a result of investing cash flows generated from operations. The pre-tax investment income yield increased from 1.9% in the year ended December 31, 2015 to 2.1% in the year ended December 31, 2016 primarily due to the increase in the portion of our investment portfolio invested in spread and duration assets. The pre-tax investment income yields are calculated based on amortized cost and exclude investment expenses. See "-Liquidity and Capital Resources" for further details of our investment portfolio.
Management believes that the Company has sufficient liquidity available both at the holding company and in its insurance and other operating subsidiaries to meet its operating cash needs and obligations and committed capital expenditures for the next 12 months.
Cash flow used in financing activities totaled $3.2 million for the year ended December 31, 2015 as compared to cash provided by financing activities of $120.8 million for the year ended December 31, 2014. The decrease in cash flow provided by financing activities of $124.0 million was primarily due to a decrease in the issuance of common shares in 2015 as compared to 2014. In 2014, the Company completed a secondary offering of Common Shares for $126.7 million in net proceeds, net of offering costs.
Our combined risk-to-capital calculation for our U.S. insurance subsidiaries as of December 31, 2016 was as follows:
Deferred income tax assets and liabilities are determined using the asset and liability (or balance sheet) method. Under this method, we determine the net deferred tax asset or liability based on the tax effects of the temporary differences between the book and tax bases of the various assets and liabilities and give current recognition to changes in tax rates and laws. Changes in tax laws, rates, regulations and policies, or the final determination of tax audits or examinations, could materially affect our tax estimates. We evaluate the realizability of the deferred tax asset and recognize a valuation allowance if, based on the weight of all available positive and negative evidence, it is more likely than not that some portion or all of the deferred tax asset will not be realized. When evaluating the realizability of the deferred tax asset, we consider estimates of expected future taxable income, existing and projected book/tax differences, carryback and carryforward periods, tax planning strategies available, and the general and industry specific economic outlook. This realizability analysis is inherently subjective, as it requires management to forecast changes in the mortgage market, as well as the related impact on mortgage insurance, and the competitive and general economic environment in future periods. Changes in the estimate of deferred tax asset realizability, if applicable, are included in income tax expense on the consolidated statements of comprehensive income. ASC No. 740 provides a recognition threshold and measurement attribute for the financial statement recognition and measurement of a tax position taken or expected to be taken in a tax return.
The gross unrealized losses on these investment securities are principally associated with the changes in market interest rates and credit spreads subsequent to their purchase. Each issuer is current on its scheduled interest and principal payments. We assess our intent to sell these securities and whether we will be required to sell these securities before the recovery of their amortized cost basis when determining whether an impairment is other-than-temporary. We recorded other-than-temporary impairments of $0.1 million and $0.3 million in the years ended December 31, 2016 and 2015, respectively, on securities in an unrealized loss position. The impairments resulted from our intent to sell these securities subsequent to the reporting date. There were no other-than-temporary impairments of investments in the year ended December 31, 2014.
The significant unobservable inputs used for derivative liabilities are constant prepayment rates ("CPR") and default rates on the reference pool of mortgages and the credit spreads on the reference STACR notes. An increase in the CPR, default rate or reference STACR credit spread will increase the fair value of the liability.