feat(strategy): M8.3 策略模型 + /api/strategies(命名配置资产,可展开为 ResearchSpec)

- StrategyDefinition:universe/factors/selection/rebalance/costs/portfolio +
  price_adjustment(除 period 外完整策略定义);to_research_spec(period) 展开为标准 Spec
- strategy 表(migration e1f2a3b4c5d6,MySQL 已应用;name 唯一)+ StrategyRepository
- /api/strategies:POST/GET/DELETE + POST /{id}/expand(period+initial_capital → ResearchSpec)
- tests/test_strategies.py(repo CRUD/同名/expand、API CRUD/400/404);全量 pytest 通过
This commit is contained in:
Simon
2026-09-09 00:38:09 +08:00
parent 692bdb3be5
commit 9d25d466e5
10 changed files with 436 additions and 0 deletions
@@ -30,3 +30,6 @@ from app.infrastructure.persistence.sqlalchemy.models.signal import ( # noqa: F
SignalEventModel,
SignalSnapshotModel,
)
from app.infrastructure.persistence.sqlalchemy.models.strategy import ( # noqa: F401
StrategyModel,
)