Fair value of financial instruments - Additional Information (Details) - USD ($) $ in Thousands |
3 Months Ended | 9 Months Ended | |||
---|---|---|---|---|---|
Sep. 30, 2019 |
Sep. 30, 2018 |
Sep. 30, 2019 |
Sep. 30, 2018 |
Dec. 31, 2018 |
|
Mortgage Loans | |||||
Fair Value Measurement Inputs and Valuation Techniques [Line Items] | |||||
Net (losses) gains from fair value changes of mortgage loans | $ (3,291) | $ 3,212 | $ (2,329) | $ 7,409 | |
GNMA | |||||
Fair Value Measurement Inputs and Valuation Techniques [Line Items] | |||||
Delinquent GNMA loans that had been previously sold | $ 28,897 | $ 28,897 | $ 67,362 |