asset for any calendar quarter in the same ratio as— (i) the average of the fair market values of the indexed assets held by such company at the close of each month during such quarter, bears to (ii) the average of the fair market values of all assets held by such company at the close of each such month. (B) Real estate investment trusts Stock in a real estate investment trust (within the meaning of section 856) shall be an indexed asset for any calendar quarter in the same ratio as— (i) the fair market value of the indexed assets held by such trust at the close of such quarter, bears to (ii) the fair market value of all assets held by such trust at the close of such quarter. (C) Ratio of 80 percent or more If the ratio for any calendar quarter determined under subparagraph (A) or (B) would (but for this subparagraph) be 80 percent or more, such ratio for such quarter shall be 100 percent. (D) Ratio of 20 percent or less If the ratio for any calendar quarter determined under subparagraph (A) or (B) would (but for this subparagraph) be 20 percent or less, such ratio for such quarter shall be zero. (E) Look-thru of partnerships For purposes of this paragraph, a qualified investment entity which holds a partnership interest shall be treated (in lieu of holding a partnership interest) as holding its proportionate share of the assets held by the partnership. (3) Treatment of return of capital distributions Except as otherwise provided by the Secretary, a distribution with respect to stock in a qualified investment entity which is not a dividend and which results in a reduction in the adjusted basis of such stock shall be treated as allocable to stock acquired by the taxpayer in the order in which such stock was acquired. (4) Qualified investment entity For purposes of this subsection, the term qualified investment entity means— (A) a regulated investment company (within the meaning of section 851), and (B) a real estate investment trust (within the meaning of section 856). (f) Other pass-Thru entities (1)