Docs / nablatensor-quant / com.nablatensor.quant.analytic
record
Margrabe
Margrabe's (1978) closed form for a European option to exchange asset 2 for asset 1 — payoff max(S1_T - S2_T, 0). The option is on the ratio, so only the effective volatility sqrt(vol1^2 + vol2^2 - 2 rho vol1 vol2) and the two carry rates enter; there is no strike and no separate discount term for the spread itself.
sigma = sqrt(vol1^2 + vol2^2 - 2 rho vol1 vol2)
d1 = (ln(S1/S2) + (q2 - q1 + sigma^2/2) T) / (sigma sqrt(T))
d2 = d1 - sigma sqrt(T)
price = S1 e^{-q1 T} N(d1) - S2 e^{-q2 T} N(d2)Record components
Methods
static Margrabe of(double s1, double s2, double vol1, double vol2, double rho, double yield1, double yield2, double maturity)