Originally Posted by
helmuth_hubener
That's all it is, just rhetoric.
Once every hour I make a decision that will either lose or gain 1%
I do this every hour for 20 weeks.
Code:
#how many good guesses out of 100?
PERCENT_CORRECT = 50
import random
def tick():
# do this 10 times
for a in range(10):
# create a group of numbered objects named walk
walk = str(a) + 'walk'
storage[walk] = storage.get(walk, 100)
# random float 0.0 to 100.0
z = 100*random.random()
if z < PERCENT_CORRECT:
# if correct gain 1%
storage[walk] = 1.01*storage[walk]
else:
# if wrong lose 1%
storage[walk] = 0.99*storage[walk]
# plot each random walk
plot((str(a)+'random_walk'), storage[walk])
Lets say I have $100 invested.
The MOST I could possibly lose is $100.
#how many good guesses out of 100?
PERCENT_CORRECT = 45
Final Balance Range ($5 to $15)
#how many good guesses out of 100?
PERCENT_CORRECT = 50
Final Balance Range ($50 to $150)
#how many good guesses out of 100?
PERCENT_CORRECT = 51
Final Balance Range ($100 to $700)
#how many good guesses out of 100?
PERCENT_CORRECT = 55
Final Balance Range ($1000 to $5000)
#how many good guesses out of 100?
PERCENT_CORRECT = 60
Final Balance Range ($25000 to $250,000)
Connect With Us