Year Ended December 31 2020 2019 2018 Operating activities Net income (loss) $ 4,463 $ 7,347 $ (34,075 ) Adjustments to reconcile net income (loss) to net cash provided by operating activities: Change in accounts receivable and unearned premium (9,024 ) (3,835 ) (3,904 ) Change in accrued investment income 65 (524) (199) Change in reinsurance recoverable on paid losses (3,799 ) (19,083 ) 956 Change in losses and loss expenses reserves, net of reinsurance 75,103 100,648 117,027  Change in other assets, other liabilities and current income taxes (2,322 ) 10,140 8,204 Amortization of net policy acquisition costs 55,183 55,802 54,981  Net policy acquisition costs deferred (56,431 ) (57,731 ) (55,940 ) Provision for deferred income tax expense (benefit) (5,244) (51) (18,794) Bond amortization (26 ) (725 ) 184 Depreciation 5,869 6,052 6,102  Net realized and unrealized (gains) losses on investments 9,236 (12,889 ) 25,691 Compensation expense related to restricted stock 1,789 1,529 475  Net cash provided by operating activities 74,862 86,680 100,708 Investing activities Purchases of fixed income securities and equity securities (392,223) (423,544) (415,326) Purchases of limited partnership interests – – (450 ) Distributions from limited partnerships 14,636 33,396 6,869  Proceeds from maturities 136,390 84,387 64,035 Proceeds from sales of fixed income securities 103,938 139,310 241,429  Proceeds from sales of equity securities 51,713 21,621 149,195 Purchase of insurance company-owned life insurance – – (10,000) Purchase of commercial mortgage loans (555 ) (7,082 ) (6,672 ) Proceeds from commercial mortgage loans 1,539 1,972 –  Purchases of property and equipment (1,470 ) (1,953 ) (5,439 ) Proceeds from disposals of property and equipment – 3 10  Net cash provided by (used in) investing activities (86,032 ) (151,890 ) 23,651 Financing activities Dividends paid to shareholders (5,692) (5,857) (16,835) Repurchase of common shares (1,782 ) (11,501 ) (4,596 ) Net cash used in financing activities (7,474) (17,358) (21,431) Effect of foreign exchange rates on cash and cash equivalents 185 645 (830) Increase (decrease) in cash, cash equivalents and restricted cash and cash equivalents (18,459) (81,923) 102,098  Cash, cash equivalents and restricted cash and cash equivalents at beginning of year 88,888 170,811 68,713 Cash, cash equivalents and restricted cash and cash equivalents at end of year $ 70,429 $ 88,888 $ 170,811  Supplemental Disclosures of Cash Flow Information Cash paid (refunds received) for income taxes $ 1,500 $ (1,186 ) $ 9,500 Cash paid for interest $ 433 $ 723 $ 504  See notes to consolidated financial statements. 53 Protective Insurance Corporation and Subsidiaries (in thousands) Consolidated Statements of Cash Flows