└── modeling_TGE /modeling_TGE: -------------------------------------------------------------------------------- 1 | import random 2 | results = [9.89, 9.83, 8.30, 7.75, 7.63, 6.46, 6.28, 5.52, 5.31, 4.79, 4.07, 3.43, 2.93, 2.60, 2.44, 2.42, 2.26, 2.11, 1.87, 1.83, 1.73, 1.63, 1.45, 1.25, 1.14, 1.33, 1.19, 1.45, 1.13, 1.16, 1.11, 1.10, 0.88, 0.87, 0.85, 0.84, 0.64, 0.76, 0.49, 0.41, 0.35, 0.19, 0.12, 0.10, 0.05, 0.03, 0.03, 0.02, 0.02, 0.01, 0.02, 0.01, 0.01, 0.0048, 0.0032, 0.0028, 0.0023, 0, 0, 0, 0] 3 | q = 1000 #number of experiments 4 | t = 3 #number of series 5 | for assets in range(1, 21): #number of assets, min and max 6 | sum_co = 0 7 | pos = 0 8 | counter = 0 9 | positive_counter = 0 10 | for i in range (q): 11 | sum = 1 12 | for x in range(t): 13 | sprint = 0 14 | for y in range(assets): 15 | a = random.choice(results) 16 | #random generator and sum 17 | sprint += a 18 | #counters 19 | if sprint/assets > 1: 20 | positive_counter +=1 21 | counter += 1 22 | sum *= sprint/assets 23 | #sum of positive series 24 | if sum > 1: 25 | pos +=1 26 | sum_co += sum 27 | print(assets, 100*pos/q, round((sum_co/q)*(pos/q)), 100*positive_counter/counter) 28 | #number of assets, + probability of all series, profit or x, + probability of one serie 29 | --------------------------------------------------------------------------------