![]() |
MultiDimensionMargrabe |
Multi-Dimension Margrabe FormulaAbstractMargrabe formula (1978), used in many financial engineering literature. Originally, it is to solve
where x and y is a binormal distribution, k is a constant. This article presents a multi-dimension version, which is used in some term structure model. SolThe C# source code for this calculation is in the SourceCodeRepository. We want to calculate the integration over n-dimension space:
where A is of 1 by n matrix, B is of 1 by n matrix, X is of n by 1 matrix and entries of X is a multi-normal distribution with mean M, of n by 1 matrix, and covariance matrix S, of n by n matrix. By elementary math, the moment generating function of X is Exp[T.M + 1/2 T.S.Transpose[T]] where T is of 1 by n matrix. The key of this calculation is to change the variable X to another set of variable Y which are independent. Suppose Y=C.X where C is of n by n matrix. By elementary math, the moment generating function of Y is Exp[T.N + 1/2 T.D.Transpose[T]] where N=C.M D=C.S.Transpose[C] Since all entries of Y are independent, it means D is of diagonal. The C can be set up in this way that the first row of C is B. Once this C is found, denote A.Inverse[C] by R i-th row of Y by yi i-th column of R by ri i-th row of N by Ni (i-th, i-th) entry of D by Di standard normal accumulated distribution function by Normal we have:
We are done. How to find CFirst, start from S, we first change variable Z=V.X in this way z1=B.X, z2=x2, z3=x3,... , zn=xn. Denote covariance of Z by G, we have G=V.S.Transpose[V] Second, use the LowerUpperTriangleDecomposition algorithm on G, we have a lower triangle matrix L whose diagonal is 1 and a diagonal matrix D such that: D=L.G.Transpose[L] Therefore, D=L.G.Transpose[L] =L.V.S.Transpose[V].Transpose[L] =LV.S.Transpose[LV] LV is the C we want. ExampleWe want to calculate
where mean and covariance of x1, x2, x3, x4 is
and
By the above notation, we have: M=
S=
A=
B=
Therefore, V=
G=
L=
C=LV=
D=
R=
N=
Therefore, N1=2, D1=4, R1=0.1, A.M=6, A.S.Transpose[A]=4 And the answer is Normal[(k-(N1+D1.r1))/Sqrt[D1]].Exp[A.M + 1/2 A.S.Transpose[A]] =Normal[k/2-1.2].Exp[8]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||