summaryrefslogtreecommitdiff
path: root/services/backtester/tests/test_walk_forward.py
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-02 15:54:55 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-02 15:54:55 +0900
commitbf4afbc0a3cc4e847ef01840365fd6a6ae9c142f (patch)
treec8634b3b21534f550e2d255d98c4a068a1b567d0 /services/backtester/tests/test_walk_forward.py
parentec8b6fea5a4a710df4b2ae18f3f399d165c8ffd4 (diff)
style: auto-fix lint violations from enhanced ruff rules
Diffstat (limited to 'services/backtester/tests/test_walk_forward.py')
-rw-r--r--services/backtester/tests/test_walk_forward.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/services/backtester/tests/test_walk_forward.py b/services/backtester/tests/test_walk_forward.py
index 96abb6e..b1aa12c 100644
--- a/services/backtester/tests/test_walk_forward.py
+++ b/services/backtester/tests/test_walk_forward.py
@@ -1,18 +1,18 @@
"""Tests for walk-forward analysis."""
import sys
-from pathlib import Path
+from datetime import UTC, datetime, timedelta
from decimal import Decimal
-from datetime import datetime, timedelta, timezone
-
+from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "strategy-engine"))
-from shared.models import Candle
from backtester.walk_forward import WalkForwardEngine, WalkForwardResult
from strategies.rsi_strategy import RsiStrategy
+from shared.models import Candle
+
def _generate_candles(n=100, base_price=100.0):
candles = []
@@ -23,7 +23,7 @@ def _generate_candles(n=100, base_price=100.0):
Candle(
symbol="AAPL",
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(price)),
high=Decimal(str(price + 5)),
low=Decimal(str(price - 5)),