Giter VIP home page Giter VIP logo

bitcoin_arbitrage's Introduction

Bitcoin Arbitrage

This is a proof of concept for finding arbitrage opportunities in bitcoin markets and making trades on those opportunities.

"In economics and finance, arbitrage (pron.: /ˈɑrbɨtrɑːʒ/) is the practice of taking advantage of a price difference between two or more markets: striking a combination of matching deals that capitalize upon the imbalance, the profit being the difference between the market prices."

Example

Lets say we have three numbers

  1. The current Bitcoin to USD is $100
  2. The current Bitcoin to EUR is €60
  3. The current USD to EUR is €0.70

Now in a perfect economy all of these currencies would have the same value to one another, but if you look closely the current Bitcoin to EUR is under priced by €10! This is an arbitrage opportunity. We can safely say that the market is going to want to balance itself. If the other exchange rates stay content then the Bitcoin to EUR will eventually rise to €70.

What this program does is try and find these imbalances and capitalize on them.

Buy Signal

If we find a under priced conversion and we predict it will rise more than 3.6% (3 times the assumed trading fee for going in and out). If we predict it will rise more than four times our trading fee (4.8%) then we invest more money into the trade as its safer.

Sell Signal

If the conversion rises to one third of our initial prediction, or falls in price 10% (a stop loss). This algorithm trades very safely. These numbers can be tweaked to have a higher risk / higher reward.

Third Part Dependencies

Currently this program is limited to the MtGox bitcoin exchange and grabs its global exchanges rates from Open Exchange Rates. API keys and secrets must be set in the mix.exs for the program to run properly.

Installation

  1. Make sure Erlang and Elixir are installed
  2. Clone this repo: git clone https://github.com/ekosz/bitcoin_arbitrage.git
  3. Move into the directory: cd bitcoin_arbitrge
  4. Install the dependencies: mix deps.get
  5. Set your credentials in mix.exs
  6. Run the program: iex -S mix

bitcoin_arbitrage's People

Contributors

ekosz avatar musha68k avatar

Watchers

 avatar  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.