| Original Message (ID '179032') By jf: |
| What you want is that the right side of "Data10 = ..." gets evaluated each time Data10 is used.
The way to tell Mathematica this is by using ":=" instead of "=".
Pension = 1000000; Risky = 0.6; Riskless = 0.4; riskfree = 0.04; mu =
0.12; sigma = 0.3; draw = 150000;
Data10 :=
Data9*(Risky*Exp[mu + sigma*RandomReal[NormalDistribution[0, 1]]] +
Riskless*Exp[riskfree]) - draw
Do[Print[Data10], {100}]
-150000+1.1205 Data9
-150000+1.13287 Data9
-150000+1.02558 Data9
...
See reference.wolfram.com/mathematica/ref/SetDelayed.html.
|
|