- 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 通过
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
"""ORM 模型目录。
|
|
|
|
新增表流程(AGENT.md §12):Model → Alembic Migration → Test。
|
|
模型统一继承 infra.persistence.sqlalchemy.base.Base。
|
|
"""
|
|
|
|
from app.infrastructure.persistence.sqlalchemy.models.composite import ( # noqa: F401
|
|
FactorCompositeModel,
|
|
)
|
|
from app.infrastructure.persistence.sqlalchemy.models.factor import ( # noqa: F401
|
|
FactorDefinitionModel,
|
|
)
|
|
from app.infrastructure.persistence.sqlalchemy.models.jobs import ( # noqa: F401
|
|
ExperimentModel,
|
|
JobModel,
|
|
)
|
|
from app.infrastructure.persistence.sqlalchemy.models.market import ( # noqa: F401
|
|
AdjustFactorModel,
|
|
FinancialIndicatorModel,
|
|
StockDailyModel,
|
|
StockModel,
|
|
SyncLogModel,
|
|
TradingCalendarModel,
|
|
)
|
|
from app.infrastructure.persistence.sqlalchemy.models.selection import ( # noqa: F401
|
|
SelectionResultModel,
|
|
SelectionSnapshotModel,
|
|
)
|
|
from app.infrastructure.persistence.sqlalchemy.models.signal import ( # noqa: F401
|
|
SignalEventModel,
|
|
SignalSnapshotModel,
|
|
)
|
|
from app.infrastructure.persistence.sqlalchemy.models.strategy import ( # noqa: F401
|
|
StrategyModel,
|
|
)
|