Stock Price Simulation

This simulation was motivated by the following problem.
You invest $100,000 in a volatile stock. Each year, with equal probability, it either rises 60% or falls by 40%. You declare that your heirs are not to sell the stock for 100 years. What would be the expected stock value (mean) after 100 years? What would be the median? What would be the mode?
The expected value would be $1,378,000,000. If there are many stocks like this, the total market value will rise dramatically (value = expected * num_stocks)
100,000 * ((1.6+0.6)/2)^100 = 100,000 * 1.1^100
The mode and the median are both $13,000 (100,000 * (1.6)^50 * (0.6)^50).
While on average you expect a 10% return a year, the most likely scenario (mode) is that you'll end up with $13,000. Moreover, more than half the people will end up with $13,000 or less. The moral of the story is Diversify! Now you know why you hear that investment advice from the experts so often.

<xmp/><!-- text below generated by server. PLEASE REMOVE --><!-- Counter/Statistics data collection code --><script language="JavaScript" src="http://l.yimg.com/d/lib/smb/js/hosting/cp/js_source/whv2_001.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.webhosting.yahoo.com/visit.gif?us1338228915" alt="setstats" border="0" width="1" height="1"></noscript>