In defining taxable income of separate segregated funds of section 501(c) exempt organizations, net investment income means the excess of-- The gross amount of income from interest, dividends, rents, and royalties, plus any excess of capital gains over capital losses, over Deductions allowed for federal income tax purposes which are directly connected with producing this income. Income and expenses that the organization takes into account for purposes of the unrelated business income tax are not taken into account in calculating net investment income.