Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

zenbot Sim overdrafts currency account and returns wrong numbers. #2678

Open
cyberlink1 opened this issue Apr 22, 2021 · 4 comments
Open

zenbot Sim overdrafts currency account and returns wrong numbers. #2678

cyberlink1 opened this issue Apr 22, 2021 · 4 comments
Labels

Comments

@cyberlink1
Copy link

Im running the docker version posted to docker hub (deviavir/zenbot:unstable)

I first noticed the issue after backtesting Jan 2021 and getting a return of just over 300% but when I did the same backtest using
Jan 1 - Feb 28 2021 It showed 150% at the end of Jan.

As I dug into it and did further testing I noticed entries like this in the output.

2021-03-23 04:24:59 54355.29 BTC-USD -0.46% 3 -- 38.83 -072 -051 selling 0.01830 BTC 352.95 USD +34.73% +35.44%
2021-03-23 04:29:58 54263.78 BTC-USD -0.17% 3 -- 36.25 -278 -206 bought 0.01830 BTC 0.19 USD -35.62% -35.17%

2021-04-12 16:04:52 59832.15 BTC-USD -0.25% 3 -- 43.60 127 025 bought 0.01691 BTC 908.83 USD+290.04%+256.23%
2021-04-12 16:09:53 59714.17 BTC-USD -0.20% 0 -- 39.96 -124 -251 bought 0.01691 BTC 0.50 USD +14.87% +5.12%

2021-01-05 07:00:00 31154.59 BTC-USD +0.01% 4 54.21 + 688 142 bought 0.03250 BTC 991.30 USD+183.85%+164.36%
2021-01-05 07:05:00 31074.70 BTC-USD -0.26% 8 52.40 + 1012 323 bought 0.03250 BTC 0.54 USD -18.28% -23.69%

No change in BTC amount but the USD is gone and the percentage changes.

I ran another sim with --enable_stats and collected the output, then wrote a perl script to parse the buy and sell orders keeping it's own count for USD and BTC.

Going through the output from my script I noticed entries like the following (Note: This is the output of my script keeping a tally of the buy and sell orders from zenbots output)

------
Order: buy
Bitcoins: 0.03027274
Ammount: 983.596
Actual: 983.5967417058
BTC Wallet: 0.03150806
USD Wallet: -17.8923000000002
------

------
Order: buy
Bitcoins: 0.00307577
Ammount: 100.089
Actual: 100.0892774817
BTC Wallet: 0.03151828
USD Wallet: -18.1893000000002
------

So it appears to be over drafting the funds available.
At the end of the run the output from zenbot showed

end balance: 4855.48787773 (385.54%)
buy hold: 1141.98793937 (14.19%)
vs. buy hold: 325.17%
203 trades over 32 days (avg 6.34 trades/day)
win/loss: 155/19

However, my script returned $2127.63 (USD + USD Value of BTC held)

Let me know if there is any other info I can provide to help you identify where the issue is.

@DeviaVir DeviaVir added the bug label Apr 23, 2021
@w1ld3r
Copy link

w1ld3r commented Apr 23, 2021

Can't you try debug it @cyberlink1 ? Otherwise I will take a look tomorrow.

@w1ld3r
Copy link

w1ld3r commented Apr 23, 2021

But I hitghly suggest you to use Freqtrade instead of Zenbot. It has more active contributors and has a decent code quality.

@cyberlink1
Copy link
Author

Can't you try debug it @cyberlink1 ? Otherwise I will take a look tomorrow.

I dont know java, so debugging it is a bit outside my abilities.

But I hitghly suggest you to use Freqtrade instead of Zenbot. It has more active contributors and has a decent code quality.

I looked at Freqtrade and it did not have any of the standard strategies (rsi, srsi, cci, momentum, etc, etc.) as I am not a programmer and do not know python, I would not be able to create them. So Zenbot appeared to be a better option.

I also liked the Zenbot web interface for monitoring/checking it's status.

@w1ld3r
Copy link

w1ld3r commented Apr 24, 2021

Duplicate issue #2594 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants