it works!
This commit is contained in:
parent
261f11e301
commit
c50e8e8c71
|
|
@ -11,7 +11,7 @@ def main():
|
||||||
configs = generate_config(mechanisms, exogenous_states)
|
configs = generate_config(mechanisms, exogenous_states)
|
||||||
# p = pipeline(states_list, configs, env_processes, range(10))
|
# p = pipeline(states_list, configs, env_processes, range(10))
|
||||||
N = sim_config['N']
|
N = sim_config['N']
|
||||||
r = range(5)
|
r = range(sim_config["R"])
|
||||||
# Dimensions: N x r x mechs
|
# Dimensions: N x r x mechs
|
||||||
s = simulation(states_list, configs, env_processes, r, N)
|
s = simulation(states_list, configs, env_processes, r, N)
|
||||||
result = pd.DataFrame(flatten(s))
|
result = pd.DataFrame(flatten(s))
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -36,7 +36,7 @@ def b2m1(step, sL, s):
|
||||||
if s['Price']< s['Belief']:
|
if s['Price']< s['Belief']:
|
||||||
#print('invest bond')
|
#print('invest bond')
|
||||||
#print((s['Belief']-s['Price'])/s['Price']*s['Pool']*beta)
|
#print((s['Belief']-s['Price'])/s['Price']*s['Pool']*beta)
|
||||||
return (s['Belief']-s['Price'])/s['Price']*s['Pool']*beta
|
return s['Pool']*(s['Belief']-s['Price'])/s['Price']*beta
|
||||||
else :
|
else :
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ def b1m2(step, sL, s):
|
||||||
if Decimal('1')/s['Price']< s['Supply']/s['Pool']-gamma:
|
if Decimal('1')/s['Price']< s['Supply']/s['Pool']-gamma:
|
||||||
#print('arbit burn')
|
#print('arbit burn')
|
||||||
#print((s['Supply']/s['Pool']-Decimal('1')/s['Price'])*s['Price']*s['Supply']*beta)
|
#print((s['Supply']/s['Pool']-Decimal('1')/s['Price'])*s['Price']*s['Supply']*beta)
|
||||||
return (s['Supply']/s['Pool']-Decimal('1')/s['Price'])*s['Price']*s['Supply']*beta
|
return s['Price']*(s['Supply']/s['Pool']-Decimal('1')/s['Price'])*s['Supply']*beta
|
||||||
else :
|
else :
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue