# Multivariate Path Construction using Sobol numbers

I am sharing my code,which I have tried to perform as per the instruction mentioned below. Please correct it so that I could get my output.

Instruction: Use the first m dimensions of the Sobol vector of length (m*n) to build the realisations of m uncorrelated diffusions W_{i}(T) for i=1..m, the next m for the realisations W_{i}(T/2) and so on.

Having all the values W_{i,k} for i=1..m and k=1..n, with j representing the time point (k*ΔT) with ΔT:=T/n, subtract along time to obtain increments ΔW_{i}( from k-1 to k ).

Compute a spectral decomposition of the single-step covariance matrix C over a single time step ΔT. The elements of this single step matrix are

 c_{ij} :=  σ_i * ρ_ij * σ_j * ΔT.


The matrices S and Λ such that C = S*Λ*S^T, the spectral-split matrix A you need is given by A := S*sqrt(Λ), where sqrt(Λ) is the diagonal matrix Λ of (non-negative) eigenvalues.

Code : This is for 20paths of 200 timesteps each . Note: Wiener process covariance is min{i,j}

m=20;
soboldata= BlockRandom[ SeedRandom[ Method -> {"MKL", Method -> {"Sobol", "Dimension" -> 20}}];
RandomReal[1, {200, 20}]]

mat= Table[min[i,j],{i,1,20},{j,1,200}];
mat//matrix form

mat= C

cov=CrM[C];
vars=Table[Symbol["x" <> ToString[i]], {i, m}];
lab=Table["Ito Plot No " <> ToString[i], {i, m}];

ip=ItoProcess[{soboldata},t,cov];

path=RandomFunction[ip,{0,1,0.05},10,Method->"Milstein"]; Evaluate@Table[ListLinePlot[path["PathComponent", i], PlotRange -> All,PlotLabel->lab[[i]],ImageSize->150],{i,m}]

• What is CrM in your code? – thils Nov 9 '15 at 19:23
• CrM is like this CrM[m,-0.01,0.015] . You can get an idea here m=20; drift=RandomReal[{0.003,0.01},m]; iv=RandomReal[{0.02,0.05},m]; cov=CrM[m,-0.01,0.015]; – quant1 Nov 9 '15 at 20:57
• U have not defined CrM[..]........just getting CrM[....] in the output.. – thils Nov 9 '15 at 22:10
• Maybe you plan to use the inbuilt function, Covariance? – thils Nov 9 '15 at 22:16
• @Michael .Thanks for the suggestion. – quant1 Nov 13 '15 at 8:12