Function rainbow_worseof2(S1, S2, t, q1, q2, v1, v2, rho) ' Calculates the price of a worst to deliver option rainbow_worseof2 = Exp(-r * t) * (S1 + S2) - rainbow_bestof2(S1, S2, t, q1, q2, v1, v2, rho) End Function