Hi, sorry about the rules, here is my code (i hope the format is okay now). Please find also attached the two excel files I used in the code (Omega and InvOmegaTOmega)
Rf = 0.0092
0.0092
dt = 0.25
0.25
n = 3
3
w1 = 1/3
1/3
w2 = 1/3
1/3
w3 = 1/3
1/3
S1 = 5101.11
5101.11
S2 = 2343.06
2343.06
S3 = 18552.61
18552.6
Sigma1 = 5.05615635/100
0.0505616
Sigma2 = 18.18926835/100
0.181893
Sigma3 = 15.25262228/100
0.152526
s1 = Import[
"/Users/nicolasbaduel/Documents/Wolfram Mathematica/Omega.xlsx"]
{{{0.0506, 0.130786, 0.06893}, {0., 0.126422, 0.0671455}, {0., 0.,
0.118306}}}
s1 = Import[
"/Users/nicolasbaduel/Documents/Wolfram Mathematica/Omega.xlsx", \
{"Data", 1, {1, 2, 3}}]
{{0.0506, 0.130786, 0.06893}, {0., 0.126422, 0.0671455}, {0., 0.,
0.118306}}
s2 = Import[
"/Users/nicolasbaduel/Documents/Wolfram \
Mathematica/InvOmegaTOmega.xlsx", {"Data", 1, {1, 2, 3}}]
{{808.576, -162.12, 0.752924}, {-162.12,
82.7225, -37.947}, {0.752924, -37.947, 71.447}}
Omega = s1
{{0.0506, 0.130786, 0.06893}, {0., 0.126422, 0.0671455}, {0., 0.,
0.118306}}
InvOmegaTOmega = s2
{{808.576, -162.12, 0.752924}, {-162.12,
82.7225, -37.947}, {0.752924, -37.947, 71.447}}
Omega
{{0.0506, 0.130786, 0.06893}, {0., 0.126422, 0.0671455}, {0., 0.,
0.118306}}
Zeta1 = Log[x1/(w1*S1)] - (Rf - ((Sigma1)^2)/2)*dt
-0.00198044 + Log[0.000588107 x1]
Zeta2 = Log[x2/(w2*S2)] - (Rf - ((Sigma2)^2)/2)*dt
0.00183562 + Log[0.00128038 x2]
Zeta3 = Log[x3/(w3*S3)] - (Rf - ((Sigma3)^2)/2)*dt
0.000608031 + Log[0.000161702 x3]
VectZeta = {{Zeta1}, {Zeta2}, {Zeta3}};
K = 8665.59
8665.59
Transpose[VectZeta].InvOmegaTOmega.VectZeta
{{(0.00183562 +
Log[0.00128038 x2]) (-162.12 (-0.00198044 +
Log[0.000588107 x1]) +
82.7225 (0.00183562 + Log[0.00128038 x2]) -
37.947 (0.000608031 + Log[0.000161702 x3])) + (-0.00198044 +
Log[0.000588107 x1]) (808.576 (-0.00198044 +
Log[0.000588107 x1]) -
162.12 (0.00183562 + Log[0.00128038 x2]) +
0.752924 (0.000608031 + Log[0.000161702 x3])) + (0.000608031 +
Log[
0.000161702 x3]) (0.752924 (-0.00198044 +
Log[0.000588107 x1]) -
37.947 (0.00183562 + Log[0.00128038 x2]) +
71.447 (0.000608031 + Log[0.000161702 x3]))}}
g := Function[{x1, x2, x3},
Max[x1 + x2 + x3 - K,
0]*((Exp[(-0.5/dt)*(0.00183562 +
Log[0.00128038 x2]) (-162.12 (-0.00198044 +
Log[0.000588107 x1]) +
82.7225 (0.00183562 + Log[0.00128038 x2]) -
37.947 (0.000608031 +
Log[0.000161702 x3])) + (-0.00198044 +
Log[0.000588107 x1]) (808.576 (-0.00198044 +
Log[0.000588107 x1]) -
162.12 (0.00183562 + Log[0.00128038 x2]) +
0.752924 (0.000608031 +
Log[0.000161702 x3])) + (0.000608031 +
Log[0.000161702 x3]) (0.752924 (-0.00198044 +
Log[0.000588107 x1]) -
37.947 (0.00183562 + Log[0.00128038 x2]) +
71.447 (0.000608031 + Log[0.000161702 x3]))])/(Omega[[1,
1]] Omega[[2, 2]] Omega[[3, 3]]*x1*x2*x3*((2*Pi*dt)^(n/2))))]
NIntegrate[
g[x1, x2, x3], {x1, 0, Infinity}, {x2, 0, Infinity}, {x3, 0,
Infinity}]
3.570889416597262*10^300946
Attachments: