private IEnumerable<DenseVector> LogReturns(Normal normal) { var variances = Variances(); foreach(var variance in variances) { var stdev = Math.Sqrt(variance); var drift = -0.5 * variance; var returns = new DenseVector(N); for (int i = 0; i < N; i++) returns[i] = Math.Exp( normal.Sample() * stdev + drift ); returns /= returns.Average(); yield return returns; } }