Add S/R v2 research and validation harness
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet("rr_aligned_control", "rewrite", "soft_zones", "confirmed_rounds", "gate_v2")]
|
||||
[string]$LockedArm,
|
||||
[string]$Snapshot = "backtest_snapshots\prod.sqlite",
|
||||
[string]$Python = ".venv\Scripts\python.exe",
|
||||
[int]$Workers = 7
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$arms = @("production_control", $LockedArm)
|
||||
foreach ($arm in $arms) {
|
||||
$output = "reports\backtest-sr-v2-validation-$arm.json"
|
||||
Write-Host "Running locked S/R validation arm: $arm"
|
||||
& $Python scripts\run_backtest_snapshot.py $Snapshot `
|
||||
--workers $Workers `
|
||||
--allow-spawn `
|
||||
--sr-variant $arm `
|
||||
--entry-start 2024-07-01 `
|
||||
--sr-audit `
|
||||
--out $output
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "S/R validation arm failed: $arm"
|
||||
}
|
||||
}
|
||||
|
||||
& $Python scripts\compare_sr_variants.py `
|
||||
reports\backtest-sr-v2-validation-production_control.json `
|
||||
"reports\backtest-sr-v2-validation-$LockedArm.json" `
|
||||
--out-csv reports\sr-v2-validation-cohorts.csv `
|
||||
--out-json reports\sr-v2-validation-comparison.json
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "S/R validation comparison failed"
|
||||
}
|
||||
Reference in New Issue
Block a user