Hello, I still have more work to do on this bot, but I am looking for an explanation of the losses shown. 

There are a few levels of functionality to secure very small profit at a time in this algo.

    - I make a calculation to make sure that order executions only occur if the the action of [buying BTC with USD,       buying ETH with BTC, and then completing the loop by selling ETH for USD] returns a profit.

      - Referring to the functionality above, to make sure that the profit is greater than 0.9% to cover Gdax fees (0.3% per trade).

      - Slippage could also roll me into a non profitable execution, so I check for bid/ask sizes per trade, convert them into a USD amount, and use the smallest of those to engage in a market order.

       - To be even safer, since there are plenty of other buyers and sellers who might get to an order first, I limit the max trade amount to a 100 USD equivalent if the smallest bid/ask size is larger than 100 USD equivalent.

Even then. I still have negative turnout. What is odd is that I manually calculate the profit using the data in the "Orders" section of the back test, and it shows a positiv overall return.

 

Author