Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Loop doesn't work' topicStudent Support Forum > General > "Loop doesn't work"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Student0002012
12/22/12 10:15pm

Hi again,

Im pretty sure i found the solution for my problem.

For my problem i used the mathematica function Nest[] that is really usefull for nested functions.
I would be really happy if someone that has the "knowledge" would confirm that my solutions is a possible way to solve this problem.

pension = 1000000; Risky = 0.6; Riskless = 0.4; riskfree = 0.04; mu = \
0.12; sigma = 0.3; draw = 150000;
value[pension_] :=
pension*(Risky*
Exp[mu + sigma*RandomReal[NormalDistribution[0, 1]]] +
Riskless*Exp[riskfree]) - draw;
Count[{Table[Nest[value, pension, 10], {100}]}, _?NonNegative, 2]/
100 // N

Attachment: basic-solved.nb, URL: Right?,

Subject (listing for 'Loop doesn't work')
Author Date Posted
Loop doesn't work Student0002012 12/22/12 07:46am
Re: Loop doesn't work Student0002012 12/22/12 10:15pm
Re: Loop doesn't work Bill Simpson 12/22/12 10:55pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic