Skip to content

Commit

Permalink
Fixed percentages in backtest output
Browse files Browse the repository at this point in the history
  • Loading branch information
nazegnl committed Apr 21, 2021
1 parent 38f4186 commit 36cc814
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
btc_value = manager.collate_coins("BTC")
bridge_value = manager.collate_coins(manager.config.BRIDGE.symbol)
history.append((btc_value, bridge_value))
btc_diff = round((btc_value - history[0][0]) / history[0][0], 3)
bridge_diff = round((bridge_value - history[0][1]) / history[0][1], 3)
btc_diff = round((btc_value - history[0][0]) / history[0][0] * 100, 3)
bridge_diff = round((bridge_value - history[0][1]) / history[0][1] * 100, 3)
print("------")
print("TIME:", manager.datetime)
print("BALANCES:", manager.balances)
Expand Down

0 comments on commit 36cc814

Please sign in to comment.