zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

bug with darwin

Open ttrd06 opened this issue 8 years ago • 5 comments

System information

  • Have I written custom code (as opposed to using zenbot vanilla):no
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):amd64
  • Zenbot version (commit ref, or version):latest
  • Zenbot branch:unstable
  • NodeJS version: 8.9.4
  • Python version (when using a python script):
  • Exact command to reproduce (include everything): ./scripts/genetic_backtester/darwin.js --selector=gdax.ETH-EUR --days=1 --currency_capital=80 --asset_capital=0 --use_strategies=bollinger --population=100
  • Did I make any changes to conf-sample.js?: no

Describe the problem

Morning !

An another bug with darwin if you want to use this amazing function: with the last commits from unstable and if you run darwin, you have: "json2csv is not a function" and darwin crash. i already know it is unstable but with latest commits, i hope bugs fixed. same with fresh install... if you clone from master branch and run npm install, you can't have a working version because of bugs during install. please check the basics of the bot before to commit @DeviaVir , there is always something broken as the issues mentionned said

thank's for reply and your efforts

Source code / Error logs

TypeError: json2csv is not a function at parallel (/root/Bureau/zenbot/scripts/genetic_backtester/darwin.js:1303:19) at end (/root/Bureau/zenbot/node_modules/run-parallel-limit/index.js:17:15) at done (/root/Bureau/zenbot/node_modules/run-parallel-limit/index.js:21:10) at each (/root/Bureau/zenbot/node_modules/run-parallel-limit/index.js:28:7) at /root/Bureau/zenbot/node_modules/run-parallel-limit/index.js:38:45 at ChildProcess.proc.on (/root/Bureau/zenbot/scripts/genetic_backtester/darwin.js:398:5) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

ttrd06 avatar Mar 01 '18 09:03 ttrd06

Cannot reproduce:

$ ./scripts/genetic_backtester/darwin.js --selector=gdax.ETH-EUR --days=1 --currency_capital=80 --asset_capital=0 --use_strategies=bollinger --population=100

--==Zenbot 4 Genetic Backtester v0.2.2==--
Thu, 01 Mar 2018 09:37:10 GMT

Backtesting strategy bollinger ...

Creating population of 100 ...



=== Simulating generation 0 ===

Backfilling (might take some time) ...
./zenbot.sh backfill --days=1 gdax.ETH-EUR

99: 21.7% ETA: 0m 2s
Done: 100, Active: 0, Remaining: 0, Completion: 100.0% Best Balance(26): 81.3156

Generation 0 completed at 2018-03-01 10:38:25, took 0m 24s, results saved to:
> Finished writing generation csv to simulations/backtest.gdax.eth-eur.20180301103710/gen_0/results.csv
> Finished writing generation json to simulations/backtest.gdax.eth-eur.20180301103710/gen_0/results.json


Generation's Best Results
(bollinger) Sim Fitness 0.025037166701407904, VS Buy and Hold:   1.2% BuyAndHold Balance: 80.310300  End Balance: 81.315671, Wins/Losses 1/0, ROI 1.645000.
./zenbot.sh sim gdax.ETH-EUR --avg_slippage_pct=0.045 --backtester_generation=26 --bollinger_lower_bound_pct=18.28733075353095 --bollinger_size=10 --bollinger_time=5.083683009584355 --bollinger_upper_bound_pct=2.5737634767738062 --buy_stop_pct=19 --markdown_buy_pct=0.7937310224321648 --markup_sell_pct=3.7889219541220793 --max_buy_loss_pct=25 --max_sell_loss_pct=25 --max_slippage_pct=5 --min_periods=1 --order_poll_time=5000 --order_type=maker --period=20m --period_length=20m --profit_stop_enable_pct=20 --profit_stop_pct=15 --rsi_periods=14 --sell_stop_pct=2 --strategy=bollinger --start=201802280100 --asset_capital=0 --currency_capital=80



=== Simulating generation 1 ===

Backfilling (might take some time) ...
./zenbot.sh backfill --days=1 gdax.ETH-EUR

8: 60.0%
Done: 7, Active: 3, Remaining: 90, Completion:   7.6% Best Balance(1): 80.0000, Slowest(8) ETA: 0m 0s^CSIGINT
Resume this backtest later with:
./scripts/genetic_backtester/darwin.js --selector=gdax.ETH-EUR --days=1 --currency_capital=80 --asset_capital=0 --use_strategies=bollinger --population=100 --population_data=backtest.gdax.eth-eur.20180301103710

Make sure you have run something equivalent to:

# pull latest unstable
rm -rf node_modules
npm i

and retry. If the issue persists, please let me know if you have any other local changes.

DeviaVir avatar Mar 01 '18 09:03 DeviaVir

I already used that before to post this issue: pull latest unstable rm -rf node_modules npm i Did you tested after a fresh install ? The error is always here: json2csv is not a function ... even after a fresh install ! and i can't start from master branch because of too many bugs during install ! What's the hell ?

ttrd06 avatar Mar 01 '18 18:03 ttrd06

Same here even with fresh reinstall

JNTNX433 avatar Mar 02 '18 07:03 JNTNX433

@glennfu since you've been active with darwin, is this something you've seen as well?

DeviaVir avatar Mar 02 '18 07:03 DeviaVir

hello !

i found and solve the error: don't forget to go to scripts/genetic_backtester folder and run npm install ! after all, it was inside the script doc and all is working for now ... is there anyway to include this part with the "npm install" when you start with a fresh install of zenbot if someone forget it ?

have a nice evening ! @DeviaVir this issue is closed for me

ttrd06 avatar Mar 02 '18 17:03 ttrd06