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

Genetic backtester throwing error after pulling latest code #1026

Open
code4passion opened this issue Jan 1, 2018 · 1 comment · May be fixed by RafalSladek/zenbot#48, RafalSladek/zenbot#61 or rfxn/zenbot#90
Labels

Comments

@code4passion
Copy link

Please go to Stack Overflow for help and support:

System information

  • Have I written custom code (as opposed to using zenbot vanilla): No custom code
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Amazon Linux /Mac
  • Zenbot version: Latest code from git
  • NodeJS version: v9.3.0
  • Python version:
  • Exact command to reproduce:

./scripts/genetic_backtester/darwin.js --days=1 --asset_capital=0 --currency_capital=1000 --selector="gdax.BTC-USD" --population=1 --use_strategies="trend_ema"

Describe the problem

When i run the genetic backtester, the bot throws following exception:

Finished writing generation json to simulations/generation_data_1514770128_gen_2.json
Finished writing generation csv to simulations/backtesting_1514770128.csv

Generation's Best Results
	(trend_ema) Sim Fitness undefined, VS Buy and Hold: undefined End Balance: undefined, Wins/Losses undefined/undefined.
/Users/dshetyo/hackspace/zenbot/scripts/genetic_backtester/darwin.js:552
  input = input.params.replace("module.exports =","");
                ^

TypeError: Cannot read property 'params' of undefined
    at generateCommandParams (/Users/dshetyo/hackspace/zenbot/scripts/genetic_backtester/darwin.js:552:17)
    at selectedStrategies.forEach (/Users/dshetyo/hackspace/zenbot/scripts/genetic_backtester/darwin.js:651:29)
    at Array.forEach (<anonymous>)
    at saveGenerationData (/Users/dshetyo/hackspace/zenbot/scripts/genetic_backtester/darwin.js:640:28)
    at fs.writeFile.err (/Users/dshetyo/hackspace/zenbot/scripts/genetic_backtester/darwin.js:575:5)
    at /Users/dshetyo/hackspace/zenbot/scripts/genetic_backtester/node_modules/graceful-fs/graceful-fs.js:43:10
    at FSReqWrap.oncomplete (fs.js:135:15)

@DeviaVir DeviaVir added the bug label Jan 2, 2018
@DeviaVir
Copy link
Owner

DeviaVir commented Jan 2, 2018

I think this has been resolved by a recently merged PR, would you mind trying again?

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