Skip to content

Commit

Permalink
small fixes and changes in plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Jul 7, 2021
1 parent 7de4565 commit 8895f7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ def gain_conv(x):
lines.append(f"symbol {result['symbol'] if 'symbol' in result else 'unknown'}")
lines.append(f"gain percentage {round_dynamic(result['result']['gain'] * 100 - 100, 4)}%")
lines.append(f"average_daily_gain percentage {round_dynamic((result['result']['average_daily_gain'] - 1) * 100, 3)}%")
lines.append(f"sharpe_ratio percentage {round_dynamic(result['result']['sharpe_ratio'] * 100, 3)}%")
avg_pgain_key = result['avg_periodic_gain_key']
lines.append(f"{result['avg_periodic_gain_key']} percentage {round_dynamic(result['result']['average_periodic_gain'] * 100, 3)}%")
lines.append(f"closest_bkr percentage {round_dynamic(result['result']['closest_bkr'] * 100, 4)}%")
lines.append(f"starting balance {round_dynamic(result['starting_balance'], 3)}")

for key in [k for k in result['result'] if k not in ['gain', 'average_daily_gain', 'closest_bkr', 'do_long', 'do_shrt']]:
for key in [k for k in result['result'] if k not in ['gain', 'average_daily_gain', 'average_periodic_gain', 'closest_bkr', 'do_long', 'do_shrt']]:
lines.append(f"{key} {round_dynamic(result['result'][key], 6)}")
lines.append(f"long: {result['do_long']}, short: {result['do_shrt']}")

Expand Down

0 comments on commit 8895f7c

Please sign in to comment.