inclusion ratio, and except as otherwise provided by the Secretary, the aggregate amount of post-1986 undistributed earnings for the taxable year shall be determined by translating each section 902 corporation’s post-1986 undistributed earnings into dollars using the average exchange rate for such year. (G) Section 902 corporation The term section 902 corporation has the meaning given to such term by section 909(d)(5). (4) Treatment of affiliated groups The current inclusion ratio of each member of an affiliated group (as defined in section 864(e)(5)(A)) shall be determined as if all members of such group were a single corporation. (5) Application to separate categories of income This subsection shall be applied separately with respect to the categories of income specified in section 904(d)(1). (6) Regulations The Secretary may prescribe such regulations or other guidance as is necessary or appropriate to carry out the purposes of this subsection, including regulations or other guidance providing— (A) for the proper application of this subsection with respect to changes in ownership of a section 902 corporation, (B) that certain corporations that otherwise would not be members of the affiliated group will be treated as members of the affiliated group for purposes of this subsection, (C) for the proper application of this subsection with respect to the taxpayer’s share of a deficit in earnings and profits of a section 902 corporation, (D) for appropriate adjustments to the determination of the value of stock in any section 902 corporation for purposes of this subsection or to the foreign-related interest expense to account for income that is subject to tax under section 882(a)(1), and (E) for the proper application of this subsection with respect to interest expense that is directly allocable to income with respect to certain assets. . (b) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2017.