Giter VIP home page Giter VIP logo

challenge3's Introduction

Challenge3 - Arbitrage Analysis Report

In this report there are some clarification regarding the Jupyter Notebook created from the challenge. Since many inputs and decision are on the analyst's choice (especially in the last part), reference here for explanations.

Throughout the Jupyter Notebook there are some clarification as well. Check out for "STUDENT'S NOTES" in the markdown sections.


Technologies

Programming Language: JupyterLab loaded from the distribution Anaconda 4.10.3

Operative system: Windows 10 (it may be working on MAC OS and Linux too but the software was not designed on these)

Libraries:

  • pandas 1.3.4 - For DataFrame manipulation and plotting (already included in the Anaconda distribution)

Analyze the Data

After computing the statistics for the whole period under consideration through the describe() function, by looking at the mean, we can see that on average Bitstamp's price is $10 higher than the one on Coinbase. Of course to get insights regarding the exploitation of arbitrage opportunities we must look at the data more closely.

By plotting the data in their entire period we can see that there is a huge spread at the end of January 2018, where Bitstamp prices are consistently higher than Coinbase prices. By plotting the month of January only we can see this even more closely. By plotting the month of March instead, we can see that the spread is decreased, hence the price actions are more overlapped.

We go on plotting the price action of the 28th of January and this provides a clear picture of the spread that happened in that day. To get numeric metrics we compute the spread between the highest price and the lowest one, and by looking at the statistics we see that on average the spread during the day is $247.6, so enough to exploit arbitraging.

We plot other two daily dates: Februray 15th 2018 and March 31st 2018. In these two we can see from the plot instantly, and more carefully from the statistics, that the spread is very low.

Calculate the Arbitrage Profits

For each of the three dates we compute the spread and then buy using a boolean vector we focus just on the minutes where the spread is positive. For the first and potential profitable date the price on Bitstamp is always higher and Coinbase's. We go on computing the spread return, by dividing the profitable moments with the price of the exchange we're buying on, hence the least priced one.

To get a closer view of the potential profits in practice we take into account 1% of costs to carry out the trading strategy in each moment of the series, and so we consider the only moments when the spread return is higher than 1%. No profitable trades were found with this condition in the middle and late date chosen from the dataset.

We then multiply the profitable trades (those returns higher than 1%) by the cost of the purchased Bitcoin, hence the price on the exchange we are buying. We can than plot this multiple trades to see how they are distributed.

By cumulating the profit of each trade along with time we can also plot the cumulative return which at the end of the day, by follow this theretical setup, leads us with a gross profit of $ 341,771.87.

challenge3's People

Contributors

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