feat(portfolio): max_pool 字段透传(model+handler+前端,解除30硬编码)
CI/CD / test (push) Successful in 8s
CI/CD / nas-deploy (push) Successful in 21s
CI/CD / nas-verify (push) Successful in 3s

model 加 max_pool 字段(默认30,0=全市场不限);handler 用 req.max_pool 替换硬编码30;
前端加选股池上限 input + onSubmit 透传。下游 submit_portfolio→spec→argv--max-pool
链路异步化时已存在,本次只补入口。全周期验收可传 max_pool=0 对比 docker exec 旁证
This commit is contained in:
2026-08-01 23:20:40 +08:00
parent 7a14d7da82
commit e22c8ee939
3 changed files with 15 additions and 1 deletions
+2 -1
View File
@@ -37,6 +37,7 @@ class PortfolioBacktestRequest(BaseModel):
default="all_weather",
description="策略: all_weather/momentum_timing/value_selection/small_cap",
)
max_pool: int = Field(default=30, description="选股池上限: 0=全市场不限, N=前N只(MVP验证用)")
@router.post("/portfolio/backtest", dependencies=[Depends(verify_token)])
@@ -48,7 +49,7 @@ async def run_portfolio_backtest(req: PortfolioBacktestRequest):
cash=req.initial_cash,
benchmark=req.benchmark,
strategy=req.strategy,
max_pool=30,
max_pool=req.max_pool,
provider_config=None,
)
return {"task_id": tid}