in the agreement. A commitment fee payable at the end of each calendar quarter, based on the average daily unused portion of the line of credit, is charged to each participating fund based on a combination of fixed and asset based allocations and is reflected in Other expenses on the Statement of operations. Prior to June 29, 2017, the fund had a similar agreement that enabled it to participate in a $1 billion unsecured committed line of credit. For the year ended July 31, 2017, the fund had no borrowings under either line of credit. Commitment fees for the year ended July 31, 2017 were $5,932.
Expenses. Within the John Hancock group of funds complex, expenses that are directly attributable to an individual fund are allocated to such fund. Expenses that are not readily attributable to a specific fund are allocated among all funds in an equitable manner, taking into consideration, among other things, the nature and type of expense and the fund's relative net assets. Expense estimates are accrued in the period to which they relate and adjustments are made when actual amounts are known.
Class allocations. Income, common expenses and realized and unrealized gains (losses) are determined at the fund level and allocated daily to each class of shares based on the net assets of the class. Class-specific expenses, such as distribution and service fees, if any, and transfer agent fees, for all classes, are calculated daily at the class level based on the net assets of each class and the specific expense rates applicable to each class.
Federal income taxes. The fund intends to continue to qualify as a regulated investment company by complying with the applicable provisions of the Internal Revenue Code and will not be subject to federal income tax on taxable income that is distributed to shareholders. Therefore, no federal income tax provision is required.
For federal income tax purposes, as of July 31, 2017, the fund has a long-term capital loss carryforward of $18,202,213 available to offset future net realized capital gains. This carryforward does not expire.
Qualified late year ordinary losses of $2,407,380 are treated as occurring on August 1, 2017, the first day of the fund's next taxable year.
As of July 31, 2017, the fund had no uncertain tax positions that would require financial statement recognition, derecognition or disclosure. The fund's federal tax returns are subject to examination by the Internal Revenue Service for a period of three years.
Distribution of income and gains. Distributions to shareholders from net investment income and net realized gains, if any, are recorded on the ex-date. The fund generally declares and pays dividends and capital gain distributions, if any, annually.
Distributions paid by the fund with respect to each class of shares are calculated in the same manner, at the same time and in the same amount, except for the effect of class level expenses that may be applied differently to each class. As of July 31, 2017, the fund has no distributable earnings on a tax basis.
Such distributions and distributable earnings, on a tax basis, are determined in conformity with income tax regulations, which may differ from US GAAP. Distributions in excess of tax basis earnings and profits, if any, are reported in the fund's financial statements as a return of capital.
Capital accounts within the financial statements are adjusted for permanent book-tax differences. These adjustments have no impact on net assets or the results of operations. Temporary book-tax differences, if any, will reverse in a subsequent period. Book-tax differences are primarily attributable to net operating losses and derivative transactions.
Note 3 — Derivative Instruments
The fund may invest in derivatives in order to meet its investment objective. Derivatives include a variety of different instruments that may be traded in the over-the-counter (OTC) market, on a regulated exchange or through a clearing facility. The risks in using derivatives vary depending upon the structure of the instruments, including the use of leverage, optionality, the liquidity or lack of liquidity of the contract, the creditworthiness of the counterparty or clearing organization and the volatility of the position. Some derivatives involve risks that are potentially greater than the risks associated with investing directly in the referenced securities or other referenced underlying instrument. Specifically, the fund is exposed to the risk that