perf(selection): 优化选股执行性能
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import date, datetime
|
||||
from decimal import Decimal
|
||||
@@ -150,3 +151,19 @@ class SelectionUniverseReader(Protocol):
|
||||
) -> SelectionExecutionSource: ...
|
||||
|
||||
def load_history(self, ts_code: str, target_trade_date: date) -> StockHistory: ...
|
||||
|
||||
|
||||
class BatchSelectionRunStore(Protocol):
|
||||
"""Optional batch-write extension for selection stores."""
|
||||
|
||||
def record_items(self, run_id: str, items: Sequence[SelectionRunItem]) -> None: ...
|
||||
|
||||
|
||||
class BatchSelectionUniverseReader(Protocol):
|
||||
"""Optional bounded batch-history extension for selection readers."""
|
||||
|
||||
def load_histories(
|
||||
self,
|
||||
stocks: Sequence[SelectionStock],
|
||||
target_trade_date: date,
|
||||
) -> tuple[StockHistory, ...]: ...
|
||||
|
||||
Reference in New Issue
Block a user