Securities | Securities The Company invests in U.S. agency and mortgage-backed securities, obligations of state and political subdivisions, and corporate debt securities. Amortized costs and fair values of securities at March 31, 2018 and December 31, 2017 were as follows (in thousands): March 31, 2018 Amortized Cost Gross Unrealized Gains Gross Unrealized (Losses) Fair Value Securities available for sale: U.S. agency and mortgage-backed securities $ 81,309 $ 24 $ (2,225 ) $ 79,108 Obligations of states and political subdivisions 14,820 57 (286 ) 14,591 Total securities available for sale $ 96,129 $ 81 $ (2,511 ) $ 93,699 Securities held to maturity: U.S. agency and mortgage-backed securities $ 30,750 $ — $ (984 ) $ 29,766 Obligations of states and political subdivisions 14,541 18 (192 ) 14,367 Corporate debt securities 1,500 — (3 ) 1,497 Total securities held to maturity $ 46,791 $ 18 $ (1,179 ) $ 45,630 Total securities $ 142,920 $ 99 $ (3,690 ) $ 139,329 December 31, 2017 Amortized Cost Gross Unrealized Gains Gross Unrealized (Losses) Fair Value Securities available for sale: U.S. agency and mortgage-backed securities $ 76,074 $ 67 $ (1,337 ) $ 74,804 Obligations of states and political subdivisions 14,520 86 (155 ) 14,451 Total securities available for sale $ 90,594 $ 153 $ (1,492 ) $ 89,255 Securities held to maturity: U.S. agency and mortgage-backed securities $ 32,149 $ — $ (551 ) $ 31,598 Obligations of states and political subdivisions 14,559 74 (45 ) 14,588 Corporate debt securities 1,500 16 — 1,516 Total securities held to maturity $ 48,208 $ 90 $ (596 ) $ 47,702 Total securities $ 138,802 $ 243 $ (2,088 ) $ 136,957 At March 31, 2018 and December 31, 2017 , investments in an unrealized loss position that were temporarily impaired were as follows (in thousands): March 31, 2018 Less than 12 months 12 months or more Total Fair Value Unrealized (Loss) Fair Value Unrealized (Loss) Fair Value Unrealized (Loss) Securities available for sale: U.S. agency and mortgage-backed securities $ 47,868 $ (941 ) $ 29,121 $ (1,284 ) $ 76,989 $ (2,225 ) Obligations of states and political subdivisions 7,120 (149 ) 1,924 (137 ) 9,044 (286 ) Total securities available for sale $ 54,988 $ (1,090 ) $ 31,045 $ (1,421 ) $ 86,033 $ (2,511 ) Securities held to maturity: U.S. agency and mortgage-backed securities $ 17,269 $ (478 ) $ 12,497 $ (506 ) $ 29,766 $ (984 ) Obligations of states and political subdivisions 11,166 (192 ) — — 11,166 (192 ) Corporate debt securities 1,497 (3 ) — — 1,497 (3 ) Total securities held to maturity $ 29,932 $ (673 ) $ 12,497 $ (506 ) $ 42,429 $ (1,179 ) Total securities $ 84,920 $ (1,763 ) $ 43,542 $ (1,927 ) $ 128,462 $ (3,690 ) December 31, 2017 Less than 12 months 12 months or more Total Fair Value Unrealized (Loss) Fair Value Unrealized (Loss) Fair Value Unrealized (Loss) Securities available for sale: U.S. agency and mortgage-backed securities $ 29,963 $ (286 ) $ 30,362 $ (1,051 ) $ 60,325 $ (1,337 ) Obligations of states and political subdivisions 4,469 (53 ) 1,961 (102 ) 6,430 (155 ) Total securities available for sale $ 34,432 $ (339 ) $ 32,323 $ (1,153 ) $ 66,755 $ (1,492 ) Securities held to maturity: U.S. agency and mortgage-backed securities $ 18,301 $ (205 ) $ 13,297 $ (346 ) $ 31,598 $ (551 ) Obligations of states and political subdivisions 6,889 (45 ) — — 6,889 (45 ) Total securities held to maturity $ 25,190 $ (250 ) $ 13,297 $ (346 ) $ 38,487 $ (596 ) Total securities $ 59,622 $ (589 ) $ 45,620 $ (1,499 ) $ 105,242 $ (2,088 ) The tables above provide information about securities that have been in an unrealized loss position for less than twelve consecutive months and securities that have been in an unrealized loss position for twelve consecutive months or more. Management evaluates securities for other-than-temporary impairment at least on a quarterly basis, and more frequently when economic or market concerns warrant such evaluation. Impairment is considered to be other-than-temporary if the Company (1) intends to sell the security, (2) more likely than not will be required to sell the security before recovering its cost, or (3) does not expect to recover the security’s entire amortized cost basis. Presently, the Company does not intend to sell any of these securities, does not expect to be required to sell these securities, and expects to recover the entire amortized cost of all the securities. At March 31, 2018 , there were eighty out of eighty-five U.S. agency and mortgage-backed securities, fifty-six out of eighty obligations of states and political subdivisions, and one corporate debt security in an unrealized loss position. One hundred percent of the Company’s investment portfolio is considered investment grade. The weighted-average re-pricing term of the portfolio was 5.0 years at March 31, 2018 . At December 31, 2017 , there were sixty-eight out of eighty-two U.S. agency and mortgage-backed securities and thirty-nine out of eighty obligations of states and political subdivisions in an unrealized loss position. One hundred percent of the Company’s investment portfolio was considered investment grade at December 31, 2017 . The weighted-average re-pricing term of the portfolio was 4.7 years at December 31, 2017 . The unrealized losses at March 31, 2018 in the U.S. agency and mortgage-backed securities portfolio, the obligations of states and political subdivisions portfolio, and the corporate debt securities portfolio were related to changes in market interest rates and not credit concerns of the issuers. The amortized cost and fair value of securities at March 31, 2018 by contractual maturity are shown below (in thousands). Expected maturities of mortgage-backed securities will differ from contractual maturities because borrowers may have the right to prepay obligations with or without call or prepayment penalties. Available for Sale Held to Maturity Amortized Cost Fair Value Amortized Cost Fair Value Due within one year $ 507 $ 514 $ — $ — Due after one year through five years 8,965 8,877 6,808 6,681 Due after five years through ten years 12,112 11,721 13,723 13,534 Due after ten years 74,545 72,587 26,260 25,415 $ 96,129 $ 93,699 $ 46,791 $ 45,630 Federal Home Loan Bank, Federal Reserve Bank and Community Bankers’ Bank stock are generally viewed as long-term investments and as restricted securities, which are carried at cost, because there is a minimal market for the stock. Therefore, when evaluating restricted securities for impairment, their value is based on the ultimate recoverability of the par value rather than by recognizing temporary declines in value. The Company does not consider these investments to be other-than-temporarily impaired at March 31, 2018 , and no impairment has been recognized. The composition of restricted securities at March 31, 2018 and December 31, 2017 was as follows (in thousands): March 31, December 31, Federal Home Loan Bank stock $ 665 $ 645 Federal Reserve Bank stock 875 875 Community Bankers’ Bank stock 50 50 $ 1,590 $ 1,570 |