What's the question?

Never done it in Zorro, but Zorro lets you find covariances and construct a covariance matrix

Quote:
/ generate covariance matrix
for(i=0; i<N; i++)
for(j=0; j<N; j++)
Covariances[i][j] = Covariance(Returns[i],Returns[j],DAYS);


The you just need the weights vector and to perform matrix multiplication



Then multiply the portfolio value by the calculated portfolio sigma and the appropriate z-score for the confidence level you want (e.g. 1.645 for 95%).