Code Monkey home page Code Monkey logo

projectshortwave's Introduction

ProjectShortwave

Latency Arbitrage Scanner

This project is named after the shortwave radio, which is capable of sending information (of very low bandwidth) over staggering distances with extremely low latency. Hedge funds use shortwave radios today to identify and execute trades for identical markets between exchanges in different parts of the world (ie Chicago and London) with the lowest possible latency. The latency advantage is so profound that the transmission of information is rumored to be seconds faster compared to conventional methods of communicating over large distances (which is significant in a field otherwise dominated by nanoseconds). Unfortunately, there is little public/verified information about latency arbitrage.

The hypothesis of this strategy is that in the case of identical markets being traded on multiple exchanges, the exchange with greater volume will "lead" the order flow of the exchange with lesser volume, creating a potential trading opportunity. So, the strategy is not directly based on having the lowest latency over large distances, but is instead meant to capitalize on smaller exchanges having less active volume to 'react' quickly to price-action in a larger market.

Currently the application cross-references all BTC-quoted markets for Binance and Bitrue, and finds the markets with the most disproportionate volumes (based on the volume traded in the last 24 hours). In using the application so far, I have seen markets with 24 hour volumes that are up to 300x higher on Binance compared to Bitrue.

Once the five most disproportionate markets are identified, websocket subscriptions are established with Binance to stream trades executed in real time. Bitrue does not offer websockets, however its REST API allows up to 41.6 requests per second, which in this case allows us to pull the most recent price information 8.3 times per second for each market. With that in mind, the 'stream' of data for Bitrue is not a websocket but a loop which sends a request to Bitrue as often as mechanically possible.

Once streams of data are established the application takes a snapshot every 0.5 seconds and calculates the correlation between the market prices and prints it in a column-delineated format, which can be easily exported to Excel or PowerBI and charted over time.

This project is in its early stages but is intended to support simulated trading (based on real liquidity available in the market) and also more advanced logging/analytics.

projectshortwave's People

Contributors

colinkimball avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.