fix(web+api): 组合回测max_pool默认30→0——用户拍板「前端页面肯定要改」(回测口径与实盘对齐,f214e2f只翻了live/paper链漏了回测) [nas]
CI/CD / test (push) Successful in 12s
CI/CD / nas-deploy (push) Successful in 42s
CI/CD / nas-verify (push) Successful in 9s

你印象中改过的是6ecdaab#95标的池pool→all(三表单+后端四处),max_pool当时没动。本次三处对齐: PortfolioBacktest表单默认30→0+过时提示(「MVP验证用,默认30」)清理+routes_portfolio Field default=30→0(防API直调口径分裂,#95同款对齐法)。语义同全链:0=不限,策略层>0才截断。build绿+tests/api 165绿。
This commit is contained in:
2026-08-24 20:54:56 +08:00
parent 981b501bdd
commit 6c2c217e22
2 changed files with 3 additions and 3 deletions
@@ -57,7 +57,7 @@ const selectedInstanceId = ref<number | null>(null)
const form = reactive({
pool: 'all',
strategy: 'all_weather',
max_pool: 30,
max_pool: 0,
start: dr.start,
end: dr.end,
cash: 1_000_000,
@@ -516,7 +516,7 @@ function fmtNum(v: number | null | undefined, digits = 2): string {
</el-form-item>
<el-form-item label="选股池上限">
<el-input-number v-model="form.max_pool" :min="0" :step="10" :controls="false" style="width: 220px" />
<span class="muted form-hint">0=全市场不限, N=前N只(MVP验证用, 默认30)</span>
<span class="muted form-hint">0=全市场不限(默认), N=前N只</span>
</el-form-item>
<el-form-item label="K 线周期">
<el-select v-model="form.interval" style="width: 220px">
+1 -1
View File
@@ -38,7 +38,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验证用)")
max_pool: int = Field(default=0, description="选股池上限: 0=全市场不限(默认), N=前N只")
# A 股费用(对齐个股回测)
commission_rate: float = Field(default=0.0003, description="佣金率双边(万3=0.0003)")
stamp_duty_rate: float = Field(default=0.001, description="印花税率卖出(千1=0.001)")