Tree code for at-risk coupon