the meaning of section 864(c), determined by substituting qualified trade or business (within the meaning of section 199A) for nonresident alien individual or a foreign corporation or for a foreign corporation each place it appears), and (ii) included or allowed in determining taxable income for the taxable year. (B) Exceptions The following investment items shall not be taken into account as a qualified item of income, gain, deduction, or loss: (i) Any item of short-term capital gain, short-term capital loss, long-term capital gain, or long-term capital loss. (ii) Any dividend, income equivalent to a dividend, or payment in lieu of dividends described in section 954(c)(1)(G). (iii) Any interest income other than interest income which is properly allocable to a trade or business. (iv) Any item of gain or loss described in subparagraph (C) or (D) of section 954(c)(1) (applied by substituting qualified trade or business for controlled foreign corporation ). (v) Any item of income, gain, deduction, or loss taken into account under section 954(c)(1)(F) (determined without regard to clause (ii) thereof and other than items attributable to notional principal contracts entered into in transactions qualifying under section 1221(a)(7)). (vi) Any amount received from an annuity which is not received in connection with the trade or business. (vii) Any item of deduction or loss properly allocable to an amount described in any of the preceding clauses. (4) Treatment of reasonable compensation and guaranteed payments Qualified business income shall not include— (A) reasonable compensation paid to the taxpayer by any qualified trade or business of the taxpayer for services rendered with respect to the trade or business, (B) any guaranteed payment described in section 707(c) paid to a partner for services rendered with respect to the trade or business, and (C) to the extent provided in regulations, any payment described in section 707(a) to a partner for services rendered with respect to the trade or business. (d) Qualified