mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-24 13:08:10 +00:00
Disable unproven shock capital pending forward evidence
This commit is contained in:
@@ -3,6 +3,9 @@ import fs from "node:fs";
|
||||
|
||||
const report = JSON.parse(fs.readFileSync(new URL("../research/shock-strategy-3-audit.json", import.meta.url), "utf8"));
|
||||
const independent = JSON.parse(fs.readFileSync(new URL("../research/shock-strategy-3-independent-audit.json", import.meta.url), "utf8"));
|
||||
const strategy4 = JSON.parse(fs.readFileSync(new URL("../research/shock-strategy-4-audit.json", import.meta.url), "utf8"));
|
||||
const strategy4Independent = JSON.parse(fs.readFileSync(new URL("../research/shock-strategy-4-independent-audit.json", import.meta.url), "utf8"));
|
||||
const index = fs.readFileSync(new URL("../index.html", import.meta.url), "utf8");
|
||||
const candidate = report.candidates.find(row => row.rule.id === "fade_h12_w3_m0.08_accelerating_v1_All_All");
|
||||
|
||||
assert.equal(report.markets, 2000);
|
||||
@@ -38,4 +41,34 @@ assert.ok(independent.exactStrategy3.eventHoldout.lower > 0);
|
||||
assert.ok(independent.exactStrategy3.train.lower < 0, "Independent train limitation must remain visible");
|
||||
assert.ok(independent.exactStrategy3.holdout.lower < 0, "Independent chronological limitation must remain visible");
|
||||
|
||||
assert.match(strategy4.methodology.strategy4ContractGate, /Reject path barriers and exact numeric ranges/);
|
||||
assert.equal(strategy4.exactStrategy4.rule.contractGate, "strategy4");
|
||||
assert.equal(strategy4Independent.activeMarketsSkipped, 2000);
|
||||
for (const partition of ["train", "validation", "holdout", "eventHoldout"]) {
|
||||
assert.ok(strategy4.exactStrategy4[partition].events >= 60, `${partition} Strategy 4 primary support is too small`);
|
||||
assert.ok(strategy4.exactStrategy4[partition].lower > 0, `${partition} Strategy 4 primary lower bound must remain positive`);
|
||||
}
|
||||
assert.ok(strategy4.exactStrategy4.holdout.mean < 0, "Primary trade-level holdout limitation must remain visible");
|
||||
assert.ok(strategy4Independent.exactStrategy4.holdout.eventMean < 0, "Independent chronological event mean must remain negative");
|
||||
assert.ok(strategy4Independent.exactStrategy4.holdout.lower < 0, "Independent chronological failure must remain visible");
|
||||
assert.ok(strategy4Independent.exactStrategy4.eventHoldout.lower < 0, "Independent event-holdout uncertainty must remain visible");
|
||||
|
||||
const support = { train: 15, validation: 8, holdout: 8, eventHoldout: 8 };
|
||||
const partitions = Object.keys(support);
|
||||
const independentRefinements = new Map(strategy4Independent.strategy4Refinements.map(row => [row.rule.id, row]));
|
||||
const primarySurvivors = strategy4.strategy4Refinements.filter(row => partitions.every(partition =>
|
||||
row[partition].events >= support[partition] && row[partition].eventMean > 0 && row[partition].lower > 0));
|
||||
assert.equal(primarySurvivors.length, 1, "Unexpected Strategy 4 primary refinement count");
|
||||
assert.equal(primarySurvivors[0].rule.category, "All");
|
||||
assert.equal(primarySurvivors[0].rule.band, "All");
|
||||
assert.equal(primarySurvivors.filter(row => {
|
||||
const untouched = independentRefinements.get(row.rule.id);
|
||||
return untouched && partitions.every(partition => untouched[partition].events >= support[partition]
|
||||
&& untouched[partition].eventMean > 0 && untouched[partition].lower > 0);
|
||||
}).length, 0, "A Strategy 4 refinement unexpectedly passed every independent partition");
|
||||
|
||||
assert.match(index, /const SHOCK_FADE_BACKTEST_APPROVED=false/);
|
||||
assert.match(index, /const SHOCK_FADE_QUALIFICATION_EVENTS=40/);
|
||||
assert.match(index, /const SHOCK_FADE_PROMOTION_EVENTS=80/);
|
||||
|
||||
console.log("shock audit artifact verified");
|
||||
|
||||
Reference in New Issue
Block a user