randomize(int Method, var *Out, var *In, int Length): var
Randomizes a data array by different methods.
Last value of the resulting data array; usually the accumulated return.
||Randomize the data differences by bootstrap with replacement.
||Randomize the data differences by montecarlo permutation.
||Detrend the data before randomizing, by subtracting their mean difference.
||Array to be filled with the randomized data; must be different to In.
||Array containing the original data.
||Number of elements of the In and Out arrays.
- This function can be used for generating randomized return distributions f.i. for White's Reality Check.
The random number generator uses the Lehmer algorithm with a period of
- Randomized data curves can contain negative data. If this is not
desired, test the minimum and randomize again until it is above zero.
var OriginalReturn = EquityCurve[Length-1];
var RandomizedReturn = randomize(BOOTSTRAP,0,EquityCurve,Length);
► latest version online