Giter Site home page Giter Site logo

toxic-flow's Introduction

☣️ Toxic Flow

Calculate everything and anything related to VPIN. Publishes a merged order book as a gRPC stream.

Description

A pure rust CLI websocket client for creating the VPIN measure for cryptocurrency markets. VPIN (Volume-synchronised probability of informed trading) is a way of measuring flow toxicity within a market, commonly used by liquidity providers as leading indicator of liquidity-induced volatility.

  • Live mode: Prints order_imbalance and VPIN bucket to terminal
  • Historical: Parses binance tick (trade) data using the parameters defined.
  • Monte-carlo: Runs bivariate monte-carlo simulation on probability of informed event & arrival rate of informed traders for optimal bucketing.

Original Paper: https://www.stern.nyu.edu/sites/default/files/assets/documents/con_035928.pdf

Dependencies

  • Rust and Cargo

Executing program

  • Download some data from data.binance.vision
  • Clone project and run cargo install --path .
  • Run bucketinator --help to get flags
Usage: bucketinator [OPTIONS] --input-dir <INPUT_DIR>

Options:
  -n, --n <N>
          Sample of volume buckets used in the estimation [default: 50]
  -v, --volume-bucket-size <VOLUME_BUCKET_SIZE>
          Volume bucket size [default: 6894]
  -s, --start-date <START_DATE>
          Enter the start date in the format YYYY-MM-DD. For example, 2020-12-31 [default: 2020-01-01]
  -e, --end-date <END_DATE>
          Enter the end date in the format YYYY-MM-DD. For example, 2020-12-31 [default: 2022-12-20]
  -i, --input-dir <INPUT_DIR>
          Path to input directory with all the CSV files
  -o, --output-file <OUTPUT_FILE>
          Path to output file [default: output.csv]
  -h, --help
          Print help information
  -V, --version
          Print version information

Help

Ask me

Authors

toxic-flow's People

Contributors

g-tejas avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.