From 6f5b418f0bbafa0b9f932eb2f466b61c52c27b44 Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Sat, 18 Nov 2017 10:24:18 +0200 Subject: [PATCH] small balancing to hyperopt objective --- freqtrade/tests/test_hyperopt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/tests/test_hyperopt.py b/freqtrade/tests/test_hyperopt.py index 843057394..367db3fa8 100644 --- a/freqtrade/tests/test_hyperopt.py +++ b/freqtrade/tests/test_hyperopt.py @@ -19,7 +19,7 @@ from freqtrade.vendor.qtpylib.indicators import crossed_above logging.disable(logging.DEBUG) # disable debug logs that slow backtesting a lot # set TARGET_TRADES to suit your number concurrent trades so its realistic to 20days of data -TARGET_TRADES = 1300 +TARGET_TRADES = 1100 TOTAL_TRIES = 4 current_tries = 0 @@ -87,8 +87,8 @@ def test_hyperopt(backtest_conf, mocker): total_profit = results.profit.sum() * 1000 trade_count = len(results.index) - trade_loss = 1 - 0.4 * exp(-(trade_count - TARGET_TRADES) ** 2 / 10 ** 5.2) - profit_loss = max(0, 1 - total_profit / 15000) # max profit 15000 + trade_loss = 1 - 0.35 * exp(-(trade_count - TARGET_TRADES) ** 2 / 10 ** 5.2) + profit_loss = max(0, 1 - total_profit / 10000) # max profit 10000 global current_tries current_tries += 1