From cf02d18ea5e3f9357d6a02faac199f57e5daff77 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 18:45:12 +0900 Subject: feat(strategy): Phase 2 complete — strategy infrastructure upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Technical indicators library (ATR, ADX, RSI, MACD, Bollinger, Stochastic, OBV) - Signal model: conviction score, stop_loss, take_profit fields - BaseStrategy: ADX regime filter, volume confirmation, ATR-based stops - All 8 strategies upgraded with filters, conviction scoring, ATR stops - Combined strategy uses conviction-weighted scoring - 334 tests passing --- shared/tests/test_models.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'shared') diff --git a/shared/tests/test_models.py b/shared/tests/test_models.py index b23d71d..e3b9f12 100644 --- a/shared/tests/test_models.py +++ b/shared/tests/test_models.py @@ -99,8 +99,12 @@ def test_signal_conviction_default(): from shared.models import Signal, OrderSide signal = Signal( - strategy="rsi", symbol="BTCUSDT", side=OrderSide.BUY, - price=Decimal("50000"), quantity=Decimal("0.01"), reason="test", + strategy="rsi", + symbol="BTCUSDT", + side=OrderSide.BUY, + price=Decimal("50000"), + quantity=Decimal("0.01"), + reason="test", ) assert signal.conviction == 1.0 assert signal.stop_loss is None @@ -112,8 +116,12 @@ def test_signal_with_stops(): from shared.models import Signal, OrderSide signal = Signal( - strategy="rsi", symbol="BTCUSDT", side=OrderSide.BUY, - price=Decimal("50000"), quantity=Decimal("0.01"), reason="test", + strategy="rsi", + symbol="BTCUSDT", + side=OrderSide.BUY, + price=Decimal("50000"), + quantity=Decimal("0.01"), + reason="test", conviction=0.8, stop_loss=Decimal("48000"), take_profit=Decimal("55000"), -- cgit v1.2.3