Code Monkey home page Code Monkey logo

hftbot's Introduction

MM++

WARNING : The author of this software will not be responsible for your losses on the market, use at your own discretion. This bot is still in construction.

Introduction

The cross exchange market making / Hedged Market Making strategy performs market making trades between two markets:

  • It emits limit orders to a less liquid, larger spread market.
  • It emits market orders on a more liquid, smaller spread market whenever the limit orders were hit.

Market making isn't about placing bunch of bids and asks orders, you will soon realize orderflow isn't random at all and you get filled irregularly and accumulate inventory(which is a serious risk). Hedged Market making can help you with the inventory risk, unless you are slow somewhere. Basics remains the same, MM is all about capturing the spread and managing your inventory. You need to price in information as much as possible in a very low latency manner.

Photo

Components

  1. Feedhandlers
  2. Book Builders
  3. Strategy
  4. OMS

Architectural Design

MM++ arch-Page-1 drawio (3)

Components are scheduled to execute on distinct CPU cores using thread affinity and CPU isolation, which helps in preventing a thread from wandering between CPUs and reducing context switching overheads. Component Threads are expected to busy poll and never be interrupted, as it reduces the number of context switches because context switches only happens at each time slice.

Risk Management Tools

  • If speed of arrival market orders picks up across exchanges, stop quoting.
  • BART move detections helps in determining taker exchange overloads.

Build Instructions

Install dependencies

# install dependent packages
sudo apt-get update
sudo apt-get install libboost-all-dev


# install cmake
sudo apt install cmake

# install boost 1.79
wget https://www.boost.org/users/history/version_1_79_0.html
tar --bzip2 -xf boost_1_79_0.tar.bz2
cd boost_1_79_0/
./boostrap.sh
./b2
sudo ./b2 install

Steps to build and run the bot:

git clone --recurse-submodules https://github.com/Naseefabu/HFTBOT.git
cd HFTBOT/
./configure.sh
./build.sh
./run.sh

hftbot's People

Contributors

naseefabu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hftbot's Issues

Build error

Hi there,

Interesting project. I am however, having some issues when compiling:

[ 8%] Building CXX object CMakeFiles/hftbot.dir/core/features.cpp.o In file included from /Documents/HFTBOT/core/features.hpp:5, from /Documents/HFTBOT/core/features.cpp:1: /Documents/HFTBOT/exchanges/utils.hpp:8:10: fatal error: boost/url.hpp: No such file or directory 8 | #include <boost/url.hpp> | ^~~~~~~~~~~~~~~ compilation terminated.
Maybe related to one of your questions?
https://stackoverflow.com/questions/72139531/why-do-i-getting-boost-url-linking-error

And is there anything else that requires to be configured such as API keys etc?

Kind regards.

P.S: Discord link is expired.

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.