From 49022a8b81e675355dbcb25bf43700cdda678b18 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Fri, 8 Mar 2019 17:26:49 +0000 Subject: [PATCH] Fixed bug where max_error was not taking abs of error first, so ignoring negative errors --- crypto_balancer/portfolio.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto_balancer/portfolio.py b/crypto_balancer/portfolio.py index 22c5218..b59ec7c 100644 --- a/crypto_balancer/portfolio.py +++ b/crypto_balancer/portfolio.py @@ -101,6 +101,7 @@ def balance_rms_error(self): @property def balance_max_error(self): pcts = self.balance_errors_pct + pcts = [abs(x) for x in pcts] return max(pcts) @property