Created
December 15, 2019 03:58
-
-
Save yurenju/10a42d424e563817832acca03dbc8acd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == '__main__': | |
num_traders = 100 | |
num_arbitrageurs = 10 | |
trader_dai = 10000 | |
trader_eth = 1000 | |
uniswap_dai = 1000000 | |
uniswap_eth = 10000 | |
model = UniswapModel(num_traders, num_arbitrageurs, trader_dai, trader_eth, uniswap_dai, uniswap_eth) | |
for i in range(100): | |
model.step() | |
df = model.datacollector.get_model_vars_dataframe() | |
df.plot() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment