10-Q 1 ctbi10q0617.htm CTBI JUNE 30, 2017 FORM 10-Q

UNITED STATES
SECURITIES AND EXCHANGE COMMISSION
WASHINGTON, D.C. 20549
FORM 10-Q

[X] | QUARTERLY REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934
| For the quarterly period ended June 30, 2017
| or
[ ] | TRANSITION REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934
| For the transition period from _____________ to _____________

Commission file number 0-11129
COMMUNITY TRUST BANCORP, INC.
(Exact name of registrant as specified in its charter)

Kentucky | 61-0979818
(State or other jurisdiction of incorporation or organization) | IRS Employer Identification No.
346 North Mayo Trail Pikeville, Kentucky (Address of principal executive offices) | 41501 (Zip code)

(606) 432-1414
(Registrant’s telephone number)
Indicate by check mark whether the registrant (1) has filed all reports required to be filed by Section 13 or 15(d) of the Securities Exchange Act of 1934 during the preceding 12 months (or for such shorter period that the registrant was required to file such reports) and (2) has been subject to such filing requirements for the past 90 days.

Yes ✓ | No

Indicate by check mark whether the registrant has submitted electronically and posted on its corporate Web site, if any, every Interactive Data File required to be submitted and posted pursuant to Rule 405 of Regulation S-T during the preceding 12 months (or for such shorter period that the registrant was required to submit and post such files.)

Yes ✓ | No

Indicate by check mark whether the registrant is a large accelerated filer, an accelerated filer, a non-accelerated filer, a smaller reporting company, or an emerging growth company. See definition of “large accelerated filer,” “accelerated filer,” “smaller reporting company,” and “emerging growth company” in Rule 12b-2 of the Exchange Act.

Large accelerated filer ☐ | Accelerated filer ✓ | Non-accelerated filer ☐
|  | (Do not check if a smaller reporting company)
Smaller reporting company ☐ | Emerging growth company ☐ |

If an emerging growth company, indicate by check mark if the registrant has elected not to use the extended transition period for complying with any new or revised ﬁnancial accounting standards provided pursuant to Section 7(a)(2)(B) of the Securities Act. ☐
Indicate by check mark whether the registrant is a shell company (as defined in Rule 12b-2 of the Exchange Act).

Yes | No ✓

Indicate the number of shares outstanding of each of the issuer’s classes of common stock, as of the latest practical date.
Common stock – 17,674,440 shares outstanding at July 31, 2017

CAUTIONARY STATEMENT
REGARDING FORWARD LOOKING STATEMENTS
Certain of the statements contained herein that are not historical facts are forward-looking statements within the meaning of the Private Securities Litigation Reform Act. Community Trust Bancorp, Inc.’s (“CTBI”) actual results may differ materially from those included in the forward-looking statements. Forward-looking statements are typically identified by words or phrases such as “believe,” “expect,” “anticipate,” “intend,” “estimate,” “may increase,” “may fluctuate,” and similar expressions or future or conditional verbs such as “will,” “should,” “would,” and “could.” These forward-looking statements involve risks and uncertainties including, but not limited to, economic conditions, portfolio growth, the credit performance of the portfolios, including bankruptcies, and seasonal factors; changes in general economic conditions including the performance of financial markets, prevailing inflation and interest rates, realized gains from sales of investments, gains from asset sales, and losses on commercial lending activities; results of various investment activities; the effects of competitors’ pricing policies, changes in laws and regulations, competition, and demographic changes on target market populations’ savings and financial planning needs; industry changes in information technology systems on which we are highly dependent; failure of acquisitions to produce revenue enhancements or cost savings at levels or within the time frames originally anticipated or unforeseen integration difficulties; and the resolution of legal proceedings and related matters. In addition, the banking industry in general is subject to various monetary, operational, and fiscal policies and regulations, which include, but are not limited to, those determined by the Federal Reserve Board, the Federal Deposit Insurance Corporation, the Consumer Financial Protection Bureau, and state regulators, whose policies, regulations, and enforcement actions could affect CTBI’s results. These statements are representative only on the date hereof, and CTBI undertakes no obligation to update any forward-looking statements made.
PART I - FINANCIAL INFORMATION
Item 1. Condensed Consolidated Financial Statements
The accompanying information has not been audited by our independent registered public accountants; however, in the opinion of management such information reflects all adjustments necessary for a fair presentation of the results for the interim period. All such adjustments are of a normal and recurring nature.
The accompanying condensed consolidated financial statements are presented in accordance with the requirements of Form 10-Q and consequently do not include all of the disclosures normally required by accounting principles generally accepted in the United States of America or those normally made in the Registrant’s annual report on Form 10-K. Accordingly, the reader of the Form 10-Q should refer to the Registrant’s Form 10-K for the year ended December 31, 2016 for further information in this regard.

Community Trust Bancorp, Inc.
Condensed Consolidated Balance Sheets

(dollars in thousands) |  | (unaudited) June 30 2017 |  |  | December 31 2016 |
Assets: |  |  |  |  |  |
Cash and due from banks |  | $ | 51,224 |  |  | $ | 48,603 |
Interest bearing deposits |  |  | 74,806 |  |  |  | 95,586 |
Federal funds sold |  |  | 1,800 |  |  |  | 527 |
Cash and cash equivalents |  |  | 127,830 |  |  |  | 144,716 |
Certificates of deposit in other banks |  |  | 12,260 |  |  |  | 980 |
Securities available-for-sale at fair value (amortized cost of $611,178 and $608,939, respectively) |  |  | 610,368 |  |  |  | 605,394 |
Securities held-to-maturity at amortized cost (fair value of $858 and $867, respectively) |  |  | 858 |  |  |  | 866 |
Loans held for sale |  |  | 4,624 |  |  |  | 1,244 |
Loans |  |  | 3,087,342 |  |  |  | 2,938,371 |
Allowance for loan and lease losses |  |  | (37,133 | ) |  |  | (35,933 | )
Net loans |  |  | 3,050,209 |  |  |  | 2,902,438 |
Premises and equipment, net |  |  | 47,036 |  |  |  | 47,940 |
Federal Home Loan Bank stock |  |  | 17,927 |  |  |  | 17,927 |
Federal Reserve Bank stock |  |  | 4,887 |  |  |  | 4,887 |
Goodwill |  |  | 65,490 |  |  |  | 65,490 |
Core deposit intangible (net of accumulated amortization of $8,562 and $8,483, respectively) |  |  | 53 |  |  |  | 133 |
Bank owned life insurance |  |  | 64,589 |  |  |  | 63,881 |
Mortgage servicing rights |  |  | 3,304 |  |  |  | 3,433 |
Other real estate owned |  |  | 32,785 |  |  |  | 35,856 |
Other assets |  |  | 38,893 |  |  |  | 36,984 |
Total assets |  | $ | 4,081,113 |  |  | $ | 3,932,169 |
Liabilities and shareholders’ equity: |  |  |  |  |  |  |  |
Deposits: |  |  |  |  |  |  |  |
Noninterest bearing |  | $ | 782,864 |  |  | $ | 767,918 |
Interest bearing |  |  | 2,322,746 |  |  |  | 2,313,390 |
Total deposits |  |  | 3,105,610 |  |  |  | 3,081,308 |
Repurchase agreements |  |  | 257,208 |  |  |  | 251,065 |
Federal funds purchased |  |  | 7,220 |  |  |  | 4,816 |
Advances from Federal Home Loan Bank |  |  | 100,894 |  |  |  | 944 |
Long-term debt |  |  | 59,341 |  |  |  | 61,341 |
Deferred taxes |  |  | 8,916 |  |  |  | 7,836 |
Other liabilities |  |  | 27,009 |  |  |  | 24,244 |
Total liabilities |  |  | 3,566,198 |  |  |  | 3,431,554 |
Shareholders’ equity: |  |  |  |  |  |  |  |
Preferred stock, 300,000 shares authorized and unissued |  |  | - |  |  |  | - |
Common stock, $5 par value, shares authorized 25,000,000; shares outstanding 2017 – 17,670,501; 2016 – 17,628,695 |  |  | 88,353 |  |  |  | 88,144 |
Capital surplus |  |  | 220,471 |  |  |  | 219,697 |
Retained earnings |  |  | 206,617 |  |  |  | 195,078 |
Accumulated other comprehensive loss, net of tax |  |  | (526 | ) |  |  | (2,304 | )
Total shareholders’ equity |  |  | 514,915 |  |  |  | 500,615 |
Total liabilities and shareholders’ equity |  | $ | 4,081,113 |  |  | $ | 3,932,169 |

See notes to condensed consolidated financial statements.

Community Trust Bancorp, Inc.
Condensed Consolidated Statements of Income and Comprehensive Income
(unaudited)

|  | Three Months Ended |  |  | Six Months Ended |
|  | June 30 |  |  | June 30 |
(in thousands except per share data) |  | 2017 |  |  | 2016 |  |  | 2017 |  |  | 2016 |
Interest income: |  |  |  |  |  |  |  |  |  |  |  |
Interest and fees on loans, including loans held for sale |  | $ | 34,880 |  |  | $ | 33,255 |  |  | $ | 68,355 |  |  | $ | 66,579 |
Interest and dividends on securities |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Taxable |  |  | 2,230 |  |  |  | 2,065 |  |  |  | 4,260 |  |  |  | 4,158 |
Tax exempt |  |  | 721 |  |  |  | 658 |  |  |  | 1,470 |  |  |  | 1,350 |
Interest and dividends on Federal Reserve Bank and Federal Home Loan Bank stock |  |  | 283 |  |  |  | 252 |  |  |  | 559 |  |  |  | 506 |
Other, including interest on federal funds sold |  |  | 297 |  |  |  | 144 |  |  |  | 535 |  |  |  | 308 |
Total interest income |  |  | 38,411 |  |  |  | 36,374 |  |  |  | 75,179 |  |  |  | 72,901 |
Interest expense: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Interest on deposits |  |  | 3,181 |  |  |  | 2,677 |  |  |  | 6,122 |  |  |  | 5,248 |
Interest on repurchase agreements and other short-term borrowings |  |  | 411 |  |  |  | 284 |  |  |  | 749 |  |  |  | 548 |
Interest on advances from Federal Home Loan Bank |  |  | 165 |  |  |  | 4 |  |  |  | 168 |  |  |  | 48 |
Interest on long-term debt |  |  | 414 |  |  |  | 350 |  |  |  | 810 |  |  |  | 674 |
Total interest expense |  |  | 4,171 |  |  |  | 3,315 |  |  |  | 7,849 |  |  |  | 6,518 |
Net interest income |  |  | 34,240 |  |  |  | 33,059 |  |  |  | 67,330 |  |  |  | 66,383 |
Provision for loan losses |  |  | 2,764 |  |  |  | 1,873 |  |  |  | 3,993 |  |  |  | 3,638 |
Net interest income after provision for loan losses |  |  | 31,476 |  |  |  | 31,186 |  |  |  | 63,337 |  |  |  | 62,745 |
Noninterest income: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Service charges on deposit accounts |  |  | 6,199 |  |  |  | 6,272 |  |  |  | 12,159 |  |  |  | 12,117 |
Gains on sales of loans, net |  |  | 251 |  |  |  | 446 |  |  |  | 507 |  |  |  | 762 |
Trust and wealth management income |  |  | 2,649 |  |  |  | 2,396 |  |  |  | 5,235 |  |  |  | 4,671 |
Loan related fees |  |  | 773 |  |  |  | 739 |  |  |  | 1,778 |  |  |  | 1,350 |
Bank owned life insurance |  |  | 526 |  |  |  | 538 |  |  |  | 1,050 |  |  |  | 1,068 |
Brokerage revenue |  |  | 423 |  |  |  | 317 |  |  |  | 735 |  |  |  | 680 |
Securities gains (losses) |  |  | 18 |  |  |  | (4 | ) |  |  | 10 |  |  |  | 64 |
Other noninterest income |  |  | 1,472 |  |  |  | 1,065 |  |  |  | 2,416 |  |  |  | 2,028 |
Total noninterest income |  |  | 12,311 |  |  |  | 11,769 |  |  |  | 23,890 |  |  |  | 22,740 |
Noninterest expense: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Officer salaries and employee benefits |  |  | 2,663 |  |  |  | 2,964 |  |  |  | 5,927 |  |  |  | 6,057 |
Other salaries and employee benefits |  |  | 11,381 |  |  |  | 11,358 |  |  |  | 23,041 |  |  |  | 22,398 |
Occupancy, net |  |  | 1,972 |  |  |  | 1,966 |  |  |  | 3,999 |  |  |  | 4,023 |
Equipment |  |  | 748 |  |  |  | 729 |  |  |  | 1,534 |  |  |  | 1,444 |
Data processing |  |  | 1,757 |  |  |  | 1,559 |  |  |  | 3,546 |  |  |  | 3,128 |
Bank franchise tax |  |  | 1,521 |  |  |  | 1,400 |  |  |  | 3,041 |  |  |  | 2,799 |
Legal fees |  |  | 385 |  |  |  | 502 |  |  |  | 827 |  |  |  | 982 |
Professional fees |  |  | 551 |  |  |  | 483 |  |  |  | 1,047 |  |  |  | 922 |
Advertising and marketing |  |  | 708 |  |  |  | 580 |  |  |  | 1,393 |  |  |  | 1,209 |
FDIC insurance |  |  | 315 |  |  |  | 576 |  |  |  | 607 |  |  |  | 1,159 |
Other real estate owned provision and expense |  |  | 1,827 |  |  |  | 468 |  |  |  | 2,743 |  |  |  | 1,019 |
Repossession expense |  |  | 227 |  |  |  | 424 |  |  |  | 428 |  |  |  | 639 |
Amortization of limited partnership investments |  |  | 604 |  |  |  | 997 |  |  |  | 1,209 |  |  |  | 1,532 |
Other noninterest expense |  |  | 2,907 |  |  |  | 3,186 |  |  |  | 5,868 |  |  |  | 6,123 |
Total noninterest expense |  |  | 27,566 |  |  |  | 27,192 |  |  |  | 55,210 |  |  |  | 53,434 |
Income before income taxes |  |  | 16,221 |  |  |  | 15,763 |  |  |  | 32,017 |  |  |  | 32,051 |
Income taxes |  |  | 4,680 |  |  |  | 4,197 |  |  |  | 9,199 |  |  |  | 8,883 |
Net income |  |  | 11,541 |  |  |  | 11,566 |  |  |  | 22,818 |  |  |  | 23,168 |
Other comprehensive income: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Unrealized holding gains on securities available-for-sale: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Unrealized holding gains arising during the period |  |  | 1,630 |  |  |  | 2,321 |  |  |  | 2,745 |  |  |  | 8,124 |
Less: Reclassification adjustments for realized gains (losses) included in net income |  |  | 18 |  |  |  | (4 | ) |  |  | 10 |  |  |  | 64 |
Tax expense |  |  | 564 |  |  |  | 814 |  |  |  | 957 |  |  |  | 2,821 |
Other comprehensive income, net of tax |  |  | 1,048 |  |  |  | 1,511 |  |  |  | 1,778 |  |  |  | 5,239 |
Comprehensive income |  | $ | 12,589 |  |  | $ | 13,077 |  |  | $ | 24,596 |  |  | $ | 28,407 |
Basic earnings per share |  | $ | 0.65 |  |  | $ | 0.66 |  |  | $ | 1.29 |  |  | $ | 1.32 |
Diluted earnings per share |  | $ | 0.65 |  |  | $ | 0.66 |  |  | $ | 1.29 |  |  | $ | 1.32 |
Weighted average shares outstanding-basic |  |  | 17,626 |  |  |  | 17,530 |  |  |  | 17,621 |  |  |  | 17,521 |
Weighted average shares outstanding-diluted |  |  | 17,645 |  |  |  | 17,542 |  |  |  | 17,641 |  |  |  | 17,538 |
Dividends declared per share |  | $ | 0.32 |  |  | $ | 0.31 |  |  | $ | 0.64 |  |  | $ | 0.62 |

See notes to condensed consolidated financial statements.

Community Trust Bancorp, Inc.
Condensed Consolidated Statements of Cash Flows
(unaudited)

|  | Six Months Ended |
|  | June 30 |
(in thousands) |  | 2017 |  |  | 2016 |
Cash flows from operating activities: |  |  |  |  |  |
Net income |  | $ | 22,818 |  |  | $ | 23,168 |
Adjustments to reconcile net income to net cash provided by operating activities: |  |  |  |  |  |  |  |
Depreciation and amortization |  |  | 2,023 |  |  |  | 1,909 |
Deferred taxes |  |  | 123 |  |  |  | 515 |
Stock-based compensation |  |  | 302 |  |  |  | 235 |
Excess tax benefits of stock-based compensation |  |  | 0 |  |  |  | 93 |
Provision for loan losses |  |  | 3,993 |  |  |  | 3,638 |
Write-downs of other real estate owned and other repossessed assets |  |  | 1,987 |  |  |  | 224 |
Gains on sale of mortgage loans held for sale |  |  | (507 | ) |  |  | (762 | )
Securities gains |  |  | (10 | ) |  |  | (64 | )
Gain on debt repurchase |  |  | (560 | ) |  |  | 0 |
Losses on sale of assets, net |  |  | 10 |  |  |  | 75 |
Proceeds from sale of mortgage loans held for sale |  |  | 22,859 |  |  |  | 34,372 |
Funding of mortgage loans held for sale |  |  | (25,732 | ) |  |  | (34,145 | )
Amortization of securities premiums and discounts, net |  |  | 1,551 |  |  |  | 1,016 |
Change in cash surrender value of bank owned life insurance |  |  | (708 | ) |  |  | (758 | )
Mortgage servicing rights: |  |  |  |  |  |  |  |
Fair value adjustments |  |  | 301 |  |  |  | 660 |
New servicing assets created |  |  | (172 | ) |  |  | (221 | )
Changes in: |  |  |  |  |  |  |  |
Other assets |  |  | (1,966 | ) |  |  | (3,371 | )
Other liabilities |  |  | 2,756 |  |  |  | (1,813 | )
Net cash provided by operating activities |  |  | 29,068 |  |  |  | 24,771 |
Cash flows from investing activities: |  |  |  |  |  |  |  |
Certificates of deposit in other banks: |  |  |  |  |  |  |  |
Purchase of certificates of deposit |  |  | (11,515 | ) |  |  | 0 |
Maturity of certificates of deposit |  |  | 235 |  |  |  | 2,732 |
Securities available-for-sale (AFS): |  |  |  |  |  |  |  |
Purchase of AFS securities |  |  | (77,344 | ) |  |  | (30,274 | )
Proceeds from the sales of AFS securities |  |  | 3,261 |  |  |  | 3,509 |
Proceeds from prepayments and maturities of AFS securities |  |  | 70,304 |  |  |  | 49,693 |
Securities held-to-maturity (HTM): |  |  |  |  |  |  |  |
Proceeds from maturities of HTM securities |  |  | 8 |  |  |  | 0 |
Change in loans, net |  |  | (151,624 | ) |  |  | (62,493 | )
Purchase of premises and equipment |  |  | (1,187 | ) |  |  | (1,746 | )
Proceeds from sale and retirement of premises and equipment |  |  | 25 |  |  |  | 10 |
Proceeds from sale of other real estate and other repossessed assets |  |  | 1,128 |  |  |  | 3,713 |
Net cash used in investing activities |  |  | (166,709 | ) |  |  | (34,856 | )
Cash flows from financing activities: |  |  |  |  |  |  |  |
Change in deposits, net |  |  | 24,302 |  |  |  | 61,201 |
Change in repurchase agreements, federal funds purchased, and other short-term borrowings, net |  |  | 8,547 |  |  |  | 10,811 |
Proceeds from Federal Home Loan Bank advances |  |  | 100,000 |  |  |  | 0 |
Payments on advances from Federal Home Loan Bank |  |  | (50 | ) |  |  | (100,057 | )
Repurchase of long-term debt |  |  | (1,440 | ) |  |  | 0 |
Issuance of common stock |  |  | 708 |  |  |  | 560 |
Repurchase of common stock |  |  | 0 |  |  |  | (382 | )
Excess tax benefits of stock-based compensation |  |  | 0 |  |  |  | (93 | )
Dividends paid |  |  | (11,312 | ) |  |  | (10,916 | )
Net cash provided by (used in) financing activities |  |  | 120,755 |  |  |  | (38,876 | )
Net decrease in cash and cash equivalents |  |  | (16,886 | ) |  |  | (48,961 | )
Cash and cash equivalents at beginning of period |  |  | 144,716 |  |  |  | 187,611 |
Cash and cash equivalents at end of period |  | $ | 127,830 |  |  | $ | 138,650 |
Supplemental disclosures: |  |  |  |  |  |  |  |
Income taxes paid |  | $ | 6,400 |  |  | $ | 11,279 |
Interest paid |  |  | 6,912 |  |  |  | 5,763 |
Non-cash activities: |  |  |  |  |  |  |  |
Loans to facilitate the sale of other real estate owned and repossessed assets |  |  | 1,574 |  |  |  | 2,257 |
Common stock dividends accrued, paid in subsequent quarter |  |  | 204 |  |  |  | 208 |
Real estate acquired in settlement of loans |  |  | 1,434 |  |  |  | 3,292 |

See notes to condensed consolidated financial statements.

Community Trust Bancorp, Inc.
Notes to Condensed Consolidated Financial Statements (unaudited)
Note 1 - Summary of Significant Accounting Policies
In the opinion of management, the unaudited condensed consolidated financial statements include all adjustments (which consist of normal recurring adjustments) necessary, to present fairly the condensed consolidated financial position as of June 30, 2017, the results of operations for the three and six months ended June 30, 2017 and 2016, and the cash flows for the six months ended June 30, 2017 and 2016. In accordance with accounting principles generally accepted in the United States of America for interim financial information, these statements do not include certain information and footnote disclosures required by accounting principles generally accepted in the United States of America for complete annual financial statements. The results of operations for the three and six months ended June 30, 2017 and the cash flows for the six months ended June 30, 2017 and 2016 are not necessarily indicative of the results to be expected for the full year. The condensed consolidated balance sheet as of December 31, 2016 has been derived from the audited consolidated financial statements of Community Trust Bancorp, Inc. (“CTBI”) for that period. For further information, refer to the consolidated financial statements and footnotes thereto for the year ended December 31, 2016, included in our annual report on Form 10-K.
Principles of Consolidation – The unaudited condensed consolidated financial statements include the accounts of CTBI and its separate and distinct, wholly owned subsidiaries Community Trust Bank, Inc. (“CTB”) and Community Trust and Investment Company. All significant intercompany transactions have been eliminated in consolidation.
Reclassifications – Certain reclassifications considered to be immaterial have been made in the prior year condensed consolidated financial statements to conform to current year classifications. These reclassifications had no effect on net income.
New Accounting Standards –
Ø Financial Instruments – Overall – In January 2016, the FASB issued ASU No. 2016-01, Financial Instruments – Overall (Subtopic 825-10). The amendments in this Update require all equity investments to be measured at fair value with changes in the fair value recognized through net income (other than those accounted for under equity method of accounting or those that result in consolidation of the investee). The amendments in this Update also require an entity to present separately in other comprehensive income the portion of the total change in the fair value of a liability resulting from a change in the instrument-specific credit risk when the entity has elected to measure the liability at fair value in accordance with the fair value option for financial instruments. In addition, the amendments in this Update eliminate the requirement to disclose the method(s) and significant assumptions used to estimate the fair value that is required to be disclosed for financial instruments measured at amortized cost on the balance sheet for public business entities. Public business entities will be required to use the exit price notion when measuring the fair value of financial instruments for disclosure purposes. This Update is the final version of Proposed ASU 2013-220—Financial Instruments—Overall (Subtopic 825-10) and Proposed ASU 2013-221—Financial Instruments—Overall (Subtopic 825-10). For public business entities, the amendments in this Update are effective for fiscal years beginning after December 15, 2017, including interim periods within those fiscal years. The amendments should be applied by means of a cumulative-effect adjustment to the balance sheet as of the beginning of the year of adoption. The amendments related to equity securities without readily determinable fair values (including disclosure requirements) should be applied prospectively to equity investments that exist as of the date of adoption. Management does not expect a significant impact on CTBI’s accounting for equity investments as a result of this ASU. At this time, we cannot quantify the change in the fair value disclosures since we are currently evaluating the full impact of this ASU and are in the planning stages of developing appropriate procedures and processes to comply with the disclosure requirements of such amendments.
Ø Leases – In February 2016, the FASB issued ASU No. 2016-02, Leases (Topic 842). ASU 2016-02 establishes a right of use model that requires a lessee to record a right of use asset and a lease liability for all leases with terms longer than 12 months. Leases will be classified as either finance or operating, with classification affecting the pattern of expense recognition in the income statement. For lessors, the guidance modifies the classification criteria and the accounting for sales-type and direct financing leases. A lease will be treated as a sale if it transfers all of the risks and rewards, as well as control of the underlying asset, to the lessee. If risks and rewards are conveyed without the transfer of control, the lease is treated as a financing. If the lessor does not convey risks and rewards or control, an operating lease results. The amendments are effective for fiscal years beginning after December 15, 2018, including interim periods within those fiscal years for public business entities. Entities are required to use a modified retrospective approach for leases that exist or are entered into after the beginning of the earliest comparative period in the financial statements, with certain practical expedients available. Early adoption is permitted. CTBI has an implementation team working through the provisions of ASU 2016-02 including reviewing all leases to assess the impact on its accounting and disclosures. CTBI does not anticipate a significant increase in leasing activity between now and the date of adoption. While we expect the impact of this ASU to be significant, we have not finalized our calculation of the estimated amounts as we are currently evaluating certain significant variables within the calculation including the impact of individual renewal options and applicable discount rates for each individual lease.
Ø Investments—Equity Method and Joint Ventures: Simplifying the Transition to the Equity Method of Accounting – In March 2016, the FASB issued ASU No. 2016-07, Investments - Equity Method and Joint Ventures (Topic 323): Simplifying the Transition to the Equity Method of Accounting. The amendments affect all entities that have an investment that becomes qualified for the equity method of accounting as a result of an increase in the level of ownership interest or degree of influence.
The amendments eliminate the requirement that when an investment qualifies for use of the equity method as a result of an increase in the level of ownership interest or degree of influence, an investor must adjust the investment, results of operations, and retained earnings retroactively on a step-by-step basis as if the equity method had been in effect during all previous periods that the investment had been held. The amendments require that the equity method investor add the cost of acquiring the additional interest in the investee to the current basis of the investor’s previously held interest and adopt the equity method of accounting as of the date the investment becomes qualified for equity method accounting. Therefore, upon qualifying for the equity method of accounting, no retroactive adjustment of the investment is required.
The amendments require that an entity that has an available-for-sale equity security that becomes qualified for the equity method of accounting recognize through earnings the unrealized holding gain or loss in accumulated other comprehensive income at the date the investment becomes qualified for use of the equity method. The amendments should be applied prospectively upon their effective date to increases in the level of ownership interest or degree of influence that result in the adoption of the equity method.
The amendments became effective for all entities for fiscal years, and interim periods within those fiscal years, beginning after December 15, 2016 and did not have a material impact on CTBI’s consolidated financial statements.
Ø Compensation—Stock Compensation: Improvements to Employee Share-Based Payment Accounting – In April 2016, the FASB issued Accounting Standards Update (ASU) No. 2016-09, Compensation - Stock Compensation (Topic 718): Improvements to Employee Share-Based Payment Accounting. The amendments are intended to improve the accounting for employee share-based payments and affect all organizations that issue share-based payment awards to their employees.
Several aspects of the accounting for share-based payment award transactions are simplified, including: (a) income tax consequences; (b) classification of awards as either equity or liabilities; and (c) classification on the statement of cash flows.
For public companies, the amendments were effective for annual periods beginning after December 15, 2016, and interim periods within those annual periods. CTBI adopted this ASU effective January 1, 2017, and it did not have a material impact on our consolidated financial statements.
Ø Revenue from Contracts with Customers – In May 2014, the FASB issued ASU No. 2014-09, Revenue from Contracts with Customers. The core principle of ASU 2014-09 is that an entity should recognize revenue to depict the transfer of promised goods or services to customers in an amount that reflects the consideration to which the entity expects to be entitled in exchange for those goods or services. The guidance also specifies the accounting for some costs to obtain or fulfill a contract with a customer, as well as enhanced disclosure requirements. In August 2015, the FASB issued ASU 2015-14 which deferred the effective date of ASU 2014-09 to fiscal years, and interim reporting periods within those fiscal years, beginning after December 15, 2017. In March 2016, the FASB issued ASU 2016-08 which clarified the revenue recognition implementation guidance on principal versus agent considerations and is effective during the same period as ASU 2014-09. In April 2016, the FASB issued ASU 2016-10 which clarified the revenue recognition guidance regarding the identification of performance obligations and the licensing implementation and is effective during the same period as ASU 2014-09. In May 2016, the FASB issued ASU 2016-12 which narrowly amended the revenue recognition guidance regarding collectability, noncash consideration, presentation of sales tax, and transition. ASU 2016-12 is effective during the same period as ASU 2014-09. Management is currently evaluating the effects of these ASUs on its financial statements and disclosures but does not expect a material impact on CTBI’s consolidated financial statements, as we have determined the majority of the revenues earned by CTBI are not within the scope of ASU 2014-09.
Ø Accounting for Credit Losses – In June 2016, the FASB issued ASU No. 2016-13, Financial Instruments—Credit Losses (Topic 326): Measurement of Credit Losses on Financial Instruments. The provisions of ASU 2016-13 were issued to provide financial statement users with more decision-useful information about the expected credit losses on financial instruments that are not accounted for at fair value through net income, including loans held for investment, held-to-maturity debt securities, trade and other receivables, net investment in leases and other commitments to extend credit held by a reporting entity at each reporting date. This ASU requires that financial assets measured at amortized cost be presented at the net amount expected to be collected, through an allowance for credit losses that is deducted from the amortized cost basis. The amendments in ASU 2016-13 eliminate the probable incurred loss recognition in current GAAP and reflect an entity’s current estimate of all expected credit losses. The measurement of expected credit losses is based upon historical experience, current conditions, and reasonable and supportable forecasts that affect the collectability of the financial assets.
For purchased financial assets with a more-than-insignificant amount of credit deterioration since origination (“PCD assets”) that are measured at amortized cost, the initial allowance for credit losses is added to the purchase price rather than being reported as a credit loss expense. Subsequent changes in the allowance for credit losses on PCD assets are recognized through the statement of income as a credit loss expense.
Credit losses relating to available-for-sale debt securities will be recorded through an allowance for credit losses rather than as a direct write-down to the security.
ASU 2016-13 is effective for fiscal years, and interim periods within those fiscal years, beginning after December 15, 2019. Early adoption is permitted for fiscal years, and interim periods within those fiscal years, beginning after December 15, 2018. CTBI has an implementation team working through the provisions of ASU 2016-13 including assessing the impact on its accounting and disclosures.
Ø Statement of Cash Flows – In August 2016, the FASB issued ASU No. 2016-15, Statement of Cash Flows (Topic 230): Classification of Certain Cash Receipts and Cash Payments. Stakeholders indicated that there is diversity in practice in how certain cash receipts and cash payments are presented and classified in the statement of cash flows under Topic 230, Statement of Cash Flows, and other Topics. This ASU addresses the following eight specific cash flow issues: Debt prepayment or debt extinguishment costs; settlement of zero-coupon debt instruments or other debt instruments with coupon interest rates that are insignificant in relation to the effective interest rate of the borrowing; contingent consideration payments made after a business combination; proceeds from the settlement of insurance claims; proceeds from the settlement of corporate-owned life insurance policies (COLIs) (including bank-owned life insurance policies (BOLIs)); distributions received from equity method investees; beneficial interests in securitization transactions; and separately identifiable cash flows and application of the predominance principle. The amendments in this Update apply to all entities that are required to present a statement of cash flows under Topic 230. This Update is the final version of Proposed Accounting Standards Update EITF-15F—Statement of Cash Flows—Classification of Certain Cash Receipts and Cash Payments (Topic 230), which has been deleted. The amendments in this Update are effective for public business entities for fiscal years beginning after December 15, 2017, and interim periods within those fiscal years. The amendments in this Update should be applied using a retrospective transition method to each period presented. If it is impracticable to apply the amendments retrospectively for some of the issues, the amendments for those issues would be applied prospectively as of the earliest date practicable. Management intends to adopt this ASU effective January 1, 2018, and we do not expect a material impact on CTBI’s consolidated financial statements.
Ø Simplifying the Test for Goodwill Impairment – In January 2017, the FASB issued ASU No. 2017-04, Intangibles – Goodwill and Other (Topic 350) – Simplifying the Test for Goodwill Impairment. These amendments eliminate Step 2 from the goodwill impairment test. The amendments also eliminate the requirements from any reporting unit with a zero or negative carrying amount to perform a qualitative assessment and, if it fails that qualitative test, to perform Step 2 of the goodwill impairment test. An entity still has the option to perform the qualitative assessment for a reporting unit to determine if the quantitative impairment test is necessary. The guidance is effective for fiscal years beginning after December 15, 2019, and interim periods with those fiscal years. ASU 2017-04 should be implemented on a prospective basis. Management does not expect ASU 2017-04 to have an impact on CTBI’s consolidated financial statements.
Ø Receivables – Nonrefundable Fees and Other Costs: Premium Amortization on Purchased Callable Debt Securities – In April 2017, the FASB issued ASU No. 2017-08, Receivables—Nonrefundable Fees and Other Costs (Subtopic 310-20), Premium Amortization on Purchased Callable Debt Securities. The ASU shortens the amortization period for certain callable debt securities held at a premium to the earliest call date. However, the amendments do not require an accounting change for securities held at a discount; the discount continues to be amortized to maturity. The amendments are effective for public business entities for fiscal periods beginning after December 15, 2018, including interim periods within those fiscal periods. Entities are required to apply the amendments on a modified retrospective basis through a cumulative-effect adjustment directly to retained earnings as of the beginning of the period of adoption. We plan to early adopt this ASU effective January 1, 2018. We have reviewed the anticipated effects of this ASU and determined that we expect a $150 thousand reduction in retained earnings and a quarterly increase in amortization expense between $24 thousand and $30 thousand.
Critical Accounting Policies and Estimates
The preparation of consolidated financial statements in conformity with accounting principles generally accepted in the United States of America requires the appropriate application of certain accounting policies, many of which require us to make estimates and assumptions about future events and their impact on amounts reported in our consolidated financial statements and related notes. Since future events and their impact cannot be determined with certainty, the actual results will inevitably differ from our estimates. Such differences could be material to the consolidated financial statements.
We believe the application of accounting policies and the estimates required therein are reasonable. These accounting policies and estimates are constantly reevaluated, and adjustments are made when facts and circumstances dictate a change. Historically, we have found our application of accounting policies to be appropriate, and actual results have not differed materially from those determined using necessary estimates.
We have identified the following critical accounting policies:
Investments – Management determines the classification of securities at purchase. We classify securities into held-to-maturity, trading, or available-for-sale categories. Held-to-maturity securities are those which we have the positive intent and ability to hold to maturity and are reported at amortized cost. In accordance with Financial Accounting Standards Board (FASB) Accounting Standards Codification (ASC) 320, Investment Securities, investments in debt securities that are not classified as held-to-maturity and equity securities that have readily determinable fair values shall be classified in one of the following categories and measured at fair value in the statement of financial position:
a. Trading securities. Securities that are bought and held principally for the purpose of selling them in the near term (thus held for only a short period of time) shall be classified as trading securities. Trading generally reflects active and frequent buying and selling, and trading securities are generally used with the objective of generating profits on short-term differences in price.
b. Available-for-sale securities. Investments not classified as trading securities (nor as held-to-maturity securities) shall be classified as available-for-sale securities.
We do not have any securities that are classified as trading securities. Available-for-sale securities are reported at fair value, with unrealized gains and losses included as a separate component of shareholders’ equity, net of tax. If declines in fair value are other than temporary, the carrying value of the securities is written down to fair value as a realized loss with a charge to income for the portion attributable to credit losses and a charge to other comprehensive income for the portion that is not credit related.
Gains or losses on disposition of securities are computed by specific identification for all securities except for shares in mutual funds, which are computed by average cost. Interest and dividend income, adjusted by amortization of purchase premium or discount, is included in earnings.
When the fair value of a security is below its amortized cost, and depending on the length of time the condition exists and the extent the fair market value is below amortized cost, additional analysis is performed to determine whether an other than temporary impairment condition exists. Available-for-sale and held-to-maturity securities are analyzed quarterly for possible other than temporary impairment. The analysis considers (i) whether we have the intent to sell our securities prior to recovery and/or maturity and (ii) whether it is more likely than not that we will not have to sell our securities prior to recovery and/or maturity. Often, the information available to conduct these assessments is limited and rapidly changing, making estimates of fair value subject to judgment. If actual information or conditions are different than estimated, the extent of the impairment of the security may be different than previously estimated, which could have a material effect on the CTBI’s results of operations and financial condition.
Loans – Loans with the ability and the intent to be held until maturity and/or payoff are reported at the carrying value of unpaid principal reduced by unearned interest, an allowance for loan and lease losses, and unamortized deferred fees or costs. Income is recorded on the level yield basis. Interest accrual is discontinued when management believes, after considering economic and business conditions, collateral value, and collection efforts, that the borrower’s financial condition is such that collection of interest is doubtful. Any loan greater than 90 days past due must be well secured and in the process of collection to continue accruing interest. Cash payments received on nonaccrual loans generally are applied against principal, and interest income is only recorded once principal recovery is reasonably assured. Loans are not reclassified as accruing until principal and interest payments remain current for a period of time, generally six months, and future payments appear reasonably certain. Included in certain loan categories of impaired loans are troubled debt restructurings that were classified as impaired. A restructuring of a debt constitutes a troubled debt restructuring if the creditor for economic or legal reasons related to the debtor’s financial difficulties grants a concession to the debtor that it would not otherwise consider.
Loan origination and commitment fees and certain direct loan origination costs are deferred and the net amount amortized over the estimated life of the related loans, leases, or commitments as a yield adjustment.
Allowance for Loan and Lease Losses – We maintain an allowance for loan and lease losses (“ALLL”) at a level that is appropriate to cover estimated credit losses on individually evaluated loans determined to be impaired, as well as estimated credit losses inherent in the remainder of the loan and lease portfolio. Credit losses are charged and recoveries are credited to the ALLL.
We utilize an internal risk grading system for commercial credits. Those larger commercial credits that exhibit probable or observed credit weaknesses are subject to individual review. The borrower’s cash flow, adequacy of collateral coverage, and other options available to CTBI, including legal remedies, are evaluated. The review of individual loans includes those loans that are impaired as defined by ASC 310-10-35, Impairment of a Loan. We evaluate the collectability of both principal and interest when assessing the need for loss provision. Historical loss rates are analyzed and applied to other commercial loans not subject to specific allocations. The ALLL allocation for this pool of commercial loans is established based on the historical average, maximum, minimum, and median loss ratios.
A loan is considered impaired when, based on current information and events, it is probable that CTBI will be unable to collect the scheduled payments of principal or interest when due according to the contractual terms of the loan agreement. Factors considered by management in determining impairment include payment status, collateral value, and the probability of collecting scheduled principal and interest payments when due. Loans that experience insignificant payment delays and payment shortfalls generally are not classified as impaired. Management determines the significance of payment delays and payment shortfalls on a case-by-case basis, taking into consideration all of the circumstances surrounding the loan and the borrower, including the length of the delay, the reasons for the delay, the borrower’s prior payment record, and the amount of the shortfall in relation to the principal and interest owed. Impairment is measured on a loan-by-loan basis for commercial and construction loans by either the present value of expected future cash flows discounted at the loan’s effective interest rate, the loan’s obtainable market price, or the fair value of the collateral if the loan is collateral dependent.
Homogenous loans, such as consumer installment, residential mortgages, and home equity lines are not individually risk graded. The associated ALLL for these loans is measured under ASC 450, Contingencies.
When any secured commercial loan is considered uncollectable, whether past due or not, a current assessment of the value of the underlying collateral is made. If the balance of the loan exceeds the fair value of the collateral, the loan is placed on nonaccrual and the loan is charged down to the value of the collateral less estimated cost to sell or a specific reserve equal to the difference between book value of the loan and the fair value assigned to the collateral is created until such time as the loan is foreclosed. When the foreclosed collateral has been legally assigned to CTBI, the estimated fair value of the collateral less costs to sell is then transferred to other real estate owned or other repossessed assets, and a charge-off is taken for any remaining balance. When any unsecured commercial loan is considered uncollectable the loan is charged off no later than at 90 days past due.
All closed-end consumer loans (excluding conventional 1-4 family residential loans and installment and revolving loans secured by real estate) are charged off no later than 120 days (5 monthly payments) delinquent. If a loan is considered uncollectable, it is charged off earlier than 120 days delinquent. For conventional 1-4 family residential loans and installment and revolving loans secured by real estate, when a loan is 90 days past due, a current assessment of the value of the real estate is made. If the balance of the loan exceeds the fair value of the property, the loan is placed on nonaccrual. Foreclosure proceedings are normally initiated after 120 days. When the foreclosed property has been legally assigned to CTBI, the fair value less estimated costs to sell is transferred to other real estate owned and the remaining balance is taken as a charge-off.
Historical loss rates for loans are adjusted for significant factors that, in management’s judgment, reflect the impact of any current conditions on loss recognition. We use twelve rolling quarters for our historical loss rate analysis. Factors that we consider include delinquency trends, current economic conditions and trends, strength of supervision and administration of the loan portfolio, levels of underperforming loans, level of recoveries to prior year’s charge-offs, trends in loan losses, industry concentrations and their relative strengths, amount of unsecured loans, and underwriting exceptions. Management continually reevaluates the other subjective factors included in its ALLL analysis.
Other Real Estate Owned – When foreclosed properties are acquired, appraisals are obtained and the properties are booked at the current market value less expected sales costs. Additionally, periodic updated appraisals are obtained on unsold foreclosed properties. When an updated appraisal reflects a market value below the current book value, a charge is booked to current earnings to reduce the property to its new market value less expected sales costs. Our policy for determining the frequency of periodic reviews is based upon consideration of the specific properties and the known or perceived market fluctuations in a particular market and is typically between 12 and 18 months but generally not more than 24 months. All revenues and expenses related to the carrying of other real estate owned are recognized through the income statement.
Income Taxes – Income tax expense is based on the taxes due on the consolidated tax return plus deferred taxes based on the expected future tax benefits and consequences of temporary differences between carrying amounts and tax bases of assets and liabilities, using enacted tax rates. Any interest and penalties incurred in connection with income taxes are recorded as a component of income tax expense in the consolidated financial statements. During the six months ended June 30, 2017 and 2016, CTBI has not recognized a significant amount of interest expense or penalties in connection with income taxes.
Note 2 – Stock-Based Compensation
CTBI’s compensation expense related to stock option grants was $14 thousand and $15 thousand, respectively, for the three months ended June 30, 2017 and 2016, and $28 thousand for both the six months ended June 30, 2017 and 2016. Restricted stock expense for the three months ended June 30, 2017 and 2016 was $142 thousand and $97 thousand, respectively, including $13 thousand and $9 thousand in dividends paid for each period. Restricted stock expense for the six months ended June 30, 2017 and 2016 was $274 thousand and $207 thousand, respectively, including $27 thousand and $18 thousand in dividends paid for each period. As of June 30, 2017, there was a total of $0.1 million of unrecognized compensation expense related to unvested stock option awards that will be recognized as expense as the awards vest over a weighted average period of 2.8 years and a total of $1.5 million of unrecognized compensation expense related to restricted stock grants that will be recognized as expense as the awards vest over a weighted average period of 3.3 years.
There were no shares of restricted stock granted during three months ended June 30, 2017 and 2016. There were 23,668 and 18,069 shares of restricted stock granted during the six months ended June 30, 2017 and 2016, respectively. The restricted stock was issued pursuant to the terms of CTBI’s 2015 Stock Ownership Incentive Plan. The restrictions on the restricted stock will lapse ratably over four years, except for a 5,000 management retention restricted stock award granted in 2017 which will cliff vest at the end of five years. However, in the event of certain participant employee termination events occurring within 24 months of a change in control of CTBI or the death of the participant, the restrictions will lapse, and in the event of the participant’s disability, the restrictions will lapse on a pro rata basis. The Compensation Committee will have discretion to review and revise restrictions applicable to a participant’s restricted stock in the event of the participant’s retirement.
There were no stock options granted in the first six months of 2017. There were 10,000 stock options granted during the six months ended June 30, 2016. The fair value of stock options granted during the six months ended June 30, 2016 were established at the date of grant using a Black-Scholes option pricing model with the weighted average assumptions as follows:

|  | Six Months Ended June 30, 2016 |
Expected dividend yield |  |  | 3.70 | %
Risk-free interest rate |  |  | 1.45 | %
Expected volatility |  |  | 34.34 | %
Expected term (in years) |  |  | 7.5 |
Weighted average fair value of options |  | $ | 6.82 |

Note 3 – Securities
Securities are classified into held-to-maturity and available-for-sale categories. Held-to-maturity (HTM) securities are those that CTBI has the positive intent and ability to hold to maturity and are reported at amortized cost. Available-for-sale (AFS) securities are those that CTBI may decide to sell if needed for liquidity, asset-liability management or other reasons. Available-for-sale securities are reported at fair value, with unrealized gains or losses included as a separate component of equity, net of tax.
The amortized cost and fair value of securities at June 30, 2017 are summarized as follows:
Available-for-Sale

(in thousands) |  | Amortized Cost |  |  | Gross Unrealized Gains |  |  | Gross Unrealized Losses |  |  | Fair Value |
U.S. Treasury and government agencies |  | $ | 236,345 |  |  | $ | 173 |  |  | $ | (460 | ) |  | $ | 236,058 |
State and political subdivisions |  |  | 129,872 |  |  |  | 2,833 |  |  |  | (763 | ) |  |  | 131,942 |
U.S. government sponsored agency mortgage-backed securities |  |  | 219,961 |  |  |  | 836 |  |  |  | (2,925 | ) |  |  | 217,872 |
Total debt securities |  |  | 586,178 |  |  |  | 3,842 |  |  |  | (4,148 | ) |  |  | 585,872 |
CRA investment funds |  |  | 25,000 |  |  |  | 90 |  |  |  | (594 | ) |  |  | 24,496 |
Total available-for-sale securities |  | $ | 611,178 |  |  | $ | 3,932 |  |  | $ | (4,742 | ) |  | $ | 610,368 |

Held-to-Maturity

(in thousands) |  | Amortized Cost |  |  | Gross Unrealized Gains |  |  | Gross Unrealized Losses |  |  | Fair Value |
State and political subdivisions |  | $ | 858 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 858 |
Total held-to-maturity securities |  | $ | 858 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 858 |

The amortized cost and fair value of securities at December 31, 2016 are summarized as follows:
Available-for-Sale

(in thousands) |  | Amortized Cost |  |  | Gross Unrealized Gains |  |  | Gross Unrealized Losses |  |  | Fair Value |
U.S. Treasury and government agencies |  | $ | 223,014 |  |  | $ | 193 |  |  | $ | (743 | ) |  | $ | 222,464 |
State and political subdivisions |  |  | 133,351 |  |  |  | 1,957 |  |  |  | (1,792 | ) |  |  | 133,516 |
U.S. government sponsored agency mortgage-backed securities |  |  | 227,574 |  |  |  | 1,008 |  |  |  | (3,526 | ) |  |  | 225,056 |
Total debt securities |  |  | 583,939 |  |  |  | 3,158 |  |  |  | (6,061 | ) |  |  | 581,036 |
CRA investment funds |  |  | 25,000 |  |  |  | 76 |  |  |  | (718 | ) |  |  | 24,358 |
Total available-for-sale securities |  | $ | 608,939 |  |  | $ | 3,234 |  |  | $ | (6,779 | ) |  | $ | 605,394 |

Held-to-Maturity

(in thousands) |  | Amortized Cost |  |  | Gross Unrealized Gains |  |  | Gross Unrealized Losses |  |  | Fair Value |
State and political subdivisions |  | $ | 866 |  |  | $ | 1 |  |  | $ | 0 |  |  | $ | 867 |
Total held-to-maturity securities |  | $ | 866 |  |  | $ | 1 |  |  | $ | 0 |  |  | $ | 867 |

The amortized cost and fair value of securities at June 30, 2017 by contractual maturity are shown below. Expected maturities will differ from contractual maturities because issuers may have the right to call or prepay obligations with or without call or prepayment penalties.

|  | Available-for-Sale |  |  | Held-to-Maturity |
(in thousands) |  | Amortized Cost |  |  | Fair Value |  |  | Amortized Cost |  |  | Fair Value |
Due in one year or less |  | $ | 69,861 |  |  | $ | 69,819 |  |  | $ | 0 |  |  | $ | 0 |
Due after one through five years |  |  | 162,304 |  |  |  | 163,221 |  |  |  | 858 |  |  |  | 858 |
Due after five through ten years |  |  | 51,203 |  |  |  | 52,067 |  |  |  | 0 |  |  |  | 0 |
Due after ten years |  |  | 82,849 |  |  |  | 82,893 |  |  |  | 0 |  |  |  | 0 |
U.S. government sponsored agency mortgage-backed securities |  |  | 219,961 |  |  |  | 217,872 |  |  |  | 0 |  |  |  | 0 |
Total debt securities |  |  | 586,178 |  |  |  | 585,872 |  |  |  | 858 |  |  |  | 858 |
CRA investment funds |  |  | 25,000 |  |  |  | 24,496 |  |  |  | 0 |  |  |  | 0 |
Total securities |  | $ | 611,178 |  |  | $ | 610,368 |  |  | $ | 858 |  |  | $ | 858 |

During the three months ended June 30, 2017, there was a net gain of $18 thousand on sales and calls of AFS securities, consisting of a pre-tax gain of $30 thousand and a pre-tax loss of $12 thousand. During the three months ended June 30, 2016, there was a net loss of $4 thousand on calls of AFS securities, consisting of a pre-tax gain of $1 thousand and a pre-tax loss of $5 thousand.
During the six months ended June 30, 2017, there was a combined gain of $10 thousand on sales and calls of AFS securities, consisting of a pre-tax gain of $29 thousand and a pre-tax loss of $19 thousand. During the six months ended June 30, 2016, there was a combined gain of $64 thousand on sales and calls of AFS securities, consisting of a pre-tax gain of $69 thousand and a pre-tax loss of $5 thousand.
The amortized cost of securities pledged as collateral, to secure public deposits and for other purposes, was $224.1 million at June 30, 2017 and $221.2 million at December 31, 2016.
The amortized cost of securities sold under agreements to repurchase amounted to $297.1 million at June 30, 2017 and $303.5 million at December 31, 2016.
CTBI evaluates its investment portfolio on a quarterly basis for impairment. The analysis performed as of June 30, 2017 indicates that all impairment is considered temporary, market and interest rate driven, and not credit-related. The percentage of total investments with unrealized losses as of June 30, 2017 was 60.7% compared to 65.6% as of December 31, 2016. The following tables provide the amortized cost, gross unrealized losses, and fair market value, aggregated by investment category and length of time the individual securities have been in a continuous unrealized loss position as of June 30, 2017 that are not deemed to be other-than-temporarily impaired. There were no held-to-maturity securities that were deemed to be impaired as of June 30, 2017.
Available-for-Sale

(in thousands) |  | Amortized Cost |  |  | Gross Unrealized Losses |  |  | Fair Value |
Less Than 12 Months |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  | $ | 139,137 |  |  | $ | (419 | ) |  | $ | 138,718 |
State and political subdivisions |  |  | 26,970 |  |  |  | (742 | ) |  |  | 26,228 |
U.S. government sponsored agency mortgage-backed securities |  |  | 132,510 |  |  |  | (2,076 | ) |  |  | 130,434 |
Total debt securities |  |  | 298,617 |  |  |  | (3,237 | ) |  |  | 295,380 |
CRA investment funds |  |  | 17,500 |  |  |  | (347 | ) |  |  | 17,153 |
Total <12 months temporarily impaired AFS securities |  |  | 316,117 |  |  |  | (3,584 | ) |  |  | 312,533 |
12 Months or More |  |  |  |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  |  | 21,647 |  |  |  | (41 | ) |  |  | 21,606 |
State and political subdivisions |  |  | 2,383 |  |  |  | (21 | ) |  |  | 2,362 |
U.S. government sponsored agency mortgage-backed securities |  |  | 30,644 |  |  |  | (849 | ) |  |  | 29,795 |
Total debt securities |  |  | 54,674 |  |  |  | (911 | ) |  |  | 53,763 |
CRA investment funds |  |  | 5,000 |  |  |  | (247 | ) |  |  | 4,753 |
Total ≥12 months temporarily impaired AFS securities |  |  | 59,674 |  |  |  | (1,158 | ) |  |  | 58,516 |
Total |  |  |  |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  |  | 160,784 |  |  |  | (460 | ) |  |  | 160,324 |
State and political subdivisions |  |  | 29,353 |  |  |  | (763 | ) |  |  | 28,590 |
U.S. government sponsored agency mortgage-backed securities |  |  | 163,154 |  |  |  | (2,925 | ) |  |  | 160,229 |
Total debt securities |  |  | 353,291 |  |  |  | (4,148 | ) |  |  | 349,143 |
CRA investment funds |  |  | 22,500 |  |  |  | (594 | ) |  |  | 21,906 |
Total temporarily impaired AFS securities |  | $ | 375,791 |  |  | $ | (4,742 | ) |  | $ | 371,049 |

U.S. Treasury and Government Agencies
The unrealized losses in U.S. Treasury and government agencies were caused by interest rate increases. The contractual terms of those investments do not permit the issuer to settle the securities at a price less than par which will equal amortized cost at maturity. CTBI does not consider those investments to be other-than-temporarily impaired at June 30, 2017, because CTBI does not intend to sell the investments and it is not more likely than not that we will be required to sell the investments before recovery of their amortized cost, which may be maturity.
State and Political Subdivisions
The unrealized losses in securities of state and political subdivisions were caused by interest rate increases. The contractual terms of those investments do not permit the issuer to settle the securities at a price less than par which will equal amortized cost at maturity. CTBI does not consider those investments to be other-than-temporarily impaired at June 30, 2017, because CTBI does not intend to sell the investments before recovery of their amortized cost and it is not more likely than not that we will be required to sell the investments before recovery of their amortized cost, which may be maturity.
U.S. Government Sponsored Agency Mortgage-Backed Securities
The unrealized losses in U.S. government sponsored agency mortgage-backed securities were caused by interest rate increases. CTBI expects to recover the amortized cost basis over the term of the securities. CTBI does not consider those investments to be other-than-temporarily impaired at June 30, 2017, because (i) the decline in market value is attributable to changes in interest rates and not credit quality, (ii) CTBI does not intend to sell the investments, and (iii) it is not more likely than not we will be required to sell the investments before recovery of their amortized cost, which may be maturity.
CRA Investment Funds
CTBI’s CRA investment funds consist of investments in fixed income mutual funds ($24.5 million of the total fair value and $594 thousand of the total unrealized losses in common stock investments). The severity of the impairment (fair value is approximately 2.4% less than cost) and the duration of the impairment correlates with the decline in long-term interest rates in 2017. CTBI evaluated the near-term prospects of these funds in relation to the severity and duration of the impairment. Based on that evaluation, CTBI does not consider those investments to be other-than-temporarily impaired at June 30, 2017.
The analysis performed as of December 31, 2016 indicated that all impairment was considered temporary, market and interest rate driven, and not credit-related. The following tables provide the amortized cost, gross unrealized losses, and fair market value, aggregated by investment category and length of time the individual securities have been in a continuous unrealized loss position as of December 31, 2016 that are not deemed to be other-than-temporarily impaired. There were no held-to-maturity securities that were deemed to be impaired as of December 31, 2016.
Available-for-Sale

(in thousands) |  | Amortized Cost |  |  | Gross Unrealized Losses |  |  | Fair Value |
Less Than 12 Months |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  | $ | 158,732 |  |  | $ | (716 | ) |  | $ | 158,016 |
State and political subdivisions |  |  | 53,491 |  |  |  | (1,780 | ) |  |  | 51,711 |
U.S. government sponsored agency mortgage-backed securities |  |  | 135,939 |  |  |  | (2,646 | ) |  |  | 133,293 |
Total debt securities |  |  | 348,162 |  |  |  | (5,142 | ) |  |  | 343,020 |
CRA investment funds |  |  | 17,500 |  |  |  | (444 | ) |  |  | 17,056 |
Total <12 months temporarily impaired AFS securities |  |  | 365,662 |  |  |  | (5,586 | ) |  |  | 360,076 |
12 Months or More |  |  |  |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  |  | 1,880 |  |  |  | (27 | ) |  |  | 1,853 |
State and political subdivisions |  |  | 751 |  |  |  | (12 | ) |  |  | 739 |
U.S. government sponsored agency mortgage-backed securities |  |  | 31,132 |  |  |  | (880 | ) |  |  | 30,252 |
Total debt securities |  |  | 33,763 |  |  |  | (919 | ) |  |  | 32,844 |
CRA investment funds |  |  | 5,000 |  |  |  | (274 | ) |  |  | 4,726 |
Total ≥12 months temporarily impaired AFS securities |  |  | 38,763 |  |  |  | (1,193 | ) |  |  | 37,570 |
Total |  |  |  |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  |  | 160,612 |  |  |  | (743 | ) |  |  | 159,869 |
State and political subdivisions |  |  | 54,242 |  |  |  | (1,792 | ) |  |  | 52,450 |
U.S. government sponsored agency mortgage-backed securities |  |  | 167,071 |  |  |  | (3,526 | ) |  |  | 163,545 |
Total debt securities |  |  | 381,925 |  |  |  | (6,061 | ) |  |  | 375,864 |
CRA investment funds |  |  | 22,500 |  |  |  | (718 | ) |  |  | 21,782 |
Total temporarily impaired AFS securities |  | $ | 404,425 |  |  | $ | (6,779 | ) |  | $ | 397,646 |

Note 4 – Loans
Major classifications of loans, net of unearned income, deferred loan origination costs, and net premiums on acquired loans, are summarized as follows:

(in thousands) |  | June 30 2017 |  |  | December 31 2016 |
Commercial construction |  | $ | 72,054 |  |  | $ | 66,998 |
Commercial secured by real estate |  |  | 1,179,229 |  |  |  | 1,085,428 |
Equipment lease financing |  |  | 4,903 |  |  |  | 5,512 |
Commercial other |  |  | 352,173 |  |  |  | 350,159 |
Real estate construction |  |  | 58,566 |  |  |  | 57,966 |
Real estate mortgage |  |  | 708,467 |  |  |  | 702,969 |
Home equity |  |  | 93,721 |  |  |  | 91,511 |
Consumer direct |  |  | 135,228 |  |  |  | 133,093 |
Consumer indirect |  |  | 483,001 |  |  |  | 444,735 |
Total loans |  | $ | 3,087,342 |  |  | $ | 2,938,371 |

CTBI has segregated and evaluates its loan portfolio through nine portfolio segments. CTBI serves customers in small and mid-sized communities in eastern, northeastern, central, and south central Kentucky, southern West Virginia, and northeastern Tennessee. Therefore, CTBI’s exposure to credit risk is significantly affected by changes in these communities.
Commercial construction loans are for the purpose of erecting or rehabilitating buildings or other structures for commercial purposes, including any infrastructure necessary for development. Included in this category are improved property, land development, and tract development loans. The terms of these loans are generally short-term with permanent financing upon completion.
Commercial real estate loans include loans secured by nonfarm, nonresidential properties, 1-4 family/multi-family properties, farmland, and other commercial real estate. These loans are originated based on the borrower’s ability to service the debt and secondarily based on the fair value of the underlying collateral.
Equipment lease financing loans are fixed, variable, and tax exempt leases for commercial purposes.
Commercial other loans consist of commercial check loans, agricultural loans, receivable financing, floorplans, loans to financial institutions, loans for purchasing or carrying securities, and other commercial purpose loans. Commercial loans are underwritten based on the borrower’s ability to service debt from the business’s underlying cash flows. As a general practice, we obtain collateral such as real estate, equipment, or other assets, although such loans may be uncollateralized but guaranteed.
Real estate construction loans are typically for owner-occupied properties. The terms of these loans are generally short-term with permanent financing upon completion.
Residential real estate loans are a mixture of fixed rate and adjustable rate first and second lien residential mortgage loans. As a policy, CTBI holds adjustable rate loans and sells the majority of its fixed rate first lien mortgage loans into the secondary market. Changes in interest rates or market conditions may impact a borrower’s ability to meet contractual principal and interest payments. Residential real estate loans are secured by real property.
Home equity lines are revolving adjustable rate credit lines secured by real property.
Consumer direct loans are fixed rate products comprised of unsecured loans, consumer revolving credit lines, deposit secured loans, and all other consumer purpose loans.
Consumer indirect loans are fixed rate loans secured by automobiles, trucks, vans, and recreational vehicles originated at the selling dealership underwritten and purchased by CTBI’s indirect lending department. Both new and used products are financed. Only dealers who have executed dealer agreements with CTBI participate in the indirect lending program.
Not included in the loan balances above were loans held for sale in the amount of $4.6 million at June 30, 2017 and $1.2 million at December 31, 2016.
Refer to note 1 to the condensed consolidated financial statements for further information regarding our nonaccrual policy. Nonaccrual loans segregated by class of loans were as follows:

(in thousands) |  | June 30 2017 |  |  | December 31 2016 |
Commercial: |  |  |  |  |  |
Commercial construction |  | $ | 1,328 |  |  | $ | 1,912 |
Commercial secured by real estate |  |  | 8,713 |  |  |  | 6,326 |
Commercial other |  |  | 1,404 |  |  |  | 1,559 |
Residential: |  |  |  |  |  |  |  |
Real estate construction |  |  | 189 |  |  |  | 11 |
Real estate mortgage |  |  | 7,461 |  |  |  | 6,260 |
Home equity |  |  | 556 |  |  |  | 555 |
Total nonaccrual loans |  | $ | 19,651 |  |  | $ | 16,623 |

The following tables present CTBI’s loan portfolio aging analysis, segregated by class, as of June 30, 2017 and December 31, 2016:

|  | June 30, 2017 |
(in thousands) |  | 30-59 Days Past Due |  |  | 60-89 Days Past Due |  |  | 90+ Days Past Due |  |  | Total Past Due |  |  | Current |  |  | Total Loans |  |  | 90+ and Accruing* |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  | $ | 0 |  |  | $ | 0 |  |  | $ | 1,352 |  |  | $ | 1,352 |  |  | $ | 70,702 |  |  | $ | 72,054 |  |  | $ | 24 |
Commercial secured by real estate |  |  | 2,272 |  |  |  | 3,540 |  |  |  | 7,757 |  |  |  | 13,569 |  |  |  | 1,165,660 |  |  |  | 1,179,229 |  |  |  | 2,171 |
Equipment lease financing |  |  | 0 |  |  |  | 0 |  |  |  | 130 |  |  |  | 130 |  |  |  | 4,773 |  |  |  | 4,903 |  |  |  | 130 |
Commercial other |  |  | 513 |  |  |  | 420 |  |  |  | 1,123 |  |  |  | 2,056 |  |  |  | 350,117 |  |  |  | 352,173 |  |  |  | 235 |
Residential: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Real estate construction |  |  | 1,254 |  |  |  | 177 |  |  |  | 393 |  |  |  | 1,824 |  |  |  | 56,742 |  |  |  | 58,566 |  |  |  | 205 |
Real estate mortgage |  |  | 950 |  |  |  | 4,113 |  |  |  | 11,270 |  |  |  | 16,333 |  |  |  | 692,134 |  |  |  | 708,467 |  |  |  | 5,042 |
Home equity |  |  | 1,004 |  |  |  | 261 |  |  |  | 692 |  |  |  | 1,957 |  |  |  | 91,764 |  |  |  | 93,721 |  |  |  | 300 |
Consumer: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Consumer direct |  |  | 788 |  |  |  | 132 |  |  |  | 34 |  |  |  | 954 |  |  |  | 134,274 |  |  |  | 135,228 |  |  |  | 34 |
Consumer indirect |  |  | 2,826 |  |  |  | 793 |  |  |  | 221 |  |  |  | 3,840 |  |  |  | 479,161 |  |  |  | 483,001 |  |  |  | 221 |
Total |  | $ | 9,607 |  |  | $ | 9,436 |  |  | $ | 22,972 |  |  | $ | 42,015 |  |  | $ | 3,045,327 |  |  | $ | 3,087,342 |  |  | $ | 8,362 |

|  | December 31, 2016 |
(in thousands) |  | 30-59 Days Past Due |  |  | 60-89 Days Past Due |  |  | 90+ Days Past Due |  |  | Total Past Due |  |  | Current |  |  | Total Loans |  |  | 90+ and Accruing* |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  | $ | 22 |  |  | $ | 0 |  |  | $ | 1,940 |  |  | $ | 1,962 |  |  | $ | 65,036 |  |  | $ | 66,998 |  |  | $ | 28 |
Commercial secured by real estate |  |  | 2,033 |  |  |  | 478 |  |  |  | 8,847 |  |  |  | 11,358 |  |  |  | 1,074,070 |  |  |  | 1,085,428 |  |  |  | 3,015 |
Equipment lease financing |  |  | 0 |  |  |  | 0 |  |  |  | 0 |  |  |  | 0 |  |  |  | 5,512 |  |  |  | 5,512 |  |  |  | 0 |
Commercial other |  |  | 997 |  |  |  | 122 |  |  |  | 1,235 |  |  |  | 2,354 |  |  |  | 347,805 |  |  |  | 350,159 |  |  |  | 141 |
Residential: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Real estate construction |  |  | 707 |  |  |  | 42 |  |  |  | 152 |  |  |  | 901 |  |  |  | 57,065 |  |  |  | 57,966 |  |  |  | 152 |
Real estate mortgage |  |  | 1,493 |  |  |  | 5,278 |  |  |  | 10,695 |  |  |  | 17,466 |  |  |  | 685,503 |  |  |  | 702,969 |  |  |  | 6,295 |
Home equity |  |  | 829 |  |  |  | 288 |  |  |  | 905 |  |  |  | 2,022 |  |  |  | 89,489 |  |  |  | 91,511 |  |  |  | 467 |
Consumer: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Consumer direct |  |  | 873 |  |  |  | 265 |  |  |  | 68 |  |  |  | 1,206 |  |  |  | 131,887 |  |  |  | 133,093 |  |  |  | 68 |
Consumer indirect |  |  | 3,288 |  |  |  | 851 |  |  |  | 681 |  |  |  | 4,820 |  |  |  | 439,915 |  |  |  | 444,735 |  |  |  | 681 |
Total |  | $ | 10,242 |  |  | $ | 7,324 |  |  | $ | 24,523 |  |  | $ | 42,089 |  |  | $ | 2,896,282 |  |  | $ | 2,938,371 |  |  | $ | 10,847 |

*90+ and Accruing are also included in 90+ Days Past Due column.
The risk characteristics of CTBI’s material portfolio segments are as follows:
Commercial construction loans generally are made to customers for the purpose of building income-producing properties. Personal guarantees of the principals are generally required. Such loans are made on a projected cash flow basis and are secured by the project being constructed. Construction loan draw procedures are included in each specific loan agreement, including required documentation items and inspection requirements. Construction loans may convert to term loans at the end of the construction period, or may be repaid by the take-out commitment from another financing source. If the loan is to convert to a term loan, the repayment ability is based on the borrower’s projected cash flow. Risk is mitigated during the construction phase by requiring proper documentation and inspections whenever a draw is requested. Loans in amounts greater than $500,000 generally require a performance bond to be posted by the general contractor to assure completion of the project.
Commercial real estate loans are viewed primarily as cash flow loans and secondarily as loans secured by real estate. Commercial real estate lending typically involves higher loan principal amounts and the repayment of these loans is generally dependent on the successful operation of the property securing the loan or the business conducted on the property securing the loan. Commercial real estate loans may be more adversely affected by conditions in the real estate markets or in the general economy. Management monitors and evaluates commercial real estate loans based on collateral and risk grade criteria.
Equipment lease financing is underwritten by our commercial lenders using the same underwriting standards as would be applied to a secured commercial loan requesting 100% financing. The pricing for equipment lease financing is comparable to that of borrowers with similar quality commercial credits with similar collateral. Maximum terms of equipment leasing are determined by the type and expected life of the equipment to be leased. Residual values are determined by appraisals or opinion letters from industry experts. Leases must be in conformity with our consolidated annual tax plan. As we underwrite our equipment lease financing in a manner similar to our commercial loan portfolio described below, the risk characteristics for this portfolio mirror that of the commercial loan portfolio.
Commercial loans are primarily based on the identified cash flows of the borrower and secondarily on the underlying collateral provided by the borrower. The cash flows of borrowers, however, may not be as expected and the collateral securing these loans may fluctuate in value. Most commercial loans are secured by the assets being financed or other business assets such as accounts receivable or inventory and may incorporate a personal guarantee; however, some short-term loans may be made on an unsecured basis. In the case of loans secured by accounts receivable, the availability of funds for the repayment of these loans may be substantially dependent on the ability of the borrower to collect amounts due from its customers.
With respect to residential loans that are secured by 1-4 family residences and are generally owner occupied, CTBI generally establishes a maximum loan-to-value ratio and requires private mortgage insurance if that ratio is exceeded. Home equity loans are typically secured by a subordinate interest in 1-4 family residences. Residential construction loans are handled through the home mortgage area of the bank. The repayment ability of the borrower and the maximum loan-to-value ratio are calculated using the normal mortgage lending criteria. Draws are processed based on percentage of completion stages including normal inspection procedures. Such loans generally convert to term loans after the completion of construction.
Consumer loans are secured by consumer assets such as automobiles or recreational vehicles. Some consumer loans are unsecured such as small installment loans and certain lines of credit. Our determination of a borrower’s ability to repay these loans is primarily dependent on the personal income and credit rating of the borrowers, which can be impacted by economic conditions in their market areas such as unemployment levels. Repayment can also be impacted by changes in property values on residential properties. Risk is mitigated by the fact that the loans are of smaller individual amounts and spread over a large number of borrowers.
The indirect lending area of the bank generally deals with purchasing/funding consumer contracts with new and used automobile dealers. The dealers generate consumer loan applications which are forwarded to the indirect loan processing area for approval or denial. Loan approvals or denials are based on the creditworthiness and repayment ability of the borrower, and on the collateral value. The dealers may have recourse agreements with CTB.
Credit Quality Indicators:
CTBI categorizes loans into risk categories based on relevant information about the ability of borrowers to service their debt such as: current financial information, historical payment experience, credit documentation, public information, and current economic trends, among other factors. CTBI also considers the fair value of the underlying collateral and the strength and willingness of the guarantor(s). CTBI analyzes commercial loans individually by classifying the loans as to credit risk. Loans classified as loss, doubtful, substandard, or special mention are reviewed quarterly by CTBI for further deterioration or improvement to determine if appropriately classified and valued if deemed impaired. All other commercial loan reviews are completed every 12 to 18 months. In addition, during the renewal process of any loan, as well as if a loan becomes past due or if other information becomes available, CTBI will evaluate the loan grade. CTBI uses the following definitions for risk ratings:

Ø | Pass grades include investment grade, low risk, moderate risk, and acceptable risk loans. The loans range from loans that have no chance of resulting in a loss to loans that have a limited chance of resulting in a loss. Customers in this grade have excellent to fair credit ratings. The cash flows are adequate to meet required debt repayments.

Ø | Watch graded loans are loans that warrant extra management attention but are not currently criticized. Loans on the watch list may be potential troubled credits or may warrant “watch” status for a reason not directly related to the asset quality of the credit. The watch grade is a management tool to identify credits which may be candidates for future classification or may temporarily warrant extra management monitoring.

Ø | Other assets especially mentioned (OAEM) reflects loans that are currently protected but are potentially weak. These loans constitute an undue and unwarranted credit risk but not to the point of justifying a classification of substandard. The credit risk may be relatively minor yet constitute an unwarranted risk in light of circumstances surrounding a specific asset. Loans in this grade display potential weaknesses which may, if unchecked or uncorrected, inadequately protect CTBI’s credit position at some future date. The loans may be adversely affected by economic or market conditions.

Ø | Substandard grading indicates that the loan is inadequately protected by the current sound worth and paying capacity of the obligor or of the collateral pledged. These loans have a well-defined weakness or weaknesses that jeopardize the orderly liquidation of the debt with the distinct possibility that CTBI will sustain some loss if the deficiencies are not corrected.

Ø | Doubtful graded loans have the weaknesses inherent in the substandard grading with the added characteristic that the weaknesses make collection or liquidation in full, on the basis of currently existing facts, conditions, and values, highly questionable and improbable. The probability of loss is extremely high, but because of certain important and reasonably specific pending factors which may work to CTBI’s advantage or strengthen the asset(s), its classification as an estimated loss is deferred until its more exact status may be determined. Pending factors include proposed merger, acquisition, or liquidation procedures, capital injection, perfecting liens on additional collateral, and refinancing plans.

The following tables present the credit risk profile of CTBI’s commercial loan portfolio based on rating category and payment activity, segregated by class of loans, as of June 30, 2017 and December 31, 2016:

(in thousands) |  | Commercial Construction |  |  | Commercial Secured by Real Estate |  |  | Equipment Leases |  |  | Commercial Other |  |  | Total |
June 30, 2017 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Pass |  | $ | 62,033 |  |  | $ | 1,056,938 |  |  | $ | 4,667 |  |  | $ | 302,783 |  |  | $ | 1,426,421 |
Watch |  |  | 3,988 |  |  |  | 64,594 |  |  |  | 0 |  |  |  | 30,861 |  |  |  | 99,443 |
OAEM |  |  | 1,874 |  |  |  | 23,458 |  |  |  | 106 |  |  |  | 8,775 |  |  |  | 34,213 |
Substandard |  |  | 3,981 |  |  |  | 33,882 |  |  |  | 130 |  |  |  | 9,389 |  |  |  | 47,382 |
Doubtful |  |  | 178 |  |  |  | 357 |  |  |  | 0 |  |  |  | 365 |  |  |  | 900 |
Total |  | $ | 72,054 |  |  | $ | 1,179,229 |  |  | $ | 4,903 |  |  | $ | 352,173 |  |  | $ | 1,608,359 |
December 31, 2016 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Pass |  | $ | 55,315 |  |  | $ | 975,383 |  |  | $ | 5,206 |  |  | $ | 299,301 |  |  | $ | 1,335,205 |
Watch |  |  | 3,366 |  |  |  | 51,932 |  |  |  | 137 |  |  |  | 32,780 |  |  |  | 88,215 |
OAEM |  |  | 2,535 |  |  |  | 25,772 |  |  |  | 169 |  |  |  | 7,913 |  |  |  | 36,389 |
Substandard |  |  | 5,592 |  |  |  | 31,945 |  |  |  | 0 |  |  |  | 9,599 |  |  |  | 47,136 |
Doubtful |  |  | 190 |  |  |  | 396 |  |  |  | 0 |  |  |  | 566 |  |  |  | 1,152 |
Total |  | $ | 66,998 |  |  | $ | 1,085,428 |  |  | $ | 5,512 |  |  | $ | 350,159 |  |  | $ | 1,508,097 |

The following tables present the credit risk profile of CTBI’s residential real estate and consumer loan portfolios based on performing or nonperforming status, segregated by class, as of June 30, 2017 and December 31, 2016:

(in thousands) |  | Real Estate Construction |  |  | Real Estate Mortgage |  |  | Home Equity |  |  | Consumer Direct |  |  | Consumer Indirect |  |  | Total |
June 30, 2017 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Performing |  | $ | 58,172 |  |  | $ | 695,964 |  |  | $ | 92,865 |  |  | $ | 135,194 |  |  | $ | 482,780 |  |  | $ | 1,464,975 |
Nonperforming (1) |  |  | 394 |  |  |  | 12,503 |  |  |  | 856 |  |  |  | 34 |  |  |  | 221 |  |  |  | 14,008 |
Total |  | $ | 58,566 |  |  | $ | 708,467 |  |  | $ | 93,721 |  |  | $ | 135,228 |  |  | $ | 483,001 |  |  | $ | 1,478,983 |
December 31, 2016 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Performing |  | $ | 57,803 |  |  | $ | 690,414 |  |  | $ | 90,489 |  |  | $ | 133,025 |  |  | $ | 444,054 |  |  | $ | 1,415,785 |
Nonperforming (1) |  |  | 163 |  |  |  | 12,555 |  |  |  | 1,022 |  |  |  | 68 |  |  |  | 681 |  |  |  | 14,489 |
Total |  | $ | 57,966 |  |  | $ | 702,969 |  |  | $ | 91,511 |  |  | $ | 133,093 |  |  | $ | 444,735 |  |  | $ | 1,430,274 |

(1) A loan is considered nonperforming if it is 90 days or more past due and/or on nonaccrual.
The total of consumer mortgage loans secured by real estate properties for which formal foreclosure proceedings are in process totaled $5.0 million at June 30, 2017 compared to $3.5 million at December 31, 2016.
A loan is considered impaired, in accordance with the impairment accounting guidance (ASC 310-10-35-16), when based on current information and events, it is probable CTBI will be unable to collect all amounts due from the borrower in accordance with the contractual terms of the loan. Impaired loans include nonperforming commercial loans but also include loans modified in troubled debt restructurings where concessions have been granted to borrowers experiencing financial difficulties. These concessions could include a reduction in the interest rate on the loan, payment extensions, forgiveness of principal, forbearance, or other actions intended to maximize collection.
The following table presents impaired loans, the average investment in impaired loans, and interest income recognized on impaired loans for the periods ended June 30, 2017, December 31, 2016, and June 30, 2016:

|  | June 30, 2017 |
(in thousands) |  | Recorded Balance |  |  | Unpaid Contractual Principal Balance |  |  | Specific Allowance |
Loans without a specific valuation allowance: |  |  |  |  |  |  |  |  |
Commercial construction |  | $ | 4,707 |  |  | $ | 4,709 |  |  | $ | 0 |
Commercial secured by real estate |  |  | 27,509 |  |  |  | 28,195 |  |  |  | 0 |
Equipment lease financing |  |  | 130 |  |  |  | 130 |  |  |  | 0 |
Commercial other |  |  | 10,719 |  |  |  | 12,619 |  |  |  | 0 |
Real estate construction |  |  | 846 |  |  |  | 846 |  |  |  | 0 |
Real estate mortgage |  |  | 1,803 |  |  |  | 1,803 |  |  |  | 0 |
Loans with a specific valuation allowance: |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 153 |  |  |  | 174 |  |  |  | 25 |
Commercial secured by real estate |  |  | 4,731 |  |  |  | 5,833 |  |  |  | 1,227 |
Commercial other |  |  | 131 |  |  |  | 134 |  |  |  | 67 |
Totals: |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 4,860 |  |  |  | 4,883 |  |  |  | 25 |
Commercial secured by real estate |  |  | 32,240 |  |  |  | 34,028 |  |  |  | 1,227 |
Equipment lease financing |  |  | 130 |  |  |  | 130 |  |  |  | 0 |
Commercial other |  |  | 10,850 |  |  |  | 12,753 |  |  |  | 67 |
Real estate construction |  |  | 846 |  |  |  | 846 |  |  |  | 0 |
Real estate mortgage |  |  | 1,803 |  |  |  | 1,803 |  |  |  | 0 |
Total |  | $ | 50,729 |  |  | $ | 54,443 |  |  | $ | 1,319 |

|  | Three Months Ended |  |  | Six Months Ended |
|  | June 30, 2017 |  |  | June 30, 2017 |
(in thousands) |  | Average Investment in Impaired Loans |  |  | *Interest Income Recognized |  |  | Average Investment in Impaired Loans |  |  | *Interest Income Recognized |
Loans without a specific valuation allowance: |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  | $ | 5,041 |  |  | $ | 49 |  |  | $ | 5,101 |  |  | $ | 86 |
Commercial secured by real estate |  |  | 27,858 |  |  |  | 343 |  |  |  | 28,252 |  |  |  | 704 |
Equipment lease financing |  |  | 135 |  |  |  | 0 |  |  |  | 68 |  |  |  | 0 |
Commercial other |  |  | 10,882 |  |  |  | 133 |  |  |  | 10,981 |  |  |  | 273 |
Real estate construction |  |  | 846 |  |  |  | 0 |  |  |  | 423 |  |  |  | 0 |
Real estate mortgage |  |  | 1,803 |  |  |  | 11 |  |  |  | 1,804 |  |  |  | 22 |
Loans with a specific valuation allowance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 153 |  |  |  | 0 |  |  |  | 157 |  |  |  | 0 |
Commercial secured by real estate |  |  | 4,745 |  |  |  | 5 |  |  |  | 4,362 |  |  |  | 5 |
Commercial other |  |  | 131 |  |  |  | 0 |  |  |  | 66 |  |  |  | 0 |
Totals: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 5,194 |  |  |  | 49 |  |  |  | 5,258 |  |  |  | 86 |
Commercial secured by real estate |  |  | 32,603 |  |  |  | 348 |  |  |  | 32,614 |  |  |  | 709 |
Equipment lease financing |  |  | 135 |  |  |  | 0 |  |  |  | 68 |  |  |  | 0 |
Commercial other |  |  | 11,013 |  |  |  | 133 |  |  |  | 11,047 |  |  |  | 273 |
Real estate construction |  |  | 846 |  |  |  | 0 |  |  |  | 423 |  |  |  | 0 |
Real estate mortgage |  |  | 1,803 |  |  |  | 11 |  |  |  | 1,804 |  |  |  | 22 |
Total |  | $ | 51,594 |  |  | $ | 541 |  |  | $ | 51,214 |  |  | $ | 1,090 |

|  | December 31, 2016 |
(in thousands) |  | Recorded Balance |  |  | Unpaid Contractual Principal Balance |  |  | Specific Allowance |  |  | Average Investment in Impaired Loans |  |  | *Interest Income Recognized |
Loans without a specific valuation allowance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  | $ | 4,102 |  |  | $ | 4,123 |  |  | $ | 0 |  |  | $ | 4,367 |  |  | $ | 218 |
Commercial secured by real estate |  |  | 29,025 |  |  |  | 29,594 |  |  |  | 0 |  |  |  | 31,136 |  |  |  | 1,609 |
Commercial other |  |  | 11,215 |  |  |  | 13,155 |  |  |  | 0 |  |  |  | 11,561 |  |  |  | 632 |
Real estate mortgage |  |  | 1,483 |  |  |  | 1,483 |  |  |  | 0 |  |  |  | 1,691 |  |  |  | 52 |
Loans with a specific valuation allowance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 1,507 |  |  |  | 1,509 |  |  |  | 213 |  |  |  | 2,290 |  |  |  | 0 |
Commercial secured by real estate |  |  | 4,731 |  |  |  | 5,885 |  |  |  | 1,035 |  |  |  | 4,151 |  |  |  | 19 |
Commercial other |  |  | 139 |  |  |  | 139 |  |  |  | 65 |  |  |  | 483 |  |  |  | 0 |
Totals: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 5,609 |  |  |  | 5,632 |  |  |  | 213 |  |  |  | 6,657 |  |  |  | 218 |
Commercial secured by real estate |  |  | 33,756 |  |  |  | 35,479 |  |  |  | 1,035 |  |  |  | 35,287 |  |  |  | 1,628 |
Commercial other |  |  | 11,354 |  |  |  | 13,294 |  |  |  | 65 |  |  |  | 12,044 |  |  |  | 632 |
Real estate mortgage |  |  | 1,483 |  |  |  | 1,483 |  |  |  | 0 |  |  |  | 1,691 |  |  |  | 52 |
Total |  | $ | 52,202 |  |  | $ | 55,888 |  |  | $ | 1,313 |  |  | $ | 55,679 |  |  | $ | 2,530 |

|  | June 30, 2016 |
(in thousands) |  | Recorded Balance |  |  | Unpaid Contractual Principal Balance |  |  | Specific Allowance |
Loans without a specific valuation allowance: |  |  |  |  |  |  |  |  |
Commercial construction |  | $ | 4,455 |  |  | $ | 4,741 |  |  | $ | 0 |
Commercial secured by real estate |  |  | 30,181 |  |  |  | 30,816 |  |  |  | 0 |
Commercial other |  |  | 11,328 |  |  |  | 13,113 |  |  |  | 0 |
Real estate mortgage |  |  | 1,761 |  |  |  | 1,761 |  |  |  | 0 |
Loans with a specific valuation allowance: |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 2,207 |  |  |  | 2,209 |  |  |  | 287 |
Commercial secured by real estate |  |  | 2,667 |  |  |  | 3,721 |  |  |  | 720 |
Commercial other |  |  | 670 |  |  |  | 683 |  |  |  | 330 |
Totals: |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 6,662 |  |  |  | 6,950 |  |  |  | 287 |
Commercial secured by real estate |  |  | 32,848 |  |  |  | 34,537 |  |  |  | 720 |
Commercial other |  |  | 11,998 |  |  |  | 13,796 |  |  |  | 330 |
Real estate mortgage |  |  | 1,761 |  |  |  | 1,761 |  |  |  | 0 |
Total |  | $ | 53,269 |  |  | $ | 57,044 |  |  | $ | 1,337 |

|  | Three Months Ended |  |  | Six Months Ended |
|  | June 30, 2016 |  |  | June 30, 2016 |
(in thousands) |  | Average Investment in Impaired Loans |  |  | *Interest Income Recognized |  |  | Average Investment in Impaired Loans |  |  | *Interest Income Recognized |
Loans without a specific valuation allowance: |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  | $ | 4,730 |  |  | $ | 56 |  |  | $ | 4,526 |  |  | $ | 105 |
Commercial secured by real estate |  |  | 30,339 |  |  |  | 387 |  |  |  | 31,426 |  |  |  | 774 |
Commercial other |  |  | 11,446 |  |  |  | 169 |  |  |  | 11,597 |  |  |  | 317 |
Real estate mortgage |  |  | 1,764 |  |  |  | 14 |  |  |  | 1,893 |  |  |  | 30 |
Loans with a specific valuation allowance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 2,372 |  |  |  | 0 |  |  |  | 2,887 |  |  |  | 0 |
Commercial secured by real estate |  |  | 3,598 |  |  |  | 0 |  |  |  | 4,163 |  |  |  | 18 |
Commercial other |  |  | 667 |  |  |  | 0 |  |  |  | 693 |  |  |  | 0 |
Totals: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 7,102 |  |  |  | 56 |  |  |  | 7,413 |  |  |  | 105 |
Commercial secured by real estate |  |  | 33,937 |  |  |  | 387 |  |  |  | 35,589 |  |  |  | 792 |
Commercial other |  |  | 12,113 |  |  |  | 169 |  |  |  | 12,290 |  |  |  | 317 |
Real estate mortgage |  |  | 1,764 |  |  |  | 14 |  |  |  | 1,893 |  |  |  | 30 |
Total |  | $ | 54,916 |  |  | $ | 626 |  |  | $ | 57,185 |  |  | $ | 1,244 |

*Cash basis interest is substantially the same as interest income recognized.
Included in certain loan categories of impaired loans are certain loans and leases that have been modified in a troubled debt restructuring, where economic concessions have been granted to borrowers who have experienced financial difficulties. These concessions typically result from our loss mitigation activities and could include reductions in the interest rate, payment extensions, forgiveness of principal, forbearance or other actions. Modifications of terms for our loans and their inclusion as troubled debt restructurings are based on individual facts and circumstances. Loan modifications that are included as troubled debt restructurings may involve either an increase or reduction of the interest rate, extension of the term of the loan, or deferral of principal and/or interest payments, regardless of the period of the modification. All of the loans identified as troubled debt restructuring were modified due to financial stress of the borrower. In order to determine if a borrower is experiencing financial difficulty, an evaluation is performed to determine the probability that the borrower will be in payment default on any of its debt in the foreseeable future without the modification. This evaluation is performed under CTBI’s internal underwriting policy.
When we modify loans and leases in a troubled debt restructuring, we evaluate any possible impairment similar to other impaired loans based on the present value of expected future cash flows, discounted at the contractual interest rate of the original loan or lease agreement, or use the current fair value of the collateral, less selling costs for collateral dependent loans. If we determined that the value of the modified loan is less than the recorded investment in the loan (net of previous charge-offs, deferred loan fees or costs and unamortized premium or discount), impairment is recognized through an allowance estimate or a charge-off to the allowance. In periods subsequent to modification, we evaluate all troubled debt restructuring, including those that have payment defaults, for possible impairment and recognize impairment through the allowance.
During 2017, certain loans were modified in troubled debt restructurings, where economic concessions were granted to borrowers consisting of reductions in the interest rates, payment extensions, forgiveness of principal, and forbearances. Presented below, segregated by class of loans, are troubled debt restructurings that occurred during the three and six months ended June 30, 2017 and 2016 and the year ended December 31, 2016:

|  | Three Months Ended June 30, 2017 |
(in thousands) |  | Number of Loans |  |  | Term Modification |  |  | Rate Modification |  |  | Combination |  |  | Post-Modification Outstanding Balance |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 2 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 114 |  |  | $ | 114 |
Commercial secured by real estate |  |  | 4 |  |  |  | 530 |  |  |  | 0 |  |  |  | 192 |  |  |  | 722 |
Commercial other |  |  | 7 |  |  |  | 82 |  |  |  | 0 |  |  |  | 136 |  |  |  | 218 |
Residential: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Real estate construction |  |  | 1 |  |  |  | 846 |  |  |  | 0 |  |  |  | 0 |  |  |  | 846 |
Total troubled debt restructurings |  |  | 14 |  |  | $ | 1,458 |  |  | $ | 0 |  |  | $ | 442 |  |  | $ | 1,900 |

|  | Six Months Ended June 30, 2017 |
(in thousands) |  | Number of Loans |  |  | Term Modification |  |  | Rate Modification |  |  | Combination |  |  | Post-Modification Outstanding Balance |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 2 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 114 |  |  | $ | 114 |
Commercial secured by real estate |  |  | 5 |  |  |  | 579 |  |  |  | 0 |  |  |  | 192 |  |  |  | 771 |
Commercial other |  |  | 9 |  |  |  | 135 |  |  |  | 0 |  |  |  | 136 |  |  |  | 271 |
Residential: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Real estate construction |  |  | 1 |  |  |  | 846 |  |  |  | 0 |  |  |  | 0 |  |  |  | 846 |
Real estate mortgage |  |  | 1 |  |  |  | 323 |  |  |  | 0 |  |  |  | 0 |  |  |  | 323 |
Total troubled debt restructurings |  |  | 18 |  |  | $ | 1,883 |  |  | $ | 0 |  |  | $ | 442 |  |  | $ | 2,325 |

|  | Three Months Ended June 30, 2016 |
(in thousands) |  | Number of Loans |  |  | Term Modification |  |  | Rate Modification |  |  | Combination |  |  | Post-Modification Outstanding Balance |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 4 |  |  | $ | 120 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 120 |
Commercial secured by real estate |  |  | 8 |  |  |  | 1,611 |  |  |  | 0 |  |  |  | 536 |  |  |  | 2,147 |
Commercial other |  |  | 6 |  |  |  | 440 |  |  |  | 0 |  |  |  | 0 |  |  |  | 440 |
Total troubled debt restructurings |  |  | 18 |  |  | $ | 2,171 |  |  | $ | 0 |  |  | $ | 536 |  |  | $ | 2,707 |

|  | Six Months Ended June 30, 2016 |
(in thousands) |  | Number of Loans |  |  | Term Modification |  |  | Rate Modification |  |  | Combination |  |  | Post-Modification Outstanding Balance |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 5 |  |  | $ | 1,408 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 1,408 |
Commercial secured by real estate |  |  | 21 |  |  |  | 5,609 |  |  |  | 0 |  |  |  | 580 |  |  |  | 6,189 |
Commercial other |  |  | 16 |  |  |  | 5,041 |  |  |  | 0 |  |  |  | 0 |  |  |  | 5,041 |
Residential: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Real estate mortgage |  |  | 1 |  |  |  | 0 |  |  |  | 0 |  |  |  | 280 |  |  |  | 280 |
Total troubled debt restructurings |  |  | 43 |  |  | $ | 12,058 |  |  | $ | 0 |  |  | $ | 860 |  |  | $ | 12,918 |

|  | Year Ended December 31, 2016 |
(in thousands) |  | Number of Loans |  |  | Term Modification |  |  | Rate Modification |  |  | Combination |  |  | Post-Modification Outstanding Balance |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Commercial construction |  |  | 1 |  |  | $ | 1,288 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 1,288 |
Commercial secured by real estate |  |  | 27 |  |  |  | 8,827 |  |  |  | 0 |  |  |  | 581 |  |  |  | 9,408 |
Commercial other |  |  | 14 |  |  |  | 5,088 |  |  |  | 0 |  |  |  | 87 |  |  |  | 5,175 |
Residential: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Real estate mortgage |  |  | 1 |  |  |  | 0 |  |  |  | 0 |  |  |  | 281 |  |  |  | 281 |
Total troubled debt restructurings |  |  | 43 |  |  | $ | 15,203 |  |  | $ | 0 |  |  | $ | 949 |  |  | $ | 16,152 |

No charge-offs have resulted from modifications for any of the presented periods. We had commitments to extend additional credit in the amount of $0.1 million on loans that were considered troubled debt restructurings at June 30, 2017.
Loans retain their accrual status at the time of their modification. As a result, if a loan is on nonaccrual at the time it is modified, it stays as nonaccrual, and if a loan is on accrual at the time of the modification, it generally stays on accrual. Commercial and consumer loans modified in a troubled debt restructuring are closely monitored for delinquency as an early indicator of possible future default. If loans modified in a troubled debt restructuring subsequently default, CTBI evaluates the loan for possible further impairment. The allowance for loan losses may be increased, adjustments may be made in the allocation of the allowance, or partial charge-offs may be taken to further write-down the carrying value of the loan. Presented below, segregated by class of loans, are loans that were modified as troubled debt restructurings within the prior twelve months which subsequently defaulted during the three and six months ended June 30, 2016. There were no such loans that defaulted during the three and six months ended June 30, 2017. CTBI considers a loan in default when it is 90 days or more past due or transferred to nonaccrual.

(in thousands) |  | Three Months Ended June 30, 2016 |  |  | Six Months Ended June 30, 2016 |
|  | Number of Loans |  |  | Recorded Balance |  |  | Number of Loans |  |  | Recorded Balance |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |
Commercial secured by real estate |  |  | 0 |  |  | $ | 0 |  |  |  | 1 |  |  | $ | 510 |
Commercial other |  |  | 0 |  |  |  | 0 |  |  |  | 1 |  |  |  | 358 |
Total defaulted restructured loans |  |  | 0 |  |  | $ | 0 |  |  |  | 2 |  |  | $ | 868 |

Note 5 – Allowance for Loan and Lease Losses
The following tables present the balance in the allowance for loan and lease losses (“ALLL”) and the recorded investment in loans based on portfolio segment and impairment method as of June 30, 2017, December 31, 2016 and June 30, 2016:

|  | Three Months Ended June 30, 2017 |
(in thousands) |  | Commercial Construction |  |  | Commercial Secured by Real Estate |  |  | Equipment Lease Financing |  |  | Commercial Other |  |  | Real Estate Construction |  |  | Real Estate Mortgage |  |  | Home Equity |  |  | Consumer Direct |  |  | Consumer Indirect |  |  | Total |
Allowance for loan losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Beginning balance |  | $ | 644 |  |  | $ | 14,177 |  |  | $ | 40 |  |  | $ | 4,736 |  |  | $ | 571 |  |  | $ | 5,877 |  |  | $ | 757 |  |  | $ | 1,844 |  |  | $ | 7,067 |  |  | $ | 35,713 |
Provision charged to expense |  |  | 22 |  |  |  | 1,435 |  |  |  | (7 | ) |  |  | 599 |  |  |  | 10 |  |  |  | (128 | ) |  |  | (11 | ) |  |  | 102 |  |  |  | 742 |  |  |  | 2,764 |
Losses charged off |  |  | 0 |  |  |  | (318 | ) |  |  | 0 |  |  |  | (417 | ) |  |  | 0 |  |  |  | (97 | ) |  |  | 0 |  |  |  | (239 | ) |  |  | (1,118 | ) |  |  | (2,189 | )
Recoveries |  |  | 3 |  |  |  | 5 |  |  |  | 0 |  |  |  | 75 |  |  |  | 0 |  |  |  | 10 |  |  |  | 1 |  |  |  | 159 |  |  |  | 592 |  |  |  | 845 |
Ending balance |  | $ | 669 |  |  | $ | 15,299 |  |  | $ | 33 |  |  | $ | 4,993 |  |  | $ | 581 |  |  | $ | 5,662 |  |  | $ | 747 |  |  | $ | 1,866 |  |  | $ | 7,283 |  |  | $ | 37,133 |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 25 |  |  | $ | 1,227 |  |  | $ | 0 |  |  | $ | 67 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 1,319 |
Collectively evaluated for impairment |  | $ | 644 |  |  | $ | 14,072 |  |  | $ | 33 |  |  | $ | 4,926 |  |  | $ | 581 |  |  | $ | 5,662 |  |  | $ | 747 |  |  | $ | 1,866 |  |  | $ | 7,283 |  |  | $ | 35,814 |
Loans |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 4,860 |  |  | $ | 32,240 |  |  | $ | 130 |  |  | $ | 10,850 |  |  | $ | 846 |  |  | $ | 1,803 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 50,729 |
Collectively evaluated for impairment |  | $ | 67,194 |  |  | $ | 1,146,989 |  |  | $ | 4,773 |  |  | $ | 341,323 |  |  | $ | 57,720 |  |  | $ | 706,664 |  |  | $ | 93,721 |  |  | $ | 135,228 |  |  | $ | 483,001 |  |  | $ | 3,036,613 |

|  | Six Months Ended June 30, 2017 |
(in thousands) |  | Commercial Construction |  |  | Commercial Secured by Real Estate |  |  | Equipment Lease Financing |  |  | Commercial Other |  |  | Real Estate Construction |  |  | Real Estate Mortgage |  |  | Home Equity |  |  | Consumer Direct |  |  | Consumer Indirect |  |  | Total |
Allowance for loan losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Beginning balance |  | $ | 884 |  |  | $ | 14,191 |  |  | $ | 42 |  |  | $ | 4,656 |  |  | $ | 629 |  |  | $ | 6,027 |  |  | $ | 774 |  |  | $ | 1,885 |  |  | $ | 6,845 |  |  | $ | 35,933 |
Provision charged to expense |  |  | (220 | ) |  |  | 1,624 |  |  |  | (9 | ) |  |  | 1,019 |  |  |  | (48 | ) |  |  | (275 | ) |  |  | (27 | ) |  |  | 196 |  |  |  | 1,733 |  |  |  | 3,993 |
Losses charged off |  |  | (4 | ) |  |  | (528 | ) |  |  | 0 |  |  |  | (836 | ) |  |  | 0 |  |  |  | (164 | ) |  |  | (3 | ) |  |  | (509 | ) |  |  | (2,636 | ) |  |  | (4,680 | )
Recoveries |  |  | 9 |  |  |  | 12 |  |  |  | 0 |  |  |  | 154 |  |  |  | 0 |  |  |  | 74 |  |  |  | 3 |  |  |  | 294 |  |  |  | 1,341 |  |  |  | 1,887 |
Ending balance |  | $ | 669 |  |  | $ | 15,299 |  |  | $ | 33 |  |  | $ | 4,993 |  |  | $ | 581 |  |  | $ | 5,662 |  |  | $ | 747 |  |  | $ | 1,866 |  |  | $ | 7,283 |  |  | $ | 37,133 |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 25 |  |  | $ | 1,227 |  |  | $ | 0 |  |  | $ | 67 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 1,319 |
Collectively evaluated for impairment |  | $ | 644 |  |  | $ | 14,072 |  |  | $ | 33 |  |  | $ | 4,926 |  |  | $ | 581 |  |  | $ | 5,662 |  |  | $ | 747 |  |  | $ | 1,866 |  |  | $ | 7,283 |  |  | $ | 35,814 |
Loans |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 4,860 |  |  | $ | 32,240 |  |  | $ | 130 |  |  | $ | 10,850 |  |  | $ | 846 |  |  | $ | 1,803 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 50,729 |
Collectively evaluated for impairment |  | $ | 67,194 |  |  | $ | 1,146,989 |  |  | $ | 4,773 |  |  | $ | 341,323 |  |  | $ | 57,720 |  |  | $ | 706,664 |  |  | $ | 93,721 |  |  | $ | 135,228 |  |  | $ | 483,001 |  |  | $ | 3,036,613 |

|  | Three Months Ended June 30, 2016 |
(in thousands) |  | Commercial Construction |  |  | Commercial Secured by Real Estate |  |  | Equipment Lease Financing |  |  | Commercial Other |  |  | Real Estate Construction |  |  | Real Estate Mortgage |  |  | Home Equity |  |  | Consumer Direct |  |  | Consumer Indirect |  |  | Total |
Allowance for loan losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Beginning balance |  | $ | 1,983 |  |  | $ | 14,798 |  |  | $ | 70 |  |  | $ | 4,247 |  |  | $ | 548 |  |  | $ | 6,497 |  |  | $ | 824 |  |  | $ | 1,603 |  |  | $ | 5,759 |  |  | $ | 36,329 |
Provision charged to expense |  |  | (534 | ) |  |  | 664 |  |  |  | 24 |  |  |  | 643 |  |  |  | 132 |  |  |  | 16 |  |  |  | 4 |  |  |  | 316 |  |  |  | 608 |  |  |  | 1,873 |
Losses charged off |  |  | (16 | ) |  |  | (1,029 | ) |  |  | 0 |  |  |  | (621 | ) |  |  | (123 | ) |  |  | (171 | ) |  |  | (11 | ) |  |  | (393 | ) |  |  | (938 | ) |  |  | (3,302 | )
Recoveries |  |  | 4 |  |  |  | 5 |  |  |  | 0 |  |  |  | 161 |  |  |  | 1 |  |  |  | 30 |  |  |  | 2 |  |  |  | 108 |  |  |  | 486 |  |  |  | 797 |
Ending balance |  | $ | 1,437 |  |  | $ | 14,438 |  |  | $ | 94 |  |  | $ | 4,430 |  |  | $ | 558 |  |  | $ | 6,372 |  |  | $ | 819 |  |  | $ | 1,634 |  |  | $ | 5,915 |  |  | $ | 35,697 |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 287 |  |  | $ | 720 |  |  | $ | 0 |  |  | $ | 330 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 1,337 |
Collectively evaluated for impairment |  | $ | 1,150 |  |  | $ | 13,718 |  |  | $ | 94 |  |  | $ | 4,100 |  |  | $ | 558 |  |  | $ | 6,372 |  |  | $ | 819 |  |  | $ | 1,634 |  |  | $ | 5,915 |  |  | $ | 34,360 |
Loans |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 6,662 |  |  | $ | 32,848 |  |  | $ | 0 |  |  | $ | 11,998 |  |  | $ | 0 |  |  | $ | 1,761 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 53,269 |
Collectively evaluated for impairment |  | $ | 62,351 |  |  | $ | 1,046,481 |  |  | $ | 7,353 |  |  | $ | 354,975 |  |  | $ | 58,973 |  |  | $ | 706,699 |  |  | $ | 89,185 |  |  | $ | 129,291 |  |  | $ | 422,808 |  |  | $ | 2,878,116 |

|  | Six Months Ended June 30, 2016 |
(in thousands) |  | Commercial Construction |  |  | Commercial Secured by Real Estate |  |  | Equipment Lease Financing |  |  | Commercial Other |  |  | Real Estate Construction |  |  | Real Estate Mortgage |  |  | Home Equity |  |  | Consumer Direct |  |  | Consumer Indirect |  |  | Total |
Allowance for loan losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Beginning balance |  | $ | 2,199 |  |  | $ | 14,434 |  |  | $ | 79 |  |  | $ | 4,225 |  |  | $ | 550 |  |  | $ | 6,678 |  |  | $ | 839 |  |  | $ | 1,594 |  |  | $ | 5,496 |  |  | $ | 36,094 |
Provision charged to expense |  |  | (754 | ) |  |  | 1,140 |  |  |  | 15 |  |  |  | 972 |  |  |  | 136 |  |  |  | 110 |  |  |  | (4 | ) |  |  | 498 |  |  |  | 1,525 |  |  |  | 3,638 |
Losses charged off |  |  | (16 | ) |  |  | (1,186 | ) |  |  | 0 |  |  |  | (1,045 | ) |  |  | (131 | ) |  |  | (483 | ) |  |  | (21 | ) |  |  | (689 | ) |  |  | (2,196 | ) |  |  | (5,767 | )
Recoveries |  |  | 8 |  |  |  | 50 |  |  |  | 0 |  |  |  | 278 |  |  |  | 3 |  |  |  | 67 |  |  |  | 5 |  |  |  | 231 |  |  |  | 1,090 |  |  |  | 1,732 |
Ending balance |  | $ | 1,437 |  |  | $ | 14,438 |  |  | $ | 94 |  |  | $ | 4,430 |  |  | $ | 558 |  |  | $ | 6,372 |  |  | $ | 819 |  |  | $ | 1,634 |  |  | $ | 5,915 |  |  | $ | 35,697 |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 287 |  |  | $ | 720 |  |  | $ | 0 |  |  | $ | 330 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 1,337 |
Collectively evaluated for impairment |  | $ | 1,150 |  |  | $ | 13,718 |  |  | $ | 94 |  |  | $ | 4,100 |  |  | $ | 558 |  |  | $ | 6,372 |  |  | $ | 819 |  |  | $ | 1,634 |  |  | $ | 5,915 |  |  | $ | 34,360 |
Loans |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 6,662 |  |  | $ | 32,848 |  |  | $ | 0 |  |  | $ | 11,998 |  |  | $ | 0 |  |  | $ | 1,761 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 53,269 |
Collectively evaluated for impairment |  | $ | 62,351 |  |  | $ | 1,046,481 |  |  | $ | 7,353 |  |  | $ | 354,975 |  |  | $ | 58,973 |  |  | $ | 706,699 |  |  | $ | 89,185 |  |  | $ | 129,291 |  |  | $ | 422,808 |  |  | $ | 2,878,116 |

|  | December 31, 2016 |
(in thousands) |  | Commercial Construction |  |  | Commercial Secured by Real Estate |  |  | Equipment Lease Financing |  |  | Commercial Other |  |  | Real Estate Construction |  |  | Real Estate Mortgage |  |  | Home Equity |  |  | Consumer Direct |  |  | Consumer Indirect |  |  | Total |
Allowance for loan losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Beginning balance |  | $ | 2,199 |  |  | $ | 14,434 |  |  | $ | 79 |  |  | $ | 4,225 |  |  | $ | 550 |  |  | $ | 6,678 |  |  | $ | 839 |  |  | $ | 1,594 |  |  | $ | 5,496 |  |  | $ | 36,094 |
Provision charged to expense |  |  | (1,035 | ) |  |  | 1,220 |  |  |  | (37 | ) |  |  | 2,128 |  |  |  | 264 |  |  |  | 291 |  |  |  | (20 | ) |  |  | 912 |  |  |  | 4,149 |  |  |  | 7,872 |
Losses charged off |  |  | (316 | ) |  |  | (1,641 | ) |  |  | 0 |  |  |  | (2,136 | ) |  |  | (192 | ) |  |  | (1,043 | ) |  |  | (54 | ) |  |  | (1,236 | ) |  |  | (5,050 | ) |  |  | (11,668 | )
Recoveries |  |  | 36 |  |  |  | 178 |  |  |  | 0 |  |  |  | 439 |  |  |  | 7 |  |  |  | 101 |  |  |  | 9 |  |  |  | 615 |  |  |  | 2,250 |  |  |  | 3,635 |
Ending balance |  | $ | 884 |  |  | $ | 14,191 |  |  | $ | 42 |  |  | $ | 4,656 |  |  | $ | 629 |  |  | $ | 6,027 |  |  | $ | 774 |  |  | $ | 1,885 |  |  | $ | 6,845 |  |  | $ | 35,933 |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 213 |  |  | $ | 1,035 |  |  | $ | 0 |  |  | $ | 65 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 1,313 |
Collectively evaluated for impairment |  | $ | 671 |  |  | $ | 13,156 |  |  | $ | 42 |  |  | $ | 4,591 |  |  | $ | 629 |  |  | $ | 6,027 |  |  | $ | 774 |  |  | $ | 1,885 |  |  | $ | 6,845 |  |  | $ | 34,620 |
Loans |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Ending balance: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Individually evaluated for impairment |  | $ | 5,609 |  |  | $ | 33,756 |  |  | $ | 0 |  |  | $ | 11,354 |  |  | $ | 0 |  |  | $ | 1,483 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 52,202 |
Collectively evaluated for impairment |  | $ | 61,389 |  |  | $ | 1,051,672 |  |  | $ | 5,512 |  |  | $ | 338,805 |  |  | $ | 57,966 |  |  | $ | 701,486 |  |  | $ | 91,511 |  |  | $ | 133,093 |  |  | $ | 444,735 |  |  | $ | 2,886,169 |

Note 6 – Other Real Estate Owned
Activity for other real estate owned was as follows:

|  | Three Months Ended |  |  | Six Months Ended |
|  | June 30 |  |  | June 30 |
(in thousands) |  | 2017 |  |  | 2016 |  |  | 2017 |  |  | 2016 |
Beginning balance of other real estate owned |  | $ | 35,812 |  |  | $ | 38,985 |  |  | $ | 35,856 |  |  | $ | 40,674 |
New assets acquired |  |  | 577 |  |  |  | 1,960 |  |  |  | 1,581 |  |  |  | 3,251 |
Capitalized costs |  |  | 0 |  |  |  | 0 |  |  |  | 0 |  |  |  | 0 |
Fair value adjustments |  |  | (1,449 | ) |  |  | (91 | ) |  |  | (1,987 | ) |  |  | (224 | )
Sale of assets |  |  | (2,155 | ) |  |  | (3,114 | ) |  |  | (2,665 | ) |  |  | (5,961 | )
Ending balance of other real estate owned |  | $ | 32,785 |  |  | $ | 37,740 |  |  | $ | 32,785 |  |  | $ | 37,740 |

Included in other real estate owned at June 30, 2017 is a $148 thousand property which was not acquired through foreclosure. As a result of the relocation of our Campbellsville First Street branch to the Bypass location in 2017, the First Street property has been listed for sale and was booked into other real estate owned. Foreclosed properties at June 30, 2017 were $32.6 million. Carrying costs and fair value adjustments associated with foreclosed properties for the three months ended June 30, 2017 and 2016 were $1.8 million and $0.5 million, respectively. Carrying costs and fair value adjustments associated with foreclosed properties for the six months ended June 30, 2017 and 2016 were $2.7 million and $1.0 million.
The major classifications of foreclosed properties are shown in the following table:

(in thousands) |  | June 30 2017 |  |  | December 31 2016 |
1-4 family |  | $ | 5,756 |  |  | $ | 6,210 |
Agricultural/farmland |  |  | 90 |  |  |  | 93 |
Construction/land development/other |  |  | 18,074 |  |  |  | 20,778 |
Multifamily |  |  | 176 |  |  |  | 270 |
Non-farm/non-residential |  |  | 8,542 |  |  |  | 8,505 |
Total foreclosed properties |  | $ | 32,638 |  |  | $ | 35,856 |

Note 7 – Repurchase Agreements
We utilize securities sold under agreements to repurchase to facilitate the needs of our customers and provide additional funding to our balance sheet. Repurchase agreements are transactions whereby we offer to sell to a counterparty an undivided interest in an eligible security at an agreed upon purchase price, and which obligates CTBI to repurchase the security on an agreed upon date at an agreed upon repurchase price plus interest at an agreed upon rate. Securities sold under agreements to repurchase are recorded at the amount of cash received in connection with the transaction and are reflected in the accompanying consolidated balance sheets.
We monitor collateral levels on a continuous basis and maintain records of each transaction specifically describing the applicable security and the counterparty’s fractional interest in that security, and we segregate the security from its general assets in accordance with regulations governing custodial holdings of securities. The primary risk with our repurchase agreements is market risk associated with the securities securing the transactions, as we may be required to provide additional collateral based on fair value changes of the underlying securities. Securities pledged as collateral under repurchase agreements are maintained with our safekeeping agents. The carrying value of investment securities available-for-sale pledged as collateral under repurchase agreements totaled $297.8 million and $302.3 million at June 30, 2017 and December 31, 2016, respectively.
The remaining contractual maturity of the securities sold under agreements to repurchase by class of collateral pledged included in the accompanying consolidated balance sheets as of June 30, 2017 and December 31, 2016 is presented in the following tables:

|  | June 30, 2017 |
|  | Remaining Contractual Maturity of the Agreements |
(in thousands) |  | Overnight and Continuous |  |  | Up to 30 days |  |  | 30-90 days |  |  | Greater Than 90 days |  |  | Total |
Repurchase agreements and repurchase-to-maturity transactions: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  | $ | 29,137 |  |  | $ | 4,871 |  |  | $ | 21,050 |  |  | $ | 59,379 |  |  | $ | 114,437 |
State and political subdivisions |  |  | 58,845 |  |  |  | 2,261 |  |  |  | 3,297 |  |  |  | 7,365 |  |  |  | 71,768 |
U.S. government sponsored agency mortgage-backed securities |  |  | 24,138 |  |  |  | 3,868 |  |  |  | 12,653 |  |  |  | 30,344 |  |  |  | 71,003 |
Total |  | $ | 112,120 |  |  | $ | 11,000 |  |  | $ | 37,000 |  |  | $ | 97,088 |  |  | $ | 257,208 |

|  | December 31, 2016 |
|  | Remaining Contractual Maturity of the Agreements |
(in thousands) |  | Overnight and Continuous |  |  | Up to 30 days |  |  | 30-90 days |  |  | Greater Than 90 days |  |  | Total |
Repurchase agreements and repurchase-to-maturity transactions: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  | $ | 17,249 |  |  | $ | 0 |  |  | $ | 14,349 |  |  | $ | 73,076 |  |  | $ | 104,674 |
State and political subdivisions |  |  | 55,354 |  |  |  | 0 |  |  |  | 1,998 |  |  |  | 10,272 |  |  |  | 67,624 |
U.S. government sponsored agency mortgage-backed securities |  |  | 23,386 |  |  |  | 0 |  |  |  | 8,003 |  |  |  | 47,378 |  |  |  | 78,767 |
Total |  | $ | 95,989 |  |  | $ | 0 |  |  | $ | 24,350 |  |  | $ | 130,726 |  |  | $ | 251,065 |

Note 8 – Fair Market Value of Financial Assets and Liabilities
Fair Value Measurements
ASC 820, Fair Value Measurements, defines fair value, establishes a framework for measuring fair value in generally accepted accounting principles and expands disclosures about fair value measurements. ASC 820 applies whenever other standards require (or permit) assets or liabilities to be measured at fair value but does not expand the use of fair value in any new circumstances. Fair value measurements must maximize the use of observable inputs and minimize the use of unobservable inputs. In this standard, the FASB clarifies the principle that fair value should be based on the assumptions market participants would use when pricing the asset or liability. In support of this principle, ASC 820 establishes a fair value hierarchy that prioritizes the information used to develop those assumptions. The fair value hierarchy is as follows:
Level 1 Inputs – Quoted prices in active markets for identical assets or liabilities.
Level 2 Inputs – Inputs other than quoted prices included in Level 1 that are observable for the asset or liability, either directly or indirectly. These might include quoted prices for similar assets and liabilities in active markets, and inputs other than quoted prices that are observable for the asset or liability, such as interest rates and yield curves that are observable at commonly quoted intervals.
Level 3 Inputs – Unobservable inputs for determining the fair values of assets or liabilities that reflect an entity’s own assumptions about the assumptions that market participants would use in pricing the assets or liabilities.
Recurring Measurements
The following tables present the fair value measurements of assets recognized in the accompanying balance sheets measured at fair value on a recurring basis as of June 30, 2017 and December 31, 2016 and indicate the level within the fair value hierarchy of the valuation techniques.

|  |  |  |  | Fair Value Measurements at June 30, 2017 Using |
(in thousands) |  | Fair Value |  |  | Quoted Prices in Active Markets for Identical Assets (Level 1) |  |  | Significant Other Observable Inputs (Level 2) |  |  | Significant Unobservable Inputs (Level 3) |
Assets measured – recurring basis |  |  |  |  |  |  |  |  |  |  |  |
Available-for-sale securities: |  |  |  |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  | $ | 236,058 |  |  | $ | 80,195 |  |  | $ | 155,863 |  |  | $ | 0 |
State and political subdivisions |  |  | 131,942 |  |  |  | 0 |  |  |  | 131,942 |  |  |  | 0 |
U.S. government sponsored agency mortgage-backed securities |  |  | 217,872 |  |  |  | 0 |  |  |  | 217,872 |  |  |  | 0 |
CRA investment funds |  |  | 24,496 |  |  |  | 24,496 |  |  |  | 0 |  |  |  | 0 |
Mortgage servicing rights |  |  | 3,304 |  |  |  | 0 |  |  |  | 0 |  |  |  | 3,304 |

|  |  |  |  | Fair Value Measurements at December 31, 2016 Using |
(in thousands) |  | Fair Value |  |  | Quoted Prices in Active Markets for Identical Assets (Level 1) |  |  | Significant Other Observable Inputs (Level 2) |  |  | Significant Unobservable Inputs (Level 3) |
Assets measured – recurring basis |  |  |  |  |  |  |  |  |  |  |  |
Available-for-sale securities: |  |  |  |  |  |  |  |  |  |  |  |
U.S. Treasury and government agencies |  | $ | 222,464 |  |  | $ | 44,934 |  |  | $ | 177,530 |  |  | $ | 0 |
State and political subdivisions |  |  | 133,516 |  |  |  | 0 |  |  |  | 133,516 |  |  |  | 0 |
U.S. government sponsored agency mortgage-backed securities |  |  | 225,056 |  |  |  | 0 |  |  |  | 225,056 |  |  |  | 0 |
CRA investment funds |  |  | 24,358 |  |  |  | 24,358 |  |  |  | 0 |  |  |  | 0 |
Mortgage servicing rights |  |  | 3,433 |  |  |  | 0 |  |  |  | 0 |  |  |  | 3,433 |

Following is a description of the valuation methodologies and inputs used for assets measured at fair value on a recurring basis and recognized in the accompanying balance sheets, as well as the general classification of such assets pursuant to the valuation hierarchy. These valuation methodologies were applied to all of CTBI’s financial assets carried at fair value. CTBI had no liabilities measured and recorded at fair value as of June 30, 2017 and December 31, 2016. There have been no significant changes in the valuation techniques during the quarter or six months ended June 30, 2017. For assets classified within Level 3 of the fair value hierarchy, the process used to develop the reported fair value is described below.
Available-for-Sale Securities
Securities classified as available-for-sale are reported at fair value on a recurring basis. U.S. Treasury and government agencies and CTBI’s CRA investment funds are classified as Level 1 of the valuation hierarchy where quoted market prices are available in the active market on which the individual securities are traded.
If quoted market prices are not available, CTBI obtains fair value measurements from an independent pricing service, such as Interactive Data, which utilizes pricing models to determine fair value measurement. CTBI reviews the pricing quarterly to verify the reasonableness of the pricing. The fair value measurements consider observable data that may include dealer quotes, market spreads, cash flows, the U.S. Treasury yield curve, live trading levels, trade execution data, market consensus prepayment speeds, credit information and the bond’s terms and conditions, among other factors. U.S. Treasury and government agencies, state and political subdivisions, and U.S. government sponsored agency mortgage-backed securities are classified as Level 2 inputs.
In certain cases where Level 1 or Level 2 inputs are not available, securities are classified within Level 3 of the hierarchy. Fair value determinations for Level 3 measurements are estimated on a quarterly basis where assumptions used are reviewed to ensure the estimated fair value complies with accounting standards generally accepted in the United States. As of June 30, 2017 and December 31, 2016, CTBI does not own any securities valued using Level 3 inputs.
Mortgage Servicing Rights
Mortgage servicing rights do not trade in an active, open market with readily observable prices. CTBI reports mortgage servicing rights at fair value on a recurring basis with subsequent remeasurement of MSRs based on change in fair value.
In determining fair value, CTBI utilizes the expertise of an independent third party. Accordingly, fair value is determined by the independent third party by utilizing assumptions about factors such as mortgage interest rates, discount rates, mortgage loan prepayment speeds, market trends and industry demand. Due to the nature of the valuation inputs, mortgage servicing rights are classified within Level 3 of the hierarchy. Fair value determinations for Level 3 measurements of mortgage servicing rights are tested for impairment on a quarterly basis where assumptions used are reviewed to ensure the estimated fair value complies with accounting standards generally accepted in the United States. See the table below for inputs and valuation techniques used for Level 3 mortgage servicing rights.
Transfers between Levels
There were no transfers between Levels 1, 2, and 3 as of June 30, 2017.
Level 3 Reconciliation
Following is a reconciliation of the beginning and ending balances of recurring fair value measurements recognized in the accompanying balance sheet using significant unobservable (Level 3) inputs for the three and six months ended June 30, 2017 and 2016:

Mortgage Servicing Rights |  |  |  |  |  |
|  | Three Months Ended |  |  | Six Months Ended |
|  | June 30 |  |  | June 30 |
(in thousands) |  | 2017 |  |  | 2016 |  |  | 2017 |  |  | 2016 |
Beginning balance |  | $ | 3,474 |  |  | $ | 2,908 |  |  | $ | 3,433 |  |  | $ | 3,236 |
Total recognized losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Included in net income |  |  | (163 | ) |  |  | (160 | ) |  |  | (78 | ) |  |  | (540 | )
Issues |  |  | 88 |  |  |  | 127 |  |  |  | 171 |  |  |  | 221 |
Settlements |  |  | (95 | ) |  |  | (78 | ) |  |  | (222 | ) |  |  | (120 | )
Ending balance |  | $ | 3,304 |  |  | $ | 2,797 |  |  | $ | 3,304 |  |  | $ | 2,797 |
Total losses for the period included in net income attributable to the change in unrealized gains or losses related to assets still held at the reporting date |  | $ | (163 | ) |  | $ | (160 | ) |  | $ | (78 | ) |  | $ | (540 | )

Realized and unrealized gains and losses for items reflected in the table above are included in net income in the consolidated statements of income as follows:

Noninterest Income |  |  |  |  |  |
|  | Three Months Ended |  |  | Six Months Ended |
|  | June 30 |  |  | June 30 |
(in thousands) |  | 2017 |  |  | 2016 |  |  | 2017 |  |  | 2016 |
Total losses |  | $ | (258 | ) |  | $ | (238 | ) |  | $ | (301 | ) |  | $ | (660 | )

Nonrecurring Measurements
The following tables present the fair value measurements of assets recognized in the accompanying balance sheets measured at fair value on a nonrecurring basis as of June 30, 2017 and December 31, 2016 and indicate the level within the fair value hierarchy of the valuation techniques.

|  |  |  |  | Fair Value Measurements at June 30, 2017 Using |
(in thousands) |  | Fair Value |  |  | Quoted Prices in Active Markets for Identical Assets (Level 1) |  |  | Significant Other Observable Inputs (Level 2) |  |  | Significant Unobservable Inputs (Level 3) |
Assets measured – nonrecurring basis |  |  |  |  |  |  |  |  |  |  |  |
Impaired loans (collateral dependent) |  | $ | 2,352 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 2,352 |
Other real estate/assets owned |  |  | 17,166 |  |  |  | 0 |  |  |  | 0 |  |  |  | 17,166 |

|  |  |  |  | Fair Value Measurements at December 31, 2016 Using |
(in thousands) |  | Fair Value |  |  | Quoted Prices in Active Markets for Identical Assets (Level 1) |  |  | Significant Other Observable Inputs (Level 2) |  |  | Significant Unobservable Inputs (Level 3) |
Assets measured – nonrecurring basis |  |  |  |  |  |  |  |  |  |  |  |
Impaired loans (collateral dependent) |  | $ | 5,506 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 5,506 |
Other real estate/assets owned |  |  | 4,388 |  |  |  | 0 |  |  |  | 0 |  |  |  | 4,388 |

Following is a description of the valuation methodologies and inputs used for assets measured at fair value on a nonrecurring basis and recognized in the accompanying balance sheet, as well as the general classification of such assets pursuant to the valuation hierarchy. For assets classified within Level 3 of the fair value hierarchy, the process used to develop the reported fair value is described below.
Impaired Loans (Collateral Dependent)
The estimated fair value of collateral-dependent impaired loans is based on the appraised fair value of the collateral, less estimated cost to sell. Collateral-dependent impaired loans are classified within Level 3 of the fair value hierarchy.
CTBI considers the appraisal or evaluation as the starting point for determining fair value and then considers other factors and events in the environment that may affect the fair value. Appraisals of the collateral underlying collateral-dependent loans are obtained when the loan is determined to be collateral-dependent and subsequently as deemed necessary by the Chief Credit Officer. Appraisals are reviewed for accuracy and consistency by the Chief Credit Officer. Appraisers are selected from the list of approved appraisers maintained by management. The appraised values are reduced by discounts to consider lack of marketability and estimated cost to sell if repayment or satisfaction of the loan is dependent on the sale of the collateral. These discounts and estimates are developed by the Chief Credit Officer by comparison to historical results.
Loans considered impaired under ASC 310-35, Impairment of a Loan, are loans for which, based on current information and events, it is probable that the creditor will be unable to collect all amounts due according to the contractual terms of the loan agreement. Impaired loans are subject to nonrecurring fair value adjustments to reflect subsequent (i) partial write-downs that are based on the observable market price or current appraised value of the collateral or (ii) the full charge-off of the loan carrying value. Quarter-to-date fair value adjustments on impaired loans disclosed above were $0.4 million, $0.3 million, and $0.3 million for the quarters ended June 30, 2017, December 31, 2016, and June 30, 2016, respectively. Year-to-date fair value adjustments were $0.5 million for the six months ended June 30, 2017, $0.6 million for the year ended December 31, 2016, and $0.6 million for the six months ended June 30, 2016.
Other Real Estate Owned
In accordance with the provisions of ASC 360, Property, Plant, and Equipment, other real estate owned (OREO) is carried at the lower of fair value at acquisition date or current estimated fair value, less estimated cost to sell when the real estate is acquired. Estimated fair value of OREO is based on appraisals or evaluations. OREO is classified within Level 3 of the fair value hierarchy. Long-lived assets are subject to nonrecurring fair value adjustments to reflect subsequent partial write-downs that are based on the observable market price or current appraised value of the collateral. Quarter-to-date fair value adjustments on other real estate/assets owned were $1.4 million, $0.6 million, and $0.1 million for the quarters ended June 30, 2017, December 31, 2016, and June 30, 2016, respectively. Year-to-date adjustments were $2.0 million for the six months ended June 30, 2017, $1.2 million for the year ended December 31, 2016, and $0.2 million for the six months ended June 30, 2016.
Our policy for determining the frequency of periodic reviews is based upon consideration of the specific properties and the known or perceived market fluctuations in a particular market and is typically between 12 and 18 months but generally not more than 24 months. Appraisers are selected from the list of approved appraisers maintained by management.
Unobservable (Level 3) Inputs
The following tables present quantitative information about unobservable inputs used in recurring and nonrecurring Level 3 fair value measurements at June 30, 2017 and December 31, 2016.

(in thousands) |  | Quantitative Information about Level 3 Fair Value Measurements
|  | Fair Value at June 30, 2017 |  | Valuation Technique(s) | Unobservable Input |  | Range (Weighted Average)
Mortgage servicing rights |  | $ | 3,304 |  | Discount cash flows, computer pricing model | Constant prepayment rate |  |  | 7.0% - 29.4% (10.6%)
|  |  |  |  |  | Probability of default |  |  | 0.0% - 100.0% (3.9%)
|  |  |  |  |  | Discount rate |  |  | 10.0% - 11.5% (10.1%)
Impaired loans (collateral-dependent) |  | $ | 2,352 |  | Market comparable properties | Marketability discount |  |  | 5.8% - 100.0% (43.5%)
Other real estate/assets owned |  | $ | 17,166 |  | Market comparable properties | Comparability adjustments |  |  | 6.0% - 37.5% (11.2%)

(in thousands) |  | Quantitative Information about Level 3 Fair Value Measurements
|  | Fair Value at December 31, 2016 |  | Valuation Technique(s) | Unobservable Input |  | Range (Weighted Average)
Mortgage servicing rights |  | $ | 3,433 |  | Discount cash flows, computer pricing model | Constant prepayment rate |  |  | 7.0% - 27.0% (9.5%)
|  |  |  |  |  | Probability of default |  |  | 0.0% - 100.0% (3.0%)
|  |  |  |  |  | Discount rate |  |  | 10.0% - 11.5% (10.1%)
Impaired loans (collateral-dependent) |  | $ | 5,506 |  | Market comparable properties | Marketability discount |  |  | 0.0% - 100.0% (33.7%)
Other real estate/assets owned |  | $ | 4,388 |  | Market comparable properties | Comparability adjustments |  |  | 10.0% - 100.0% (14.9%)

Sensitivity of Significant Unobservable Inputs
The following is a discussion of the sensitivity of significant unobservable inputs, the interrelationships between those inputs and other unobservable inputs used in recurring fair value measurement and of how those inputs might magnify or mitigate the effect of changes in the unobservable inputs on the fair value measurement.
Mortgage Servicing Rights
Market value for mortgage servicing rights is derived based on unobservable inputs, such as prepayment speeds of the underlying loans generated using the Andrew Davidson Prepayment Model, FHLMC/FNMA guidelines, the weighted average life of the loan, the discount rate, the weighted average coupon, and the weighted average default rate. Significant increases (decreases) in either of those inputs in isolation would result in a significantly lower (higher) fair value measurement. Generally, a change in the assumption used for prepayment speeds is accompanied by a directionally opposite change in the assumption for interest rates.
Fair Value of Financial Instruments
The following table presents estimated fair value of CTBI’s financial instruments as of June 30, 2017 and indicates the level within the fair value hierarchy of the valuation techniques.

|  |  |  |  | Fair Value Measurements at June 30, 2017 Using |
(in thousands) |  | Carrying Amount |  |  | Quoted Prices in Active Markets for Identical Assets (Level 1) |  |  | Significant Other Observable Inputs (Level 2) |  |  | Significant Unobservable Inputs (Level 3) |
Financial assets: |  |  |  |  |  |  |  |  |  |  |  |
Cash and cash equivalents |  | $ | 127,830 |  |  | $ | 127,830 |  |  | $ | 0 |  |  | $ | 0 |
Certificates of deposit in other banks |  |  | 12,260 |  |  |  | 0 |  |  |  | 12,223 |  |  |  | 0 |
Securities available-for-sale |  |  | 610,368 |  |  |  | 104,691 |  |  |  | 505,677 |  |  |  | 0 |
Securities held-to-maturity |  |  | 858 |  |  |  | 0 |  |  |  | 858 |  |  |  | 0 |
Loans held for sale |  |  | 4,624 |  |  |  | 4,727 |  |  |  | 0 |  |  |  | 0 |
Loans, net |  |  | 3,050,209 |  |  |  | 0 |  |  |  | 0 |  |  |  | 3,028,478 |
Federal Home Loan Bank stock |  |  | 17,927 |  |  |  | 0 |  |  |  | 17,927 |  |  |  | 0 |
Federal Reserve Bank stock |  |  | 4,887 |  |  |  | 0 |  |  |  | 4,887 |  |  |  | 0 |
Accrued interest receivable |  |  | 11,329 |  |  |  | 0 |  |  |  | 11,329 |  |  |  | 0 |
Mortgage servicing rights |  |  | 3,304 |  |  |  | 0 |  |  |  | 0 |  |  |  | 3,304 |
Financial liabilities: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Deposits |  | $ | 3,105,610 |  |  | $ | 782,864 |  |  | $ | 2,324,415 |  |  | $ | 0 |
Repurchase agreements |  |  | 257,208 |  |  |  | 0 |  |  |  | 0 |  |  |  | 257,148 |
Federal funds purchased |  |  | 7,220 |  |  |  | 0 |  |  |  | 7,220 |  |  |  | 0 |
Advances from Federal Home Loan Bank |  |  | 100,894 |  |  |  | 0 |  |  |  | 100,895 |  |  |  | 0 |
Long-term debt |  |  | 59,341 |  |  |  | 0 |  |  |  | 0 |  |  |  | 49,073 |
Accrued interest payable |  |  | 2,137 |  |  |  | 0 |  |  |  | 2,137 |  |  |  | 0 |
Unrecognized financial instruments: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Letters of credit |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |
Commitments to extend credit |  |  | 0 |  |  |  | 0 |  |  |  | 0 |  |  |  | 0 |
Forward sale commitments |  |  | 0 |  |  |  | 0 |  |  |  | 0 |  |  |  | 0 |

The following table presents estimated fair value of CTBI’s financial instruments as of December 31, 2016 and indicates the level within the fair value hierarchy of the valuation techniques.

(in thousands) |  |  |  |  | Fair Value Measurements at December 31, 2016 Using |
|  | Carrying Amount |  |  | Quoted Prices in Active Markets for Identical Assets (Level 1) |  |  | Significant Other Observable Inputs (Level 2) |  |  | Significant Unobservable Inputs (Level 3) |
Financial assets: |  |  |  |  |  |  |  |  |  |  |  |
Cash and cash equivalents |  | $ | 144,716 |  |  | $ | 144,716 |  |  | $ | 0 |  |  | $ | 0 |
Certificates of deposit in other banks |  |  | 980 |  |  |  | 0 |  |  |  | 982 |  |  |  | 0 |
Securities available-for-sale |  |  | 605,394 |  |  |  | 69,292 |  |  |  | 536,102 |  |  |  | 0 |
Securities held-to-maturity |  |  | 866 |  |  |  | 0 |  |  |  | 867 |  |  |  | 0 |
Loans held for sale |  |  | 1,244 |  |  |  | 1,260 |  |  |  | 0 |  |  |  | 0 |
Loans, net |  |  | 2,902,438 |  |  |  | 0 |  |  |  | 0 |  |  |  | 2,882,348 |
Federal Home Loan Bank stock |  |  | 17,927 |  |  |  | 0 |  |  |  | 17,927 |  |  |  | 0 |
Federal Reserve Bank stock |  |  | 4,887 |  |  |  | 0 |  |  |  | 4,887 |  |  |  | 0 |
Accrued interest receivable |  |  | 11,922 |  |  |  | 0 |  |  |  | 11,922 |  |  |  | 0 |
Mortgage servicing rights |  |  | 3,433 |  |  |  | 0 |  |  |  | 0 |  |  |  | 3,433 |
Financial liabilities: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Deposits |  | $ | 3,081,308 |  |  | $ | 767,918 |  |  | $ | 2,321,690 |  |  | $ | 0 |
Repurchase agreements |  |  | 251,065 |  |  |  | 0 |  |  |  | 0 |  |  |  | 250,820 |
Federal funds purchased |  |  | 4,816 |  |  |  | 0 |  |  |  | 4,816 |  |  |  | 0 |
Advances from Federal Home Loan Bank |  |  | 944 |  |  |  | 0 |  |  |  | 1,009 |  |  |  | 0 |
Long-term debt |  |  | 61,341 |  |  |  | 0 |  |  |  | 0 |  |  |  | 49,073 |
Accrued interest payable |  |  | 1,200 |  |  |  | 0 |  |  |  | 1,200 |  |  |  | 0 |
Unrecognized financial instruments: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Letters of credit |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |  |  | $ | 0 |
Commitments to extend credit |  |  | 0 |  |  |  | 0 |  |  |  | 0 |  |  |  | 0 |
Forward sale commitments |  |  | 0 |  |  |  | 0 |  |  |  | 0 |  |  |  | 0 |

The following methods and assumptions were used to estimate the fair value of each class of financial instruments for which it is practicable to estimate that value:
Cash and cash equivalents – The carrying amount approximates fair value.
Certificates of deposit in other banks – Fair values are based on quoted market prices or dealer quotes for similar instruments.
Securities held-to-maturity – Fair values are based on quoted market prices, if available. If a quoted price is not available, fair value is estimated using quoted prices for similar securities. The fair value estimate is provided to management from a third party using modeling assumptions specific to each type of security that are reviewed and approved by management. Quarterly sampling of fair values provided by additional third parties supplement the fair value review process.
Loans held for sale – The fair value is predetermined at origination based on sale price.
Loans (net of the allowance for loan and lease losses) – The fair value of fixed rate loans and variable rate mortgage loans is estimated by discounting the future cash flows using current rates at which similar loans would be made to borrowers with similar credit ratings and for the same remaining maturities. For other variable rate loans, the carrying amount approximates fair value.
Federal Home Loan Bank stock – The carrying value of Federal Home Loan Bank stock approximates fair value based on the redemption provisions of the Federal Home Loan Bank.
Federal Reserve Bank stock – The carrying value of Federal Reserve Bank stock approximates fair value based on the redemption provisions of the Federal Reserve Bank.
Accrued interest receivable – The carrying amount approximates fair value.
Deposits – The fair value of fixed maturity time deposits is estimated by discounting the future cash flows using the rates currently offered for deposits of similar remaining maturities. For deposits including demand deposits, savings accounts, NOW accounts, and certain money market accounts, the carrying value approximates fair value.
Repurchase agreements – The fair value is estimated by discounting future cash flows using current rates.
Federal funds purchased – The carrying amount approximates fair value.
Advances from Federal Home Loan Bank – The fair value of these fixed-maturity advances is estimated by discounting future cash flows using rates currently offered for advances of similar remaining maturities.
Long-term debt – The fair value is estimated by discounting future cash flows using current rates.
Accrued interest payable – The carrying amount approximates fair value.
Commitments to originate loans, forward sale commitments, letters of credit, and lines of credit – The fair value of commitments to originate loans is estimated using the fees currently charged to enter into similar agreements, taking into account the remaining terms of the agreements and the present creditworthiness of the counterparties. For fixed-rate loan commitments, fair value also considers the difference between current levels of interest rates and the committed rates. The fair value of forward sale commitments is estimated based on current market prices for loans of similar terms and credit quality. The fair values of letters of credit and lines of credit are based on fees currently charged for similar agreements or on the estimated cost to terminate or otherwise settle the obligations with the counterparties at the reporting date. The fair values of these commitments are not material.
Note 9 – Earnings Per Share
The following table sets forth the computation of basic and diluted earnings per share:

|  | Three Months Ended |  |  | Six Months Ended |
|  | June 30 |  |  | June 30 |
(in thousands except per share data) |  | 2017 |  |  | 2016 |  |  | 2017 |  |  | 2016 |
Numerator: |  |  |  |  |  |  |  |  |  |  |  |
Net income |  | $ | 11,541 |  |  | $ | 11,566 |  |  | $ | 22,818 |  |  | $ | 23,168 |
Denominator: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Basic earnings per share: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Weighted average shares |  |  | 17,626 |  |  |  | 17,530 |  |  |  | 17,621 |  |  |  | 17,521 |
Diluted earnings per share: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Effect of dilutive stock options and restricted stock grants |  |  | 19 |  |  |  | 12 |  |  |  | 20 |  |  |  | 17 |
Adjusted weighted average shares |  |  | 17,645 |  |  |  | 17,542 |  |  |  | 17,641 |  |  |  | 17,538 |
Earnings per share: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Basic earnings per share |  | $ | 0.65 |  |  | $ | 0.66 |  |  | $ | 1.29 |  |  | $ | 1.32 |
Diluted earnings per share |  |  | 0.65 |  |  |  | 0.66 |  |  |  | 1.29 |  |  |  | 1.32 |

There were no options to purchase common shares that were excluded from the diluted calculations above for the three and six months ended June 30, 2017. In addition to in-the-money stock options, unvested restricted stock grants were also used in the calculation of diluted earnings per share based on the treasury method. Options to purchase 67,953 common shares at a weighted average price of $35.31 were excluded from the diluted calculations above for the six months ended June 30, 2016, because the exercise prices on the options were greater than the average market price for the period. No options were excluded for the three months ended June 30, 2016.
Note 10 – Accumulated Other Comprehensive Income
Unrealized gains (losses) on AFS securities
Amounts reclassified from accumulated other comprehensive income (AOCI) and the affected line items in the statements of income during the three and six months ended June 30, 2017 and 2016 were:

|  | Amounts Reclassified from AOCI |
(in thousands) |  | Three Months Ended June 30 |  |  | Six Months Ended June 30 |
| 2017 |  |  | 2016 |  |  | 2017 |  |  | 2016 |
Affected line item in the statements of income |  |  |  |  |  |  |  |  |  |  |  |
Securities gains (losses) |  | $ | 18 |  |  | $ | (4 | ) |  | $ | 10 |  |  | $ | 64 |
Tax expense (benefit) |  |  | 6 |  |  |  | (1 | ) |  |  | 4 |  |  |  | 23 |
Total reclassifications out of AOCI |  | $ | 12 |  |  | $ | (3 | ) |  | $ | 6 |  |  | $ | 41 |

Note 11 – Commitments and Contingencies
CTB will be required to make certain customer reimbursements related to two deposit add-on products. As previously discussed in CTBI’s most recent Form 10-K and Form 10-Q, management established a related accrual in 2014, which was not considered material. The time period and amount of the reimbursements have not yet been determined; therefore, the actual amount may materially vary from the amount management has evaluated as most likely at June 30, 2017.

Item 2. Management’s Discussion and Analysis of Financial Condition and
Results of Operations
Overview
The following Management’s Discussion and Analysis of Financial Condition and Results of Operations (“MD&A”) is intended to help the reader understand Community Trust Bancorp, Inc., our operations, and our present business environment. The MD&A is provided as a supplement to – and should be read in conjunction with – our condensed consolidated financial statements and the accompanying notes contained in this quarterly report. The MD&A includes the following sections:
v Our Business
v Results of Operations and Financial Condition
v Dividends
v Liquidity and Market Risk
v Interest Rate Risk
v Capital Resources
v Impact of Inflation, Changing Prices, and Economic Conditions
v Stock Repurchase Program
v Critical Accounting Policies and Estimates
Our Business
Community Trust Bancorp, Inc. (“CTBI”) is a bank holding company headquartered in Pikeville, Kentucky. Currently, we own one commercial bank, Community Trust Bank, Inc. (“CTB”) and one trust company, Community Trust and Investment Company, Inc. Through our subsidiaries, we have eighty banking locations in eastern, northeastern, central, and south central Kentucky, southern West Virginia, and northeastern Tennessee, four trust offices across Kentucky, and one trust office in northeastern Tennessee. At June 30, 2017, we had total consolidated assets of $4.1 billion and total consolidated deposits, including repurchase agreements, of $3.4 billion. Total shareholders’ equity at June 30, 2017 was $514.9 million. Trust assets under management, which are excluded from CTBI’s total consolidated assets, at June 30, 2017, were $2.2 billion. Trust assets under management include CTB’s investment portfolio totaling $0.6 billion.
Through its subsidiaries, CTBI engages in a wide range of commercial and personal banking and trust and wealth management activities, which include accepting time and demand deposits; making secured and unsecured loans to corporations, individuals and others; providing cash management services to corporate and individual customers; issuing letters of credit; renting safe deposit boxes; and providing funds transfer services. The lending activities of CTB include making commercial, construction, mortgage, and personal loans. Lease-financing, lines of credit, revolving lines of credit, term loans, and other specialized loans, including asset-based financing, are also available. Our corporate subsidiaries act as trustees of personal trusts, as executors of estates, as trustees for employee benefit trusts, as paying agents for bond and stock issues, as investment agent, as depositories for securities, and as providers of full service brokerage and insurance services. For further information, see Item 1 of our annual report on Form 10-K for the year ended December 31, 2016.
Results of Operations and Financial Condition
For the quarter ended June 30, 2017, we reported earnings of $11.5 million, or $0.65 per basic share, compared to $11.3 million, or $0.64 per basic share, earned during the first quarter 2017 and $11.6 million, or $0.66 per basic share, earned during the second quarter 2016. Earnings for the six months ended June 30, 2017 were $22.8 million, or $1.29 per basic share, compared to $23.2 million, or $1.32 per basic share earned for the six months ended June 30, 2016.
Quarterly Highlights

v | Net interest income for the quarter of $34.2 million was an increase of $1.1 million, or 3.5%, from first quarter 2017 and $1.2 million, or 3.6%, from prior year second quarter.

v | While net charge-offs improved for the quarter, provision for loan losses for the quarter ended June 30, 2017 increased $1.5 million over prior quarter and $0.9 million over prior year same quarter as a result of an increase in our loan portfolio.

v | Our loan portfolio increased $149.0 million, an annualized 10.2%, from December 31, 2016 and $117.5 million, an annualized 15.9%, during the quarter.

v | Net loan charge-offs for the quarter ended June 30, 2017 were $1.3 million, or 0.18% of average loans annualized, compared to $1.4 million, or 0.20%, experienced for the first quarter 2017 and $2.5 million, or 0.34%, for the second quarter 2016.

v | Nonperforming loans at $28.0 million increased $0.5 million from December 31, 2016 and $2.9 million from March 31, 2017. Nonperforming assets at $60.7 million decreased $2.7 million from December 31, 2016 and $0.2 million from March 31, 2017.

v | Deposits, including repurchase agreements, increased $30.4 million from December 31, 2016 but decreased $54.5 million during the quarter.

v | Noninterest income for the quarter ended June 30, 2017 of $12.3 million was an increase of $0.7 million, or 6.3%, from prior quarter and $0.5 million, or 4.6%, from prior year same quarter. The increase for the quarter was primarily the result of a $0.6 million gain on the repurchase of $2.0 million in trust preferred securities.

v | Noninterest expense for the quarter ended June 30, 2017 of $27.6 million remained relatively flat to prior quarter, but increased $0.4 million, or 1.4%, from prior year same quarter. The increase in noninterest expense was due to an increase in net other real estate owned expense.

Income Statement Review

(dollars in thousands) |  |  |  |  |  |  |  | Change 2017 vs. 2016 |
Six Months Ended June 30 |  | 2017 |  |  | 2016 |  |  | Amount |  |  | Percent |
Net interest income |  | $ | 67,330 |  |  | $ | 66,383 |  |  | $ | 947 |  |  |  | 1.4 | %
Provision for loan losses |  |  | 3,993 |  |  |  | 3,638 |  |  |  | 355 |  |  |  | 9.8 |
Noninterest income |  |  | 23,890 |  |  |  | 22,740 |  |  |  | 1,150 |  |  |  | 5.1 |
Noninterest expense |  |  | 55,210 |  |  |  | 53,434 |  |  |  | 1,776 |  |  |  | 3.3 |
Income taxes |  |  | 9,199 |  |  |  | 8,883 |  |  |  | 316 |  |  |  | 3.6 |
Net income |  | $ | 22,818 |  |  | $ | 23,168 |  |  | $ | (350 | ) |  |  | (1.5 | )%
Average earning assets |  | $ | 3,743,834 |  |  | $ | 3,627,631 |  |  | $ | 116,203 |  |  |  | 3.2 | %
Yield on average earnings assets |  |  | 4.10 | % |  |  | 4.10 | % |  |  | 0.00 | % |  |  | 0.0 | %
Cost of interest bearing funds |  |  | 0.59 | % |  |  | 0.50 | % |  |  | 0.09 | % |  |  | 17.4 | %
Net interest margin |  |  | 3.68 | % |  |  | 3.74 | % |  |  | (0.06 | )% |  |  | (1.5 | )%

Net Interest Income
Net interest income for the quarter of $34.2 million was an increase of $1.1 million, or 3.5%, from first quarter 2017 and $1.2 million, or 3.6%, from prior year second quarter. Our net interest margin at 3.68% remained flat to prior quarter but decreased 3 basis points from prior year same quarter, while our average earnings assets increased $77.9 million and $147.6 million, respectively, during those same periods. Our yield on average earning assets increased 5 basis points from prior quarter and prior year same quarter, and our cost of funds increased 5 basis points from prior quarter and 10 basis points from prior year same quarter. Our ratio of average loans to deposits, including repurchase agreements, was 89.9% for the quarter ended June 30, 2017 compared to 87.9% for the quarter ended March 31, 2017 and 88.1% for the quarter ended June 30, 2016. Net interest income for the six months ended June 30, 2017 increased $0.9 million, or 1.4%, from June 30, 2016.
Provision for Loan Losses
The provision for loan losses that was added to the allowance for the second quarter 2017 was $2.8 million compared to $1.2 million for the quarter ended March 31, 2017 and $1.9 million for the quarter ended June 30, 2016. Year-to-date allocations to the reserve were $4.0 million at June 30, 2017 compared to $3.6 million at June 30, 2016. This provision represented a charge against current earnings in order to maintain the allowance at an appropriate level determined using the accounting estimates described in the Critical Accounting Policies and Estimates section. Our reserve coverage (allowance for loan and lease loss reserve to nonperforming loans) at June 30, 2017 was 132.6% compared to 142.4% at March 31, 2017 and 144.6% at June 30, 2016. Our loan loss reserve as a percentage of total loans outstanding remained at 1.20% from March 31, 2017 to June 30, 2017, down from the 1.22% at June 30, 2016.
Noninterest Income
Noninterest income for the quarter ended June 30, 2017 of $12.3 million was an increase of $0.7 million, or 6.3%, from prior quarter and $0.5 million, or 4.6%, from prior year same quarter. The increase for the quarter was primarily the result of a $0.6 million gain on the repurchase of $2.0 million in trust preferred securities. Noninterest income for the six months ended June 30, 2017 increased $1.2 million, or 5.1%, compared to the six months ended June 30, 2016. This increase included a $0.6 million increase in trust revenue and a $0.4 million increase in loan related fees, in addition to the $0.6 million gain mentioned above, offset partially by a $0.3 million decrease in gains on sales of loans. Loan related fees were affected by fluctuations in the fair value adjustments of our mortgage servicing rights with a $0.3 million improvement year over year.
Noninterest Expense
Noninterest expense for the quarter ended June 30, 2017 of $27.6 million remained relatively flat to prior quarter, but increased $0.4 million, or 1.4%, from prior year same quarter. The increase in noninterest expense was due to an increase in net other real estate owned expense ($0.9 million quarter over quarter and $1.4 million year over year), partially offset by a decrease in personnel expense ($0.9 million quarter over quarter and $0.3 million year over year) and a $0.3 million decrease in FDIC insurance premiums year over year. The increase in net other real estate owned expense was primarily the result of $0.9 million in write-downs on two commercial properties during the quarter. The decrease in personnel expense was primarily due to a reduction in the company performance based incentive accrual. Noninterest expense for the six months ended June 30, 2017 increased $1.8 million, or 3.3%, compared to the six months ended June 30, 2016, as a result of a $1.7 million increase in net other real estate owned expense. Personnel expense for the six months ended June 30, 2017 increased $0.5 million from prior year with a $0.7 million increase in salaries and a $0.5 million increase in the cost of group medical and life insurance, partially offset by a $0.4 million decrease in bonuses and incentives. FDIC insurance premiums decreased $0.6 million from prior year.
Balance Sheet Review
CTBI’s total assets at $4.1 billion increased $148.9 million, or an annualized 7.6%, from December 31, 2016 and $47.0 million, or an annualized 4.7%, from March 31, 2017. Loans outstanding at June 30, 2017 were $3.1 billion, increasing $149.0 million, or an annualized 10.2%, from December 31, 2016 and $117.5 million, or an annualized 15.9%, from March 31, 2017. We experienced an increase during the quarter of $79.7 million in the commercial loan portfolio, $9.1 million in the residential loan portfolio, $25.7 million in the indirect loan portfolio, and $3.0 million in the consumer direct loan portfolio. CTBI’s investment portfolio increased $5.0 million, or an annualized 1.7%, from December 31, 2016 and $4.7 million, or an annualized 3.1%, from March 31, 2017. Deposits in other banks decreased $9.5 million from December 31, 2016 and $68.1 million from March 31, 2017. Deposits, including repurchase agreements, at $3.4 billion increased $30.4 million, or an annualized 1.8%, from December 31, 2016 but decreased $54.5 million, or an annualized 6.4%, from March 31, 2017.
Shareholders’ equity at June 30, 2017 was $514.9 million compared to $500.6 million at December 31, 2016 and $507.5 million at March 31, 2017. Our tangible common equity/tangible assets ratio at June 30, 2017 was 11.19%.
Loans

(in thousands) |  | June 30, 2017 |
Loan Category |  | Balance |  |  | Variance from Prior Year-End |  |  | YTD Net Charge-Offs |  |  | Nonperforming |  |  | ALLL |
Commercial: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Construction |  | $ | 72,054 |  |  |  | 7.5 | % |  | $ | 5 |  |  | $ | 1,352 |  |  | $ | 669 |
Secured by real estate |  |  | 1,179,229 |  |  |  | 8.6 |  |  |  | (516 | ) |  |  | 10,884 |  |  |  | 15,299 |
Equipment lease financing |  |  | 4,903 |  |  |  | (11.0 | ) |  |  | 0 |  |  |  | 130 |  |  |  | 33 |
Commercial other |  |  | 352,173 |  |  |  | 0.6 |  |  |  | (682 | ) |  |  | 1,639 |  |  |  | 4,993 |
Total commercial |  |  | 1,608,359 |  |  |  | 6.6 |  |  |  | (1,193 | ) |  |  | 14,005 |  |  |  | 20,994 |
Residential: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Real estate construction |  |  | 58,566 |  |  |  | 1.0 |  |  |  | 0 |  |  |  | 394 |  |  |  | 581 |
Real estate mortgage |  |  | 708,467 |  |  |  | 0.8 |  |  |  | (90 | ) |  |  | 12,503 |  |  |  | 5,662 |
Home equity |  |  | 93,721 |  |  |  | 2.4 |  |  |  | 0 |  |  |  | 856 |  |  |  | 747 |
Total residential |  |  | 860,754 |  |  |  | 1.0 |  |  |  | (90 | ) |  |  | 13,753 |  |  |  | 6,990 |
Consumer: |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Consumer direct |  |  | 135,228 |  |  |  | 1.6 |  |  |  | (215 | ) |  |  | 34 |  |  |  | 1,866 |
Consumer indirect |  |  | 483,001 |  |  |  | 8.6 |  |  |  | (1,295 | ) |  |  | 221 |  |  |  | 7,283 |
Total consumer |  |  | 618,229 |  |  |  | 7.0 |  |  |  | (1,510 | ) |  |  | 255 |  |  |  | 9,149 |
Total loans |  | $ | 3,087,342 |  |  |  | 5.1 | % |  | $ | (2,793 | ) |  | $ | 28,013 |  |  | $ | 37,133 |

Asset Quality
CTBI’s total nonperforming loans were $28.0 million at June 30, 2017, a 2.0% increase from the $27.5 million at December 31, 2016 and an 11.7% increase from the $25.1 million at March 31, 2017. Loans 90+ days past due and accruing interest decreased $2.5 million from December 31, 2016 and $0.2 million from March 31, 2017. Nonaccrual loans increased $3.0 million from December 31, 2016 and $3.2 million from March 31, 2017. Loans 30-89 days past due and accruing interest at $15.2 million was a decrease of $1.2 million from December 31, 2016 and $0.1 million from March 31 2017. Our loan portfolio management processes focus on the immediate identification, management, and resolution of problem loans to maximize recovery and minimize loss. Our loan risk management processes include weekly delinquent loan review meetings at the market levels and monthly delinquent loan review meetings involving senior corporate management to review all nonaccrual loans and loans 30 days or more past due. Any activity regarding a criticized/classified loan (i.e. problem loan) must be approved by CTB’s Watch List Asset Committee (i.e. Problem Loan Committee). CTB’s Watch List Asset Committee also meets on a quarterly basis and reviews every criticized/classified loan of $100,000 or greater. We also have a Loan Review Department that reviews every market within CTB annually and performs extensive testing of the loan portfolio to assure the accuracy of loan grades and classifications for delinquency, troubled debt restructuring, impaired status, impairment, nonaccrual status, and adequate loan loss reserves.
Impaired loans, loans not expected to meet contractual principal and interest payments other than insignificant delays, at June 30, 2017 totaled $50.7 million, a decrease of $1.5 million from the $52.2 million at December 31, 2016 but a $0.4 million increase from the $50.3 million at March 31, 2017. At June 30, 2017, CTBI had $32.2 million in commercial loans secured by real estate, $4.9 million in commercial real estate construction loans, $10.9 million in commercial other loans, $0.1 million in equipment leases, $0.8 million in real estate consumer construction loans, and $1.8 million in real estate mortgage loans that were modified in troubled debt restructurings and impaired. Management evaluates all impaired loans for the amount of impairment, if any, and records a direct charge-off or provides specific reserves when necessary.
For further information regarding nonperforming and impaired loans, see note 4 to the condensed consolidated financial statements.
CTBI generally does not offer high risk loans such as option ARM products, high loan to value ratio mortgages, interest-only loans, loans with initial teaser rates, or loans with negative amortizations, and therefore, CTBI would have no significant exposure to these products.
Net loan charge-offs for the quarter ended June 30, 2017 were $1.3 million, or 0.18% of average loans annualized, compared to $1.4 million, or 0.20%, experienced for the first quarter 2017 and $2.5 million, or 0.34%, for the second quarter 2016. Of the net charge-offs for the quarter, $0.6 million were in commercial loans, $0.5 million were in indirect auto loans, $0.1 million were in residential loans, and $0.1 million were in consumer direct loans. Net loan charge-offs for the six months ended June 30, 2017 were $2.8 million, or 0.19% of average loans, compared to $4.0 million, or 0.28% of average loans, experienced for the six months ended June 30, 2016.
Other real estate owned at June 30, 2017 was $32.8 million compared to $35.9 million at December 31, 2016 and $37.7 million at June 30, 2016. Included in other real estate owned at June 30, 2017 is a $148 thousand property which was not acquired through foreclosure. As a result of the relocation of our Campbellsville First Street branch to the Bypass location in 2017, the First Street property has been listed for sale and was booked into other real estate owned. Sales of foreclosed properties for the six months ended June 30, 2017 totaled $2.7 million while new foreclosed properties totaled $1.6 million. At June 30, 2017, the book value of properties under contracts to sell was $3.4 million; however, the closings had not occurred at quarter-end.
When foreclosed properties are acquired, appraisals are obtained and the properties are booked at the current market value less expected sales costs. Additionally, periodic updated appraisals are obtained on unsold foreclosed properties. When an updated appraisal reflects a market value below the current book value, a charge is booked to current earnings to reduce the property to its new market value less expected sales costs. Charges to earnings in the second quarter 2017 to reflect the decrease in current market values of foreclosed properties totaled $1.4 million. There were forty-one properties reappraised during the second quarter 2017. Of these, twenty properties were written down by a total of $1.3 million. Charges during the quarters ended March 31, 2017 and June 30, 2016 were $0.5 million and $0.1 million, respectively. Year-to-date charges as of June 30, 2017 were $2.0 million compared to $0.2 million for the six months ended June 30, 2016. Our policy for determining the frequency of periodic reviews is based upon consideration of the specific properties and the known or perceived market fluctuations in a particular market and is typically between 12 and 18 months but generally not more than 24 months. Approximately eighty-nine percent of our OREO properties have been reappraised within the past 18 months. Management anticipates that our foreclosed properties will remain elevated as we work through current market conditions.
The appraisal aging analysis of foreclosed properties, as well as the holding period, at June 30, 2017 is shown below:

(in thousands) |  |  |
Appraisal Aging Analysis |  | Holding Period Analysis |
Days Since Last Appraisal |  | Current Book Value |  | Holding Period |  | Current Book Value |
Up to 3 months |  | $ | 15,243 |  | Less than one year |  | $ | 3,574 |
3 to 6 months |  |  | 5,612 |  | 1 to 2 years |  |  | 9,212 |
6 to 9 months |  |  | 3,338 |  | 2 to 3 years |  |  | 3,090 |
9 to 12 months |  |  | 3,278 |  | 3 to 4 years |  |  | 1,752 |
12 to 18 months |  |  | 1,710 |  | 4 to 5 years |  |  | 176 |
18 to 24 months |  |  | 91 |  | 5 to 7 years* |  |  | 10,349 |
Over 24 months |  |  | 3,366 |  | 8 to 9 years* |  |  | 4,485 |
Total |  | $ | 32,638 |  | Total |  | $ | 32,638 |

*Regulatory approval is required and has been obtained to hold these properties beyond the initial period of 5 years. Additional approval may be required to continue to hold these properties should they not be liquidated during the extension period, which is typically one year. While we have previously received regulatory approval to continue to hold foreclosed properties for over five years, to the extent such approval is not obtained in the future with respect to a foreclosed property, we might be forced to liquidate such property at a price less than its appraised value.
Dividends
The following schedule shows the quarterly cash dividends paid for the past six quarters:

Pay Date | Record Date | Amount Per Share
July 1, 2017 | June 15, 2017 | $0.32
April 1, 2017 | March 15, 2017 | $0.32
January 1, 2017 | December 15, 2016 | $0.32
October 1, 2016 | September 15, 2016 | $0.32
July 1, 2016 | June 15, 2016 | $0.31
April 1, 2016 | March 15, 2016 | $0.31

On July 25, 2017, the Board of Directors of CTBI declared a quarterly cash dividend of $0.33 per share to be paid on October 1, 2017 to shareholders of record on September 15, 2017. This represents an increase of 3.1% in the quarterly cash dividend.
Liquidity and Market Risk
The objective of CTBI’s Asset/Liability management function is to maintain consistent growth in net interest income within our policy limits. This objective is accomplished through management of our consolidated balance sheet composition, liquidity, and interest rate risk exposures arising from changing economic conditions, interest rates, and customer preferences. The goal of liquidity management is to provide adequate funds to meet changes in loan and lease demand or deposit withdrawals. This is accomplished by maintaining liquid assets in the form of cash and cash equivalents and investment securities, sufficient unused borrowing capacity, and growth in core deposits. As of June 30, 2017, we had approximately $127.8 million in cash and cash equivalents and approximately $610.4 million in securities valued at estimated fair value designated as available-for-sale and available to meet liquidity needs on a continuing basis compared to $144.7 million and $605.4 million at December 31, 2016. Additional asset-driven liquidity is provided by the remainder of the securities portfolio and the repayment of loans. In addition to core deposit funding, we also have a variety of other short-term and long-term funding sources available. We also rely on Federal Home Loan Bank advances for both liquidity and management of our asset/liability position. Federal Home Loan Bank advances were $100.9 million at June 30, 2017 compared to $0.9 million at December 31, 2016. As of June 30, 2017, we had a $217.4 million available borrowing position with the Federal Home Loan Bank compared to $295.8 million at December 31, 2016. We generally rely upon net inflows of cash from financing activities, supplemented by net inflows of cash from operating activities, to provide cash for our investing activities. As is typical of many financial institutions, significant financing activities include deposit gathering, use of short-term borrowing facilities such as repurchase agreements and federal funds purchased, and issuance of long-term debt. At June 30, 2017 and December 31, 2016, we had $57 million in lines of credit with various correspondent banks available to meet any future cash needs. Our primary investing activities include purchases of securities and loan originations. We do not rely on any one source of liquidity and manage availability in response to changing consolidated balance sheet needs. Included in our cash and cash equivalents at June 30, 2017 were federal funds sold of $1.8 million compared to $0.5 million at December 31, 2016, and deposits with the Federal Reserve were $72.0 million compared to $93.4 million at December 31, 2016. Additionally, we project cash flows from our investment portfolio to generate additional liquidity over the next 90 days.
The investment portfolio consists of investment grade short-term issues suitable for bank investments. The majority of the investment portfolio is in U.S. government and government sponsored agency issuances. At June 30, 2017, available-for-sale (“AFS”) securities comprised approximately 99.9% of the total investment portfolio, and the AFS portfolio was approximately 119% of equity capital. Ninety-one percent of the pledge eligible portfolio was pledged.
Interest Rate Risk
We consider interest rate risk one of our most significant market risks. Interest rate risk is the exposure to adverse changes in net interest income due to changes in interest rates. Consistency of our net interest revenue is largely dependent upon the effective management of interest rate risk. We employ a variety of measurement techniques to identify and manage our interest rate risk including the use of an earnings simulation model to analyze net interest income sensitivity to changing interest rates. The model is based on actual cash flows and repricing characteristics for on and off-balance sheet instruments and incorporates market-based assumptions regarding the effect of changing interest rates on the prepayment rates of certain assets and liabilities. Assumptions based on the historical behavior of deposit rates and balances in relation to changes in interest rates are also incorporated into the model. These assumptions are inherently uncertain, and as a result, the model cannot precisely measure net interest income or precisely predict the impact of fluctuations in interest rates on net interest income. Actual results will differ from simulated results due to timing, magnitude, and frequency of interest rate changes as well as changes in market conditions and management strategies.
CTBI’s Asset/Liability Management Committee (ALCO), which includes executive and senior management representatives and reports to the Board of Directors, monitors and manages interest rate risk within Board-approved policy limits. Our current exposure to interest rate risks is determined by measuring the anticipated change in net interest income spread evenly over the twelve-month period.
Capital Resources
Shareholders’ equity was $514.9 million at June 30, 2017 and $500.6 million at December 31, 2016. CTBI’s annualized dividend yield to shareholders as of June 30, 2017 was 2.93%. Our primary source of capital growth is the retention of earnings. Cash dividends were $0.64 per share and $0.62 per share for the six months ended June 30, 2017 and 2016, respectively. We retained 50.4% of our earnings for the first six months of 2017 compared to 53.0% for the first six months of 2016.
On July 2, 2013, the Federal Reserve approved final rules that substantially amend the regulatory risk-based capital rules applicable to CTBI and CTB. The FDIC subsequently approved these rules. The final rules implement the “Basel III” regulatory capital reforms and changes required by the Dodd-Frank Act.
The rules include new risk-based capital and leverage ratios, which are being phased in from 2015 to 2019, and refine the definition of what constitutes “capital” for purposes of calculating those ratios. The new minimum capital level requirements applicable to CTBI and CTB under the final rules are: (i) a new common equity Tier 1 capital ratio of 4.5%; (ii) a Tier 1 capital ratio of 6% (increased from 4%); (iii) a total capital ratio of 8% (unchanged from previous rules); and (iv) a Tier 1 leverage ratio of 4% for all institutions. The final rules also establish a “capital conservation buffer” above the new regulatory minimum capital requirements, which must consist entirely of common equity Tier 1 capital. The capital conservation buffer began to be phased in on January 1, 2016 at 0.625% of risk-weighted assets and will increase by 0.625% annually until fully implemented in January 2019. An institution is subject to limitations on certain activities including payment of dividends, share repurchases, and discretionary bonuses to executive officers if its capital level is below the capital conservation buffer amount.
The final rules also implement revisions and clarifications consistent with Basel III regarding the various components of Tier 1 capital, including common equity, unrealized gains and losses, as well as certain instruments that will no longer qualify as Tier 1 capital, some of which will be phased out over time. However, the final rules provide that small depository institution holding companies with less than $15 billion in total assets as of December 31, 2009 (which includes CTBI) will be able to permanently include non-qualifying instruments that were issued and included in Tier 1 or Tier 2 capital prior to May 19, 2010 in additional Tier 1 or Tier 2 capital until they redeem such instruments or until the instruments mature.
The final rules also contain revisions to the prompt corrective action framework, which is designed to place restrictions on insured depository institutions, including CTB, if their capital levels begin to show signs of weakness. These revisions took effect January 1, 2015. Under the prompt corrective action requirements, which are designed to complement the capital conservation buffer, insured depository institutions are required to meet the following increased capital level requirements in order to qualify as “well capitalized:” (i) a common equity Tier 1 capital ratio of 6.5%; (ii) a Tier 1 capital ratio of 8% (increased from 6%); (iii) a total capital ratio of 10% (unchanged from previous rules); and (iv) a Tier 1 leverage ratio of 5% (unchanged from previous rules).
The final rules set forth certain changes for the calculation of risk-weighted assets, which we were required to utilize beginning January 1, 2015. The standardized approach final rule utilizes an increased number of credit risk exposure categories and risk weights, and also addresses: (i) an alternative standard of creditworthiness consistent with Section 939A of the Dodd-Frank Act; (ii) revisions to recognition of credit risk mitigation; (iii) rules for risk weighting of equity exposures and past due loans; (iv) revised capital treatment for derivatives and repo-style transactions; and (v) disclosure requirements for top-tier banking organizations with $50 billion or more in total assets that are not subject to the “advance approach rules” that apply to banks with greater than $250 billion in consolidated assets. We currently satisfy the well-capitalized and the capital conservation standards, and based on our current capital composition and levels, we anticipate that our capital ratios, on a Basel III basis, will continue to exceed the well-capitalized minimum capital requirements and capital conservation buffer standards.
As of June 30, 2017, CTBI had a common equity Tier 1 capital ratio of 14.91%, a Tier 1 capital ratio of 16.81%, a total capital ratio of 18.05%, and a Tier 1 leverage ratio of 12.72%, all above the required levels to be considered “well-capitalized.” Our capital conservation buffer at June 30, 2017 was 10.05%.
As of June 30, 2017, we are not aware of any current recommendations by banking regulatory authorities which, if they were to be implemented, would have, or are reasonably likely to have, a material adverse impact on our liquidity, capital resources, or operations.
CTB will be required to make certain customer reimbursements related to two deposit add-on products. As previously discussed in CTBI’s most recent Form 10-K and Form 10-Q, management established a related accrual in 2014, which was not considered material. The time period and amount of the reimbursements have not yet been determined; therefore, the actual amount may materially vary from the amount management has evaluated as most likely at June 30, 2017.
Impact of Inflation, Changing Prices, and Economic Conditions
The majority of our assets and liabilities are monetary in nature. Therefore, CTBI differs greatly from most commercial and industrial companies that have significant investment in nonmonetary assets, such as fixed assets and inventories. However, inflation does have an important impact on the growth of assets in the banking industry and on the resulting need to increase equity capital at higher than normal rates in order to maintain an appropriate equity to assets ratio. Inflation also affects other expenses, which tend to rise during periods of general inflation.
We believe one of the most significant impacts on financial and operating results is our ability to react to changes in interest rates. We seek to maintain an essentially balanced position between interest rate sensitive assets and liabilities in order to protect against the effects of wide interest rate fluctuations.
Beginning in 2008, the U.S. economy faced a severe economic crisis including a major recession from which it is recovering. Commerce and business growth in certain regions in the U.S. remains reduced and local governments and many businesses continue to experience financial difficulty. In some areas of the U.S., including certain parts of our service area, unemployment levels remain elevated. There can be no assurance that these conditions will continue to improve and these conditions could worsen. In addition, the level of U.S. debt, the Federal Open Market Committee’s plan for economic stabilization, potential volatility in oil prices, potential U.S. tax law modifications, and the possible repeal of the Patient Protection and Affordable Care Act and the implementation of replacement healthcare legislation may have a destabilizing effect on financial markets or a negative effect on the economy.
Our financial performance generally, and in particular the ability of borrowers to pay interest on and repay principal of outstanding loans and the value of collateral securing those loans, as well as demand for loans and other products and services we offer, is highly dependent upon the business environment in the markets where we operate, in the states of Kentucky, West Virginia, and Tennessee and in the United States as a whole. While unemployment rates have improved in many areas of the United States, unemployment rates remain elevated in certain markets in which we operate. A favorable business environment is generally characterized by, among other factors, economic growth, efficient capital markets, low inflation, low unemployment, high business and investor confidence, and strong business earnings. Unfavorable or uncertain economic and market conditions can be caused by declines in economic growth, business activity, or investor or business confidence; limitations on the availability or increases in the cost of credit and capital; increases in inflation or interest rates; high unemployment; natural disasters; or a combination of these or other factors.
Overall, during the past several years, the business environment has been adverse for many households and businesses in the United States and worldwide. While economic conditions in the United States and worldwide have improved since the recession, there can be no assurance that this improvement will continue or that another recession will not occur. Economic pressure on consumers and uncertainty regarding continuing economic improvement may result in changes in consumer and business spending, borrowing, and savings habits. Such conditions could adversely affect the credit quality of our loans and our business, financial condition, and results of operations.
Stock Repurchase Program
CTBI has not acquired any shares of common stock through the stock repurchase program since February 2008. There are 67,371 shares remaining under CTBI’s current repurchase authorization.
Critical Accounting Policies and Estimates
The preparation of consolidated financial statements in conformity with accounting principles generally accepted in the United States of America requires the appropriate application of certain accounting policies, many of which require us to make estimates and assumptions about future events and their impact on amounts reported in our consolidated financial statements and related notes. Since future events and their impact cannot be determined with certainty, the actual results will inevitably differ from our estimates. Such differences could be material to the consolidated financial statements.
We believe the application of accounting policies and the estimates required therein are reasonable. These accounting policies and estimates are constantly reevaluated, and adjustments are made when facts and circumstances dictate a change. Historically, we have found our application of accounting policies to be appropriate, and actual results have not differed materially from those determined using necessary estimates.
We have identified the following critical accounting policies:
Investments – Management determines the classification of securities at purchase. We classify securities into held-to-maturity, trading, or available-for-sale categories. Held-to-maturity securities are those which we have the positive intent and ability to hold to maturity and are reported at amortized cost. In accordance with Financial Accounting Standards Board (FASB) Accounting Standards Codification (ASC) 320, Investment Securities, investments in debt securities that are not classified as held-to-maturity and equity securities that have readily determinable fair values shall be classified in one of the following categories and measured at fair value in the statement of financial position:
a. Trading securities. Securities that are bought and held principally for the purpose of selling them in the near term (thus held for only a short period of time) shall be classified as trading securities. Trading generally reflects active and frequent buying and selling, and trading securities are generally used with the objective of generating profits on short-term differences in price.
b. Available-for-sale securities. Investments not classified as trading securities (nor as held-to-maturity securities) shall be classified as available-for-sale securities.
We do not have any securities that are classified as trading securities. Available-for-sale securities are reported at fair value, with unrealized gains and losses included as a separate component of shareholders’ equity, net of tax. If declines in fair value are other than temporary, the carrying value of the securities is written down to fair value as a realized loss with a charge to income for the portion attributable to credit losses and a charge to other comprehensive income for the portion that is not credit related.
Gains or losses on disposition of securities are computed by specific identification for all securities except for shares in mutual funds, which are computed by average cost. Interest and dividend income, adjusted by amortization of purchase premium or discount, is included in earnings.
When the fair value of a security is below its amortized cost, and depending on the length of time the condition exists and the extent the fair market value is below amortized cost, additional analysis is performed to determine whether an other than temporary impairment condition exists. Available-for-sale and held-to-maturity securities are analyzed quarterly for possible other than temporary impairment. The analysis considers (i) whether we have the intent to sell our securities prior to recovery and/or maturity and (ii) whether it is more likely than not that we will not have to sell our securities prior to recovery and/or maturity. Often, the information available to conduct these assessments is limited and rapidly changing, making estimates of fair value subject to judgment. If actual information or conditions are different than estimated, the extent of the impairment of the security may be different than previously estimated, which could have a material effect on the CTBI’s results of operations and financial condition.
Loans – Loans with the ability and the intent to be held until maturity and/or payoff are reported at the carrying value of unpaid principal reduced by unearned interest, an allowance for loan and lease losses, and unamortized deferred fees or costs. Income is recorded on the level yield basis. Interest accrual is discontinued when management believes, after considering economic and business conditions, collateral value, and collection efforts, that the borrower’s financial condition is such that collection of interest is doubtful. Any loan greater than 90 days past due must be well secured and in the process of collection to continue accruing interest. Cash payments received on nonaccrual loans generally are applied against principal, and interest income is only recorded once principal recovery is reasonably assured. Loans are not reclassified as accruing until principal and interest payments remain current for a period of time, generally six months, and future payments appear reasonably certain. Included in certain loan categories of impaired loans are troubled debt restructurings that were classified as impaired. A restructuring of a debt constitutes a troubled debt restructuring if the creditor for economic or legal reasons related to the debtor’s financial difficulties grants a concession to the debtor that it would not otherwise consider.
Loan origination and commitment fees and certain direct loan origination costs are deferred and the net amount amortized over the estimated life of the related loans, leases, or commitments as a yield adjustment.
Allowance for Loan and Lease Losses – We maintain an allowance for loan and lease losses (“ALLL”) at a level that is appropriate to cover estimated credit losses on individually evaluated loans determined to be impaired, as well as estimated credit losses inherent in the remainder of the loan and lease portfolio. Credit losses are charged and recoveries are credited to the ALLL.
We utilize an internal risk grading system for commercial credits. Those larger commercial credits that exhibit probable or observed credit weaknesses are subject to individual review. The borrower’s cash flow, adequacy of collateral coverage, and other options available to CTBI, including legal remedies, are evaluated. The review of individual loans includes those loans that are impaired as defined by ASC 310-10-35, Impairment of a Loan. We evaluate the collectability of both principal and interest when assessing the need for loss provision. Historical loss rates are analyzed and applied to other commercial loans not subject to specific allocations. The ALLL allocation for this pool of commercial loans is established based on the historical average, maximum, minimum, and median loss ratios.
A loan is considered impaired when, based on current information and events, it is probable that CTBI will be unable to collect the scheduled payments of principal or interest when due according to the contractual terms of the loan agreement. Factors considered by management in determining impairment include payment status, collateral value, and the probability of collecting scheduled principal and interest payments when due. Loans that experience insignificant payment delays and payment shortfalls generally are not classified as impaired. Management determines the significance of payment delays and payment shortfalls on a case-by-case basis, taking into consideration all of the circumstances surrounding the loan and the borrower, including the length of the delay, the reasons for the delay, the borrower’s prior payment record, and the amount of the shortfall in relation to the principal and interest owed. Impairment is measured on a loan-by-loan basis for commercial and construction loans by either the present value of expected future cash flows discounted at the loan’s effective interest rate, the loan’s obtainable market price, or the fair value of the collateral if the loan is collateral dependent.
Homogenous loans, such as consumer installment, residential mortgages, and home equity lines are not individually risk graded. The associated ALLL for these loans is measured under ASC 450, Contingencies.
When any secured commercial loan is considered uncollectable, whether past due or not, a current assessment of the value of the underlying collateral is made. If the balance of the loan exceeds the fair value of the collateral, the loan is placed on nonaccrual and the loan is charged down to the value of the collateral less estimated cost to sell or a specific reserve equal to the difference between book value of the loan and the fair value assigned to the collateral is created until such time as the loan is foreclosed. When the foreclosed collateral has been legally assigned to CTBI, the estimated fair value of the collateral less costs to sell is then transferred to other real estate owned or other repossessed assets, and a charge-off is taken for any remaining balance. When any unsecured commercial loan is considered uncollectable the loan is charged off no later than at 90 days past due.
All closed-end consumer loans (excluding conventional 1-4 family residential loans and installment and revolving loans secured by real estate) are charged off no later than 120 days (5 monthly payments) delinquent. If a loan is considered uncollectable, it is charged off earlier than 120 days delinquent. For conventional 1-4 family residential loans and installment and revolving loans secured by real estate, when a loan is 90 days past due, a current assessment of the value of the real estate is made. If the balance of the loan exceeds the fair value of the property, the loan is placed on nonaccrual. Foreclosure proceedings are normally initiated after 120 days. When the foreclosed property has been legally assigned to CTBI, the fair value less estimated costs to sell is transferred to other real estate owned and the remaining balance is taken as a charge-off.
Historical loss rates for loans are adjusted for significant factors that, in management’s judgment, reflect the impact of any current conditions on loss recognition. We use twelve rolling quarters for our historical loss rate analysis. Factors that we consider include delinquency trends, current economic conditions and trends, strength of supervision and administration of the loan portfolio, levels of underperforming loans, level of recoveries to prior year’s charge-offs, trends in loan losses, industry concentrations and their relative strengths, amount of unsecured loans, and underwriting exceptions. Management continually reevaluates the other subjective factors included in its ALLL analysis.
Other Real Estate Owned – When foreclosed properties are acquired, appraisals are obtained and the properties are booked at the current market value less expected sales costs. Additionally, periodic updated appraisals are obtained on unsold foreclosed properties. When an updated appraisal reflects a market value below the current book value, a charge is booked to current earnings to reduce the property to its new market value less expected sales costs. Our policy for determining the frequency of periodic reviews is based upon consideration of the specific properties and the known or perceived market fluctuations in a particular market and is typically between 12 and 18 months but generally not more than 24 months. All revenues and expenses related to the carrying of other real estate owned are recognized through the income statement.
Income Taxes – Income tax expense is based on the taxes due on the consolidated tax return plus deferred taxes based on the expected future tax benefits and consequences of temporary differences between carrying amounts and tax bases of assets and liabilities, using enacted tax rates. Any interest and penalties incurred in connection with income taxes are recorded as a component of income tax expense in the consolidated financial statements. During the six months ended June 30, 2017 and 2016, CTBI has not recognized a significant amount of interest expense or penalties in connection with income taxes.
Item 3. Quantitative and Qualitative Disclosures About Market Risk
Interest rate risk management focuses on maintaining consistent growth in net interest income within Board-approved policy limits. CTBI uses an earnings simulation model to analyze net interest income sensitivity to movements in interest rates. Given a 200 basis point increase to the yield curve used in the simulation model, it is estimated net interest income for CTBI would increase by 2.76 percent over one year and increase by 4.48 percent over two years. A 25 basis point decrease in the yield curve would decrease net interest income by an estimated 0.16 percent over one year and decrease by 0.22 percent over two years. For further discussion of CTBI’s market risk, see the Management’s Discussion and Analysis of Financial Condition and Results of Operations—Liquidity and Market Risk included in the annual report on Form 10-K for the year ended December 31, 2016.
Item 4. Controls and Procedures
EVALUATION OF DISCLOSURE CONTROLS AND PROCEDURES
CTBI’s management is responsible for establishing and maintaining effective disclosure controls and procedures, as defined under Rules 13a-15(e) and 15d-15(e) under the Securities Exchange Act of 1934. As of the end of the period covered by this report, an evaluation was carried out by CTBI’s management, with the participation of our Chief Executive Officer and the Executive Vice President, Chief Financial Officer, and Treasurer, of the effectiveness of the design and operation of our disclosure controls and procedures. Based on this evaluation, management concluded that disclosure controls and procedures as of June 30, 2017 were effective in ensuring material information required to be disclosed in this quarterly report on Form 10-Q was recorded, processed, summarized, and reported on a timely basis.
CHANGES IN INTERNAL CONTROL OVER FINANCIAL REPORTING
There were no changes in CTBI’s internal control over financial reporting that occurred during the quarter ended June 30, 2017 that have materially affected, or are reasonably likely to materially affect, CTBI’s internal control over financial reporting.
PART II - OTHER INFORMATION

Item 1. | Legal Proceedings | None
Item 1A. | Risk Factors | None
Item 2. | Unregistered Sales of Equity Securities and Use of Proceeds | None
Item 3. | Defaults Upon Senior Securities | None
Item 4. | Mine Safety Disclosure | Not applicable
Item 5. | Other Information: |
| CTBI’s Principal Executive Officer and Principal Financial Officer have furnished to the SEC the certifications with respect to this Form 10-Q that are required by Sections 302 and 906 of the Sarbanes-Oxley Act of 2002 |
Item 6. | Exhibits: |
| (1) Certifications Pursuant to 18 U.S.C. Section 1350, as adopted pursuant to Section 302 of the Sarbanes-Oxley Act of 2002 | Exhibit 31.1 Exhibit 31.2
| (2) Certifications Pursuant to 18 U.S.C. Section 1350, as adopted pursuant to Section 906 of the Sarbanes-Oxley Act of 2002 | Exhibit 32.1 Exhibit 32.2
| (3) XBRL Instance Document | Exhibit 101.INS
| (4) XBRL Taxonomy Extension Schema | Exhibit 101.SCH
| (5) XBRL Taxonomy Extension Calculation Linkbase | Exhibit 101.CAL
| (6) XBRL Taxonomy Extension Definition Linkbase | Exhibit 101.DEF
| (7) XBRL Taxonomy Extension Label Linkbase | Exhibit 101.LAB
| (8) XBRL Taxonomy Extension Presentation Linkbase | Exhibit 101.PRE

SIGNATURES
Pursuant to the requirements of the Securities Exchange Act of 1934, CTBI has duly caused this report to be signed on its behalf by the undersigned thereunto duly authorized.

| COMMUNITY TRUST BANCORP, INC. |
Date: August 3, 2017 | By: | /s/ Jean R. Hale |
|  | Jean R. Hale |
|  | Chairman, President, and Chief Executive Officer |

|  | /s/ Kevin J. Stumbo |
|  | Kevin J. Stumbo |
|  | Executive Vice President, Chief Financial Officer, and |
|  | Treasurer |