feat(selection): implement gold brick resonance strategy with evaluation and logging enhancements
This commit is contained in:
@@ -8,12 +8,17 @@ from datetime import date, datetime
|
||||
from decimal import Decimal
|
||||
from typing import Literal, Protocol
|
||||
|
||||
from .models import SelectionEvaluationStatus, SelectionSignal, StockHistory
|
||||
from .models import (
|
||||
SelectionEvaluationStatus,
|
||||
SelectionSignal,
|
||||
SelectionStrategyName,
|
||||
StockHistory,
|
||||
)
|
||||
from .pattern_scoring import PatternScore
|
||||
|
||||
SelectionRunStatus = Literal["running", "success", "partial_success", "failed"]
|
||||
SelectionRunItemStatus = SelectionEvaluationStatus
|
||||
SelectionSignalCategoryFilter = Literal["pullback", "oversold", "original"]
|
||||
SelectionSignalCategoryFilter = Literal["pullback", "oversold", "original", "resonance"]
|
||||
SelectionResultSort = Literal["code", "score_desc", "score_asc"]
|
||||
|
||||
|
||||
@@ -66,7 +71,7 @@ class SelectionRun:
|
||||
"""A current execution attempt and its materialized result rows."""
|
||||
|
||||
id: str
|
||||
strategy: Literal["zhixing_b1"]
|
||||
strategy: SelectionStrategyName
|
||||
target_trade_date: date
|
||||
market_sync_batch_id: str | None
|
||||
status: SelectionRunStatus
|
||||
@@ -107,7 +112,7 @@ class SelectionRunStore(Protocol):
|
||||
|
||||
def prepare_run(
|
||||
self,
|
||||
strategy: Literal["zhixing_b1"],
|
||||
strategy: SelectionStrategyName,
|
||||
target_trade_date: date,
|
||||
source: SelectionExecutionSource,
|
||||
*,
|
||||
@@ -138,7 +143,7 @@ class SelectionRunStore(Protocol):
|
||||
|
||||
def get_latest_run(
|
||||
self,
|
||||
strategy: Literal["zhixing_b1"],
|
||||
strategy: SelectionStrategyName,
|
||||
target_trade_date: date | None = None,
|
||||
*,
|
||||
query: SelectionResultQuery | None = None,
|
||||
|
||||
Reference in New Issue
Block a user