@@ -20,7 +20,7 @@ def test_run(self):
2020 config = {RESOURCE_DIRECTORY : resource_directory }
2121 app = create_app (name = "GoldenCrossStrategy" , config = config )
2222 app .add_market (market = "BINANCE" , trading_symbol = "EUR" , initial_balance = 400 )
23- end_date = datetime (2023 , 12 , 2 , tzinfo = timezone . utc )
23+ end_date = datetime (2023 , 12 , 2 )
2424 start_date = end_date - timedelta (days = 100 )
2525 date_range = BacktestDateRange (
2626 start_date = start_date , end_date = end_date
@@ -31,10 +31,10 @@ def test_run(self):
3131 strategies = [CrossOverStrategyV1 , CrossOverStrategyV2 ]
3232 )
3333 self .assertAlmostEqual (
34- backtest_report .get_growth (), 18.1 , delta = 0.1
34+ backtest_report .get_growth (), 18.1 , delta = 0.5
3535 )
3636 self .assertAlmostEqual (
37- backtest_report .get_growth_percentage (), 4.5 , delta = 0.05
37+ backtest_report .get_growth_percentage (), 4.5 , delta = 0.5
3838 )
3939 self .assertEqual (
4040 backtest_report .get_initial_unallocated (), 400
@@ -43,8 +43,8 @@ def test_run(self):
4343 backtest_report .get_trading_symbol (), "EUR"
4444 )
4545 self .assertAlmostEqual (
46- backtest_report .get_profit (), 18.1 , delta = 0.1
46+ backtest_report .get_profit (), 18.1 , delta = 0.5
4747 )
4848 self .assertAlmostEqual (
49- backtest_report .get_profit_percentage (), 4.5 , delta = 0.05
49+ backtest_report .get_profit_percentage (), 4.5 , delta = 0.5
5050 )
0 commit comments