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 June 30, 2018 and December 31, 2017 were as follows (in thousands): June 30, 2018 Amortized Cost Gross Unrealized Gains Gross Unrealized (Losses) Fair Value Securities available for sale: U.S. agency and mortgage-backed securities $ 94,387 $ 21 $ (2,580 ) $ 91,828 Obligations of states and political subdivisions 15,109 46 (276 ) 14,879 Total securities available for sale $ 109,496 $ 67 $ (2,856 ) $ 106,707 Securities held to maturity: U.S. agency and mortgage-backed securities $ 29,678 $ — $ (1,111 ) $ 28,567 Obligations of states and political subdivisions 14,523 17 (189 ) 14,351 Corporate debt securities 1,500 — (2 ) 1,498 Total securities held to maturity $ 45,701 $ 17 $ (1,302 ) $ 44,416 Total securities $ 155,197 $ 84 $ (4,158 ) $ 151,123 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 June 30, 2018 and December 31, 2017 , investments in an unrealized loss position that were temporarily impaired were as follows (in thousands): June 30, 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 $ 61,734 $ (1,200 ) $ 28,279 $ (1,380 ) $ 90,013 $ (2,580 ) Obligations of states and political subdivisions 8,055 (129 ) 2,462 (147 ) 10,517 (276 ) Total securities available for sale $ 69,789 $ (1,329 ) $ 30,741 $ (1,527 ) $ 100,530 $ (2,856 ) Securities held to maturity: U.S. agency and mortgage-backed securities $ 14,964 $ (499 ) $ 13,603 $ (612 ) $ 28,567 $ (1,111 ) Obligations of states and political subdivisions 11,155 (189 ) — — 11,155 (189 ) Corporate debt securities 1,498 (2 ) — — 1,498 (2 ) Total securities held to maturity $ 27,617 $ (690 ) $ 13,603 $ (612 ) $ 41,220 $ (1,302 ) Total securities $ 97,406 $ (2,019 ) $ 44,344 $ (2,139 ) $ 141,750 $ (4,158 ) 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 June 30, 2018 , there were eighty-six out of ninety-one U.S. agency and mortgage-backed securities, fifty-eight out of eighty-one 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 4.8 years at June 30, 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 June 30, 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 June 30, 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 $ 505 $ 511 $ 186 $ 186 Due after one year through five years 8,982 8,919 6,918 6,790 Due after five years through ten years 14,164 13,723 14,282 14,034 Due after ten years 85,845 83,554 24,315 23,406 $ 109,496 $ 106,707 $ 45,701 $ 44,416 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 June 30, 2018 , and no impairment has been recognized. The composition of restricted securities at June 30, 2018 and December 31, 2017 was as follows (in thousands): June 30, 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 |