Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine arbitrage frequency #2

Open
pegahcarter opened this issue Nov 24, 2018 · 2 comments
Open

Determine arbitrage frequency #2

pegahcarter opened this issue Nov 24, 2018 · 2 comments

Comments

@pegahcarter
Copy link

There's two strategies that come to mind:

  1. Strategy that waits 'X' seconds between validating next arbitrage pair

  2. Strategy that completes all arbitrage pairs for an exchange every 'X' units of time

@marchowardbegins
Copy link
Owner

If I understand Strategy #2 correctly it seems to have the advantage of polling all pairs vs. the linear method of Strategy #1. The time to validate pairs would eventually have to factor in the execution time since it wouldn't make sense to validate every second when it takes a minute to execute a trade. So we could start the validation period for an arbitrary period (60 secs. to begin with?) to at least have a working signaling bot. After which the work on the trade execution could be phased-in.

@pegahcarter
Copy link
Author

Exactly. The appeal with Strategy #1 is that we can definitely say, "each ticker has their prices checked every 'X' seconds".

With Strategy #2, the tickers we query would have to depend on the tickers from a single exchange, so the downside is that we'd be querying the most common arbitrage pairs. From Strategy #2 we can say, "we check a different exchange every 'X' seconds".

Another appeal of Strategy #2 is that our rate of price checking for an exchange is constant, even if the exchange adds/removes trading pairs. With Strategy #1 we could still set a time frame where all pairs are queried in a certain amount of time, however we run the risk in the future that there will be too many arbitrage pairs to complete a full round of querying in the time frame. Technically we run that risk with Strategy #2, but since it's one exchange at a time we're not querying every single pair, so the risk associated with it is a lot lower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants