Investments - Summary of unrealized gains and losses (Details) - security
Mar. 31, 2018
Dec. 31, 2017
Investments, Debt and Equity Securities [Abstract]    
Number of positions held with unrealized gains (positions) 302 496
Number of positions held with unrealized losses (positions) 996 722
Number of positions held that individually exceed unrealized gains of $500,000 (positions) 0 2
Number of positions held that individually exceed unrealized losses of $500,000 (positions) 0 0
Percentage of positions held with unrealized gains that were investment grade (percent) 84.00% 81.00%
Percentage of positions held with unrealized losses that were investment grade (percent) 94.00% 97.00%
Percentage of fair value held with unrealized gains that were investment grade (percent) 88.00% 81.00%
Percentage of fair value held with unrealized losses that were investment grade (percent) 93.00% 95.00%