0
$\begingroup$

Hi I am trying to generate correlated quasi random numbers using a sobol sequence in matlab. My Problem is the Following: Using "standard" random numbers it is easy to generate the 6 correlated random variables (NumberOfSteps X NumberOfSimulations) I need, using a cholesky decomposition:

L = chol(CorrelationMatrix,"lower");
for i=1:NumberOfSimulations
Z = L*randn(4,NumberOfSteps);
for t=2:NumberOfSteps
.....Z1(i,t);
.....Z2(i,t);

Since i only want to generate the sequence once (very time consuming) the only way i found to generate two correlated r.v. is the following:

Ps = sobolset(NumberOfSteps);
Ps = scramble(Ps,'MatousekAffineOwen');
U = net(Ps,NumberOfSimulations);
Z1 = norminv(U);

Z2 = Rho.*Z1 + sqrt(1-Rho^2).*randn(NumberOfSimulations,NumberOfSteps);

Unfortunately I have No idea how I can extend this to 6 correlated random varibles. Can anyone help me?

Best regards, Alex

$\endgroup$

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.