Skip to content

Commit

Permalink
Update backtest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord authored Feb 18, 2021
1 parent a7801da commit 7747caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def jackrabbit(trades_list: [dict],
candidate['leverage'] = min(backtesting_settings['max_leverage'], candidate['leverage'])

settings = {**backtesting_settings, **candidate}
key = np.format_float_positional(hash(json.dumps({k_: candidate[k_] for k_ in ranges})),
key = np.format_float_positional(hash(json.dumps({k_: candidate[k_] for k_ in ranges if k_ in candidate})),
trim='-')[1:20]
if key in results:
if os.path.exists(best_filepath):
Expand Down

1 comment on commit 7747caf

@enarjord
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug fix

Please sign in to comment.