You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
Have I written custom code (as opposed to using zenbot vanilla):
no
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Linux
Zenbot version (commit ref, or version):
$ docker-compose exec server zenbot --version
(node:87) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
4.1.0
Zenbot branch:
unstable
NodeJS version:
node:8
Python version (when using a python script):
I am using docker
Exact command to reproduce (include everything):
Get the package
git clone git@github.com:DeviaVir/zenbot.git
First start docker
docker-compose up
Then get backtest data
docker-compose exec server zenbot backfill binance.BTC-USDT --days 400
Here comes the strange output. trend_ema report -9.96% buy and hold gain, while srsi_macd report -5.48%. Actually, I tried many other strategies, none of them gave me the same number. I am wondering, shouldn't this number be the same from different strategies?
$ docker-compose exec server zenbot sim --order_type taker --strategy 'trend_ema' --start 20170907 --end 20170913 binance.BTC-USDT --silent
(node:121) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
(node:121) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
end balance: 1083.58544198 (8.35%)
buy hold: 900.41712033 (-9.96%)
vs. buy hold: 20.34%
210 trades over 8 days (avg 26.25 trades/day)
win/loss: 25/79
error rate: 75.96%
$ docker-compose exec server zenbot sim --order_type taker --strategy 'srsi_macd' --start 20170907 --end 20170913 binance.BTC-USDT --silent
(node:104) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
(node:104) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
end balance: 954.21165094 (-4.58%)
buy hold: 945.26200972 (-5.48%)
vs. buy hold: 0.94%
5 trades over 12 days (avg 0.41 trades/day)
win/loss: 2/1
error rate: 33.33%
Shouldn't the buy&hold return be the same? Since I am backtesting the same date range. To my understanding, the buy&hold return is calculated by the end date market price minus start date market price, then divided by the start date market price -- which is independent of different strategies.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
System information
no
Linux
unstable
node:8
I am using docker
Get the package
First start docker
Then get backtest data
Here comes the strange output. trend_ema report -9.96% buy and hold gain, while srsi_macd report -5.48%. Actually, I tried many other strategies, none of them gave me the same number. I am wondering, shouldn't this number be the same from different strategies?
Describe the problem
The output buy and hold gain is different from different strategies.
Source code / Error logs
N/A
The text was updated successfully, but these errors were encountered: