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}

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

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


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}]
  • $\begingroup$ What is CrM in your code? $\endgroup$ – thils Nov 9 '15 at 19:23
  • $\begingroup$ 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]; $\endgroup$ – quant1 Nov 9 '15 at 20:57
  • $\begingroup$ U have not defined CrM[..]........just getting CrM[....] in the output.. $\endgroup$ – thils Nov 9 '15 at 22:10
  • $\begingroup$ Maybe you plan to use the inbuilt function, Covariance? $\endgroup$ – thils Nov 9 '15 at 22:16
  • $\begingroup$ @Michael .Thanks for the suggestion. $\endgroup$ – quant1 Nov 13 '15 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.