Thank you, Sander.
Exp outside and Random Number generation with specified mean and standard deviation is a nice tip.
I don't know very well how to write Mathematica code to be compiled in C. Nevertheless, I tried that below, but it does not improve much. What am I doing wrong here?
tryC = Compile[{{n, _Integer}},
Block[{spot = ConstantArray[95.0, n], K = 100, \[Sigma] = 0.15,
T = 1, r = 0.01, H = 85, m = 50, h, \[Alpha], RND, index, cc},
h = T/m;
\[Alpha] = r - \[Sigma]^2/2;
index = ConstantArray[0.0, n];
RND =
RandomVariate[
NormalDistribution[\[Alpha] h, \[Sigma] Sqrt[h]], {m, n}];
Table[spot = spot RND[[i]];
cc = Clip[spot, {H + 33 $MachineEpsilon, H}, {i, 0}];
index += Clip[index + cc, {i, i}, {0, 0}];
, {i, m}];
index],
CompilationOptions -> {"InlineExternalDefinitions" -> True},
"CompilationTarget" -> "C", "RuntimeOptions" -> "Speed"];
index = IntegerPart@
Clip[tryC[1000000], {1, 50}, {50, 50}]; // AbsoluteTiming
Another question is why does it take so long to generate the random numbers? Is is because these numbers are "more random"? or because they are more precise (more decimal digits)?