Modeling the term structure of CDO tranches