Navigation Menu

Skip to content

Commit

Permalink
fix(ga): use performanceReport response object instead of report
Browse files Browse the repository at this point in the history
  • Loading branch information
valebedu committed Jul 23, 2018
1 parent caeccab commit 4a08328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -338,7 +338,7 @@ class Ga {

// These properties will be outputted every epoch, remove property if not needed
const properties = ['balance', 'profit', 'sharpe', 'market', 'relativeProfit', 'yearlyProfit', 'relativeYearlyProfit', 'startPrice', 'endPrice', 'trades'];
const report = body.report;
const report = body.performanceReport;
let result = { profit: 0, metrics: false };

if (report) {
Expand All @@ -351,7 +351,7 @@ class Ga {

}, {});

result = { profit: body.report.profit, sharpe: body.report.sharpe, metrics: picked };
result = { profit: body.performanceReport.profit, sharpe: body.performanceReport.sharpe, metrics: picked };

}

Expand Down

0 comments on commit 4a08328

Please sign in to comment.