summaryrefslogtreecommitdiff
path: root/tests/integration/test_backtest_end_to_end.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/test_backtest_end_to_end.py')
-rw-r--r--tests/integration/test_backtest_end_to_end.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/integration/test_backtest_end_to_end.py b/tests/integration/test_backtest_end_to_end.py
index 4cc0b12..fbc0a24 100644
--- a/tests/integration/test_backtest_end_to_end.py
+++ b/tests/integration/test_backtest_end_to_end.py
@@ -9,19 +9,20 @@ sys.path.insert(
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "services" / "strategy-engine"))
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "services" / "backtester" / "src"))
+from datetime import UTC, datetime, timedelta
from decimal import Decimal
-from datetime import datetime, timedelta, timezone
-from shared.models import Candle
from backtester.engine import BacktestEngine
+from shared.models import Candle
+
def _generate_candles(prices: list[float], symbol="AAPL") -> list[Candle]:
return [
Candle(
symbol=symbol,
timeframe="1h",
- open_time=datetime(2025, 1, 1, tzinfo=timezone.utc) + timedelta(hours=i),
+ open_time=datetime(2025, 1, 1, tzinfo=UTC) + timedelta(hours=i),
open=Decimal(str(p)),
high=Decimal(str(p + 100)),
low=Decimal(str(p - 100)),