I've just pulled the relevant section from my thesis. You could get an alternative explanation by checking out the palisade @risk manual.

(below, ' does not mean transpose)

Check out my prob in the other forum if you can help.

Cheers,

TF

The price risk (ie milk price, supplementary feed price and asset prices) is found using the distribution of prices determined from actual data. These prices are assumed to be normally distributed (Neal, 2004d). Sets of prices are generated from uniform random numbers and transformed into normal distribution by means of an inversion process (ppnd algorithm as presented by Beasley and Springer, 1977) to give a matrix Z. Z in this case is a matrix of n price sets (default of 100) by p prices (default of 3)

The random (uncorrelated) prices are then correlated using the process described by Iman and Conover (1982). This process involves a user defined correlation matrix, C which is a symmetric matrix of size p, where p is the number of variables (prices) to correlate. To be valid, the correlation matrix must be positive definite. This can be checked by ensuring the smallest eigenvalue of C is positive. If this is not the case, C can be adjusted to become positive semidefinite and as close as possible to the user defined correlation matrix. The smallest eigenvalue of C is found and labelled E0. Then an adjusted C matrix, C’ is found:

C'=C-E0I Equation 5.5

The new (valid) C matrix, C’’ is then:

C''=[1/(1-E0)].C' Equation 5.6

Hart et al (2003) suggest using a rank correlation rather than Pearson correlation as this allows a distribution free approach of imposing correlation. Distribution free implies that the distribution of each variable need not belong to a particular family (eg normal). Z is the uncorrelated matrix of prices found above. R is a matrix of (van der Waerden) scores, ranked in the same way as the elements of Z . C’’ is the target (symmetric) matrix of (rank) correlations, but D is the current rank correlation matrix of Matrix R. V must be calculated as the Cholesky decomposition of C’’ and U as the Cholesky decomposition of D . The following matrix multiplication is the performed:

S=VU-1 Equation 5.7

R*=RS Equation 5.8

Sorting X to give the same ranking as R* gives X*, a matrix correlated according to the desired matrix C’’. This matrix of prices can then be used in Monte Carlo simulations using the WFM.