Closed parthi2929 closed 3 years ago
Hi
Often I also observe, the route ends up in loss as below. How to avoid that?
Code:
import asyncio from peregrinearb import load_exchange_graph, print_profit_opportunity_for_path, bellman_ford loop = asyncio.get_event_loop() graph = loop.run_until_complete(load_exchange_graph('bitfinex', fees=True)) paths = bellman_ford(graph, 'BTC', unique_paths=True) for path in paths: print_profit_opportunity_for_path(graph, path)
Output:
This is due to imprecision in floating point operations and the problems it causes are not severe enough to warrant e.g. using a different arithmetic implementation.
Hi
Often I also observe, the route ends up in loss as below. How to avoid that?
Code:
Output: