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

feature request: Add Strategies tester #378

Closed
mkuendig opened this issue Jul 11, 2017 · 4 comments
Closed

feature request: Add Strategies tester #378

mkuendig opened this issue Jul 11, 2017 · 4 comments
Labels

Comments

@mkuendig
Copy link
Contributor

mkuendig commented Jul 11, 2017

Have created a small strategies tester script. Could we add something like this?

#get available strategies from folder
strategies=$(ls -1 extensions/strategies)

for s in $strategies
do
echo "Tested strategy $s"
./zenbot.sh sim --days 15 --strategy $s
done

@DeviaVir
Copy link
Owner

https://github.com/carlos8f/zenbot/tree/master/scripts/auto_backtester doesn't do more or less what you want?

@mkuendig
Copy link
Contributor Author

Thanks @DeviaVir . Yup, that is pretty close.

I have enhanced my script to use it and the script is now:

npm install shelljs run-parallel-limit json2csv fs round-precision

#change script to make it docker compatible
sed -i.bak "s&zenbot sim&./zenbot.sh sim&g" scripts/auto_backtester/backtester.js

#get available strategies from folder
strategies=$(ls -1 extensions/strategies)

for s in $strategies
	do
	echo "Tested strategy $s"
       ./scripts/auto_backtester/backtester.js poloniex.ETH-USDT --days 15 $s
done

Two things:

  • On my docker/Kubernetes setup the zenbot command doesn't work. I have to use ./zenbot.sh
  • A small cosmectic thing....The first line output of the string shows always trend_ema strategy used, even if other strategies are tested.

Tested strategy cci_srsi

--==Zenbot 4.04 Backtester v0.2==--
Wed, 12 Jul 2017 03:20:48 GMT

Backtesting [176] iterations for strategy trend_ema...

[ 1/176 ] ./zenbot.sh sim poloniex.ETH-USDT --days 15 cci_srsi --trend_ema=20 --oversold_rsi=20 --oversold_rsi_periods=15 --neutral_rate=0.1 --period=2m --min_periods=52
[ 2/176 ] ./zenbot.sh sim poloniex.ETH-USDT --days 15 cci_srsi --trend_ema=20 --oversold_rsi=21 --oversold_rsi_periods=15 --neutral_rate=0.1 --period=2m --min_periods=52

@asafyish
Copy link

asafyish commented Aug 7, 2017

I got multiple csv files,
How do you compare the results ?

@mkuendig
Copy link
Contributor Author

mkuendig commented Aug 8, 2017

sort each csv so that you have the best result on top. Then use the strategy that yields the best return. I have abandoned the auto-tester and use now the new ML feature introduced: https://github.com/carlos8f/zenbot/blob/master/commands/train.js

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