mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-24 04:58:08 +00:00
Prioritize capital-efficient protected trades
This commit is contained in:
@@ -35,7 +35,7 @@ jobs:
|
||||
- run: node scripts/run-autonomous-cycle.mjs
|
||||
env:
|
||||
ARENA_URL: https://polymarket-site-eta.vercel.app
|
||||
EXPECTED_BUILD: "124"
|
||||
EXPECTED_BUILD: "125"
|
||||
RUNTIME_BRANCH: runtime-state
|
||||
RUNTIME_STATE_PATH: runtime/state.json
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Release protected agent routing after Vercel quota reset
|
||||
name: Release capital-efficient protected sizing after Vercel quota reset
|
||||
|
||||
on:
|
||||
schedule:
|
||||
@@ -26,23 +26,23 @@ jobs:
|
||||
env:
|
||||
ARENA_URL: https://polymarket-site-eta.vercel.app
|
||||
run: |
|
||||
if curl --fail --silent --show-error "${ARENA_URL}/?routing_preflight=${GITHUB_RUN_ID}" | grep -q 'routesExclusiveNoPairToTailAlpha'; then
|
||||
echo "Protected agent routing is already live."
|
||||
if curl --fail --silent --show-error "${ARENA_URL}/?sizing_preflight=${GITHUB_RUN_ID}" | grep -q 'bundlePositionCapPct'; then
|
||||
echo "Capital-efficient protected sizing is already live."
|
||||
exit 0
|
||||
fi
|
||||
printf 'Protected routing deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .protected-routing-release-trigger
|
||||
printf 'Protected sizing deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .capital-efficient-release-trigger
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .protected-routing-release-trigger
|
||||
git commit -m "Retry protected agent routing deployment"
|
||||
git add .capital-efficient-release-trigger
|
||||
git commit -m "Retry capital-efficient protected sizing deployment"
|
||||
git push origin HEAD:main
|
||||
- name: Verify the exact routing revision in production
|
||||
- name: Verify the exact sizing revision in production
|
||||
env:
|
||||
ARENA_URL: https://polymarket-site-eta.vercel.app
|
||||
run: |
|
||||
for attempt in $(seq 1 40); do
|
||||
if curl --fail --silent --show-error "${ARENA_URL}/?routing_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'routesExclusiveNoPairToTailAlpha'; then
|
||||
echo "Protected agent routing is live."
|
||||
if curl --fail --silent --show-error "${ARENA_URL}/?sizing_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'bundlePositionCapPct'; then
|
||||
echo "Capital-efficient protected sizing is live."
|
||||
exit 0
|
||||
fi
|
||||
sleep 30
|
||||
|
||||
@@ -23,17 +23,17 @@ Offline cycles can apply calibration already earned from live observations, but
|
||||
the evidence ledger is read-only: cached prices cannot grade pending signals,
|
||||
expire horizons, or create new observations.
|
||||
|
||||
Build 124 targets five-minute slots with a serialized, self-chained GitHub Actions runtime.
|
||||
Build 125 targets five-minute slots with a serialized, self-chained GitHub Actions runtime.
|
||||
The mutable snapshot stays on the dedicated `runtime-state` branch, which is
|
||||
explicitly excluded from Vercel Git deployments through
|
||||
`git.deploymentEnabled`. This prevents high-frequency state commits from
|
||||
consuming Preview deployment quota while ordinary `main` source commits still
|
||||
produce Production deployments.
|
||||
It continues from the previous agent snapshot and runs the next due paper cycle
|
||||
even when no browser is open. After each successful cycle, one repo-scoped
|
||||
even when no browser is open. After each cycle attempt, one repo-scoped
|
||||
workflow dispatch waits for the next five-minute boundary; one concurrency group
|
||||
serializes active and pending runs, a failed cycle does not self-repeat,
|
||||
and the cron schedule remains as recovery. The runtime writes a
|
||||
serializes active and pending runs, and both successful and failed runs hand off
|
||||
after the next boundary while the cron schedule remains as recovery. The runtime writes a
|
||||
sanitized snapshot to the `runtime-state` branch and `/api/state` uses that as a
|
||||
read-only fallback while Neon or Vercel Blob is unavailable. The public snapshot
|
||||
contains only `pma_agents_v2` and `pma_suggestions_v5`, with suggestions capped at
|
||||
@@ -44,11 +44,13 @@ Public maker outcomes retain only calibration fields, action logs are bounded
|
||||
to 48 entries per agent, and chart snapshots are evenly sampled once their
|
||||
96-point public limit is reached so older dates remain represented. Repetitive
|
||||
watch-only explanations are normalized without changing signal fields. If the
|
||||
875 KB transport budget is reached, the compactor first protects 75 KB for
|
||||
875 KB browser transport budget is reached, the compactor first protects 75 KB for
|
||||
learning, reserves up to 144 of the newest completed directional outcomes, and
|
||||
then gives the remaining evidence space to the oldest still-pending
|
||||
observations. Only after display history reaches its documented floor can the
|
||||
public suggestion list fall from 300 to its 240-item emergency floor.
|
||||
public suggestion list fall from 300 to its 240-item emergency floor. The headless
|
||||
runner applies an additional 850 KB hard target before committing state, leaving
|
||||
margin below the API's 900 KB limit.
|
||||
Paper accounts, passwords, email settings,
|
||||
investment allocations, chat history, wallet information, and live-money
|
||||
settings are explicitly excluded. While that fallback is active, ordinary
|
||||
@@ -68,7 +70,7 @@ Polymarket event key. Related Ethereum or Bitcoin contracts cannot create
|
||||
several simultaneous copies of one move, and outcomes from the same underlying
|
||||
three-hour shock window count as one learner event.
|
||||
|
||||
Each Build 124 cycle also scans the 1,000 most-active Polymarket events for
|
||||
Each Build 125 cycle also scans the 1,000 most-active Polymarket events for
|
||||
complete negative-risk bundles and logically nested threshold or deadline
|
||||
pairs, plus same-market YES/NO complements whose equal shares have a fixed
|
||||
$1 redemption value. Polymarket's documented complete-set merge converts equal
|
||||
@@ -84,10 +86,11 @@ count, all asks and CLOB fee schedules must verify, and the post-conversion proc
|
||||
must remain profitable. Missing or inconsistent adapter data cannot produce paper
|
||||
P&L. Complete YES sets and logical dominance pairs are not convertible and continue
|
||||
to use settlement or verified live-bid exits.
|
||||
Bundle capital is split between two independent agents instead of bottlenecking one
|
||||
portfolio: Value Hunter owns complete-set merge/conversion opportunities, while The
|
||||
Diversifier owns threshold and deadline dominance spreads. A global underlying-event
|
||||
claim prevents either book from duplicating exposure already held by the other.
|
||||
Bundle capital is split between five independent owners instead of bottlenecking one
|
||||
portfolio: Value Hunter owns settlement complete sets, Momentum owns exact complete-NO
|
||||
conversions, Breakout owns same-market binary merges, Tail Alpha owns exclusive NO
|
||||
pairs, and The Diversifier owns threshold and deadline dominance spreads. A global underlying-event
|
||||
claim prevents any owner from duplicating exposure already held by another.
|
||||
Gasless CTF operations include merge transactions; see
|
||||
[Positions & Tokens](https://docs.polymarket.com/concepts/positions-tokens) and
|
||||
[Gasless Transactions](https://docs.polymarket.com/trading/gasless).
|
||||
@@ -98,15 +101,17 @@ same-market complements. Structures are ranked by locked-capital efficiency, wit
|
||||
the best structure from each independent event checked before alternates from events
|
||||
already represented. They are repriced
|
||||
from batched CLOB asks from the equal-unit size needed for at least a $50
|
||||
paper order up to a $400 verified-notional ceiling. The scanner applies each market's Gamma fee schedule at every
|
||||
paper order up to a $1,000 verified-notional ceiling. The scanner applies each market's Gamma fee schedule at every
|
||||
consumed ask level and checks the exact CLOB condition metadata for a matching
|
||||
fee curve or fee-free state. Any opened position is capped to the exact equal-unit size
|
||||
of the largest fill that stays profitable and passes this depth test; portfolio
|
||||
cash, reserve, and 4% limits can reduce it further. Strategy 65 ranks verified
|
||||
cash and reserve limits can reduce it further. Ordinary protected entries use at
|
||||
most 6% of equity, entries returning at least 0.20% per locked day use at most 8%,
|
||||
and immediate merge or conversion paths use at most 10%. Strategy 65 ranks verified
|
||||
structures by net return per expected locked day before raw edge, and caps active
|
||||
cost from one underlying event at 12% of Value Hunter equity. This prevents
|
||||
cost from one underlying event at 12% of the owning portfolio's equity. This prevents
|
||||
several related threshold pairs from monopolizing the non-directional book. New bundles must
|
||||
also clear a 0.02% daily locked-capital return floor, approximately 7.3% annualized,
|
||||
also clear a 0.05% daily locked-capital return floor, approximately 18.25% simple or 20% compounded annualized,
|
||||
so a tiny spread cannot immobilize capital for months. Existing paper bundles are
|
||||
never retroactively enlarged against depth their original simulated fill would
|
||||
already have consumed. Each live cycle also prices an atomic exit across every bid
|
||||
@@ -122,7 +127,7 @@ The Suggestions view stores scan, depth, fee, actionable, and closest
|
||||
executable-margin counts so an empty lane is evidence rather than an ambiguous
|
||||
failure.
|
||||
|
||||
Build 124 retains the directional learner's exact-fee policy, which replaced the blanket half-cent cost with
|
||||
Build 125 retains the directional learner's exact-fee policy, which replaced the blanket half-cent cost with
|
||||
the market's Gamma fee schedule at both the entry and future checkpoint, plus a
|
||||
separate half-cent round-trip slippage allowance. Fee-free markets pay only the
|
||||
slippage allowance; an unavailable fee schedule gets a conservative four-cent
|
||||
@@ -155,7 +160,7 @@ target fell to -44.14% in validation and remained negative in holdout, so it
|
||||
cannot authorize capital. The reproducible result is stored in
|
||||
`research/settlement-calibration-exact-fee-5000-audit.json`.
|
||||
|
||||
Build 124 retains Build 100's retirement of the old 3-6 day resolution-window
|
||||
Build 125 retains Build 100's retirement of the old 3-6 day resolution-window
|
||||
capital permission. That audit clustered confidence by event but still averaged
|
||||
several correlated contracts inside each event, while production could choose
|
||||
only one. The corrected replay chooses the highest-volume eligible contract per event and
|
||||
@@ -275,7 +280,7 @@ evidence proves an edge.
|
||||
|
||||
Run `npm run evaluate:sports-favorites` for the retired pregame favorite audit.
|
||||
Its 12-hour, 60%-75% cohort had positive point estimates but did not establish a
|
||||
reliable confidence bound, so Build 124 no longer allocates capital to that rule.
|
||||
reliable confidence bound, so Build 125 no longer allocates capital to that rule.
|
||||
|
||||
Strategy 65 also tracks the exact-fee settlement calibration's three-day Sports
|
||||
NO cohort as a zero-capital forward lane. The corrected 5,000-market run
|
||||
|
||||
+37
-9
@@ -341,7 +341,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
|
||||
<nav class="topnav">
|
||||
<div class="brand">
|
||||
<div class="logo">🏆</div>
|
||||
<div><div class="brand-name">Polymarket Arena</div><div class="brand-sub">10 agents · 5 core + 5 aggressive</div><div class="build-badge">Adaptive strategy 65 · exact bundle conversion · build 124</div></div>
|
||||
<div><div class="brand-name">Polymarket Arena</div><div class="brand-sub">10 agents · 5 core + 5 aggressive</div><div class="build-badge">Adaptive strategy 65 · capital-efficient protected sizing · build 125</div></div>
|
||||
</div>
|
||||
<div class="tabs" id="tabs">
|
||||
<button class="tab" data-tab="overview">Overview</button>
|
||||
@@ -363,7 +363,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
|
||||
<div class="personal-banner" id="personalBanner">
|
||||
<b>Personal research mode.</b> This copy is for your own analysis, paper tracking, and manual trade research only. It does not pool money, onboard investors, custody funds, bypass eligibility rules, or place orders without your manual approval.
|
||||
</div>
|
||||
<div class="live-build-banner"><b>Build 124 active:</b> Strategy 65 keeps the durable evidence and bounded six-hour probation gates from Strategy 64. Complete negative-risk NO sets now use Polymarket's exact event market ID and conversion fee: after every ask and CLOB fee is verified, all legs convert atomically to collateral instead of locking cash until settlement. YES bundles and logical dominance pairs still remain intact unless verified live bids realize at least 85% of their guaranteed settlement profit. Sports contest NO research remains zero-capital until forward evidence passes. Phones and computers display the same read-only autonomous state. Profits are not guaranteed.</div>
|
||||
<div class="live-build-banner"><b>Build 125 active:</b> Strategy 65 keeps directional capital locked because its forward evidence remains negative after exact costs. Protected entries now require at least 0.05% modeled return per locked day, while short-duration and immediate conversion or merge opportunities can use 6-10% verified sizing inside the unchanged 12% event cap. Complete negative-risk conversions and binary merges realize atomically; settlement bundles remain intact unless verified live bids realize at least 85% of their guaranteed profit. Phones and computers display the same read-only autonomous state. Profits are not guaranteed.</div>
|
||||
|
||||
<!-- ============ OVERVIEW ============ -->
|
||||
<section class="tabpanel" data-tab="overview">
|
||||
@@ -745,7 +745,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
Build 124 · Adaptive strategy 65 · Exact-fee complete-NO conversion · Evidence-first bounded snapshots · Six-hour bounded probation with matched executable exits · Serialized self-chained five-minute slots with cron recovery · Oldest-first bounded learning transport · Restart-safe offline runtime · Exact-fee directional learning · Capital-efficient, event-capped verified bundles · Atomic verified bundle-profit recycling · Conservative intact-bundle accounting · Contest-deduplicated sports shadow research · Corrected one-decision-per-event settlement audit · Autonomous runtime 2 · Offline runtime 3 · Maker research 3 · Agent learning 3 · Paper trading only · Live prices from Polymarket's public Gamma and CLOB APIs · Not financial advice ·
|
||||
Build 125 · Adaptive strategy 65 · Exact-fee complete-NO conversion · Evidence-first bounded snapshots · Six-hour bounded probation with matched executable exits · Serialized self-chained five-minute slots with cron recovery · Oldest-first bounded learning transport · Restart-safe offline runtime · Exact-fee directional learning · Capital-efficient, event-capped verified bundles · Duration-aware protected sizing · Atomic verified bundle-profit recycling · Conservative intact-bundle accounting · Contest-deduplicated sports shadow research · Corrected one-decision-per-event settlement audit · Autonomous runtime 2 · Offline runtime 3 · Maker research 3 · Agent learning 3 · Paper trading only · Live prices from Polymarket's public Gamma and CLOB APIs · Not financial advice ·
|
||||
<a class="market-link" href="https://github.com/theodore-song/polymarket-analyst" target="_blank" rel="noopener">Source on GitHub</a>
|
||||
</footer>
|
||||
</div>
|
||||
@@ -774,7 +774,7 @@ const POLITICS_TREND_MIN_HOLD_HOURS = 72;
|
||||
const EXIT_CONFIRM_HOURS = 6;
|
||||
const AGENTS_KEY = "pma_agents_v2";
|
||||
const SUG_KEY = "pma_suggestions_v5";
|
||||
const BUILD_VERSION = 124;
|
||||
const BUILD_VERSION = 125;
|
||||
const AGENT_LEARNING_VERSION = 3;
|
||||
const SUGGESTION_ENGINE_VERSION = 65;
|
||||
const MAKER_STRATEGY_VERSION = 3;
|
||||
@@ -1472,6 +1472,11 @@ function bundleCapitalEfficiency(item={}){
|
||||
const lockDays=item.bundle_immediate_merge||item.bundle_immediate_convert?1:(Number.isFinite(days)&&days>0?Math.max(1,days):365);
|
||||
return netReturn/lockDays;
|
||||
}
|
||||
function bundlePositionCapPct(item={}){
|
||||
if(item.bundle_immediate_merge||item.bundle_immediate_convert)return BUNDLE_IMMEDIATE_POSITION_CAP_PCT;
|
||||
return Number(item.bundle_capital_efficiency)>=BUNDLE_HIGH_EFFICIENCY_DAILY_RETURN
|
||||
?BUNDLE_HIGH_EFFICIENCY_POSITION_CAP_PCT:BUNDLE_BASE_POSITION_CAP_PCT;
|
||||
}
|
||||
function compareBundleOpportunities(a,b){
|
||||
return bundleCapitalEfficiency(b)-bundleCapitalEfficiency(a)
|
||||
||Number(b.net_edge||-Infinity)-Number(a.net_edge||-Infinity)
|
||||
@@ -1760,9 +1765,13 @@ const NEG_RISK_RPC_BATCH_CALL_LIMIT=10;
|
||||
const BUNDLE_FEE_CONCURRENCY=8;
|
||||
const BUNDLE_MIN_NOTIONAL=50;
|
||||
const BUNDLE_MIN_UNITS=5;
|
||||
const BUNDLE_MAX_VERIFIED_NOTIONAL=400;
|
||||
const BUNDLE_MAX_VERIFIED_NOTIONAL=1000;
|
||||
const BUNDLE_EVENT_CAP_PCT=0.12;
|
||||
const BUNDLE_MIN_DAILY_RETURN=0.00002;
|
||||
const BUNDLE_MIN_DAILY_RETURN=0.0005;
|
||||
const BUNDLE_BASE_POSITION_CAP_PCT=0.06;
|
||||
const BUNDLE_HIGH_EFFICIENCY_POSITION_CAP_PCT=0.08;
|
||||
const BUNDLE_IMMEDIATE_POSITION_CAP_PCT=0.10;
|
||||
const BUNDLE_HIGH_EFFICIENCY_DAILY_RETURN=0.002;
|
||||
const BUNDLE_EXIT_PROFIT_CAPTURE=0.85;
|
||||
const BUNDLE_EXIT_MIN_REALIZED_PROFIT=0.01;
|
||||
const SPORTS_FAVORITE_MIN_ENTRY=0.03;
|
||||
@@ -4702,7 +4711,7 @@ function openPositions(p,cfg,rankedSugs,focus,decision,avoidMarketIds,peerStats=
|
||||
if(s.quality==="bundle-arb"){
|
||||
const eventCapacity=Math.max(0,eq*BUNDLE_EVENT_CAP_PCT-bundleEventExposure(p,bundleEventKey(s)));
|
||||
if(eventCapacity<BUNDLE_MIN_NOTIONAL){reject("bundle_event_cap");continue;}
|
||||
const bundleStake=boundedStakeForRisk(eq,Math.min(eq*Math.min(d.maxFrac,0.04),investable,eventCapacity),cfg,s);
|
||||
const bundleStake=Math.min(eq*bundlePositionCapPct(s),investable,eventCapacity,BUNDLE_MAX_VERIFIED_NOTIONAL);
|
||||
const bundle=openNegativeRiskBundle(p,cfg,s,bundleStake,decision);
|
||||
if(!bundle){reject("bundle_execution");continue;}
|
||||
cycleBudgetRemaining=Math.max(0,cycleBudgetRemaining-bundle.cost);
|
||||
@@ -7697,7 +7706,7 @@ function runEngineSelfTest(){
|
||||
const depthVwapFixture=bundleExecutableAsk({asks:[{price:"0.40",size:"30"},{price:"0.39",size:"20"}]},50);
|
||||
const scalableBundlePrices=[0.30,0.31,0.34];
|
||||
const scalableBundleBooks=new Map((zeroFeeBundleSuggestion.bundle_legs||[]).map((leg,index)=>[String(leg.token_id),
|
||||
{min_order_size:"5",asks:[{price:String(scalableBundlePrices[index]),size:"500"}]}]));
|
||||
{min_order_size:"5",asks:[{price:String(scalableBundlePrices[index]),size:"2000"}]}]));
|
||||
const scalableBundleQuote=maximizeBundleExecution(zeroFeeBundleSuggestion,scalableBundleBooks,bundleMinimumExecutionUnits(0.95));
|
||||
const depthLimitedBundleBooks=new Map((zeroFeeBundleSuggestion.bundle_legs||[]).map((leg,index)=>[String(leg.token_id),
|
||||
{min_order_size:"5",asks:[{price:String(scalableBundlePrices[index]),size:String(index===2?120:500)}]}]));
|
||||
@@ -7804,6 +7813,20 @@ function runEngineSelfTest(){
|
||||
openPositions(slowCapitalBook,agentById("diversifier"),[slowCapitalSuggestion],"All",{
|
||||
minConv:0,maxNew:1,maxFrac:0.04,reserve:0.10,targetExposure:0.60,learning:buildAdaptiveProfile(slowCapitalBook),marketLearning:{samples:0,pending:0,buckets:{}},
|
||||
},new Set(),{});
|
||||
const highEfficiencyBundle=Object.assign({},dominanceSuggestion,{bundle_id:"dominance:high-efficiency:a:b",bundle_event_id:"high-efficiency",
|
||||
bundle_capital_efficiency:BUNDLE_HIGH_EFFICIENCY_DAILY_RETURN*1.5,execution_units:2000});
|
||||
const highEfficiencyBook=defaultPortfolio();
|
||||
openPositions(highEfficiencyBook,agentById("diversifier"),[highEfficiencyBundle],"All",{
|
||||
minConv:0,maxNew:1,maxFrac:0.04,reserve:0.05,targetExposure:0.90,learning:buildAdaptiveProfile(highEfficiencyBook),marketLearning:{samples:0,pending:0,buckets:{}},
|
||||
},new Set(),{});
|
||||
const highEfficiencyCost=highEfficiencyBook.positions.reduce((sum,pos)=>sum+Number(pos.cost||0),0);
|
||||
const eventBurstBook=defaultPortfolio(),eventBurstSuggestions=Array.from({length:4},(_,index)=>Object.assign({},highEfficiencyBundle,{
|
||||
bundle_id:`dominance:event-burst:leg-${index}-a:leg-${index}-b`,bundle_event_id:"event-burst",
|
||||
}));
|
||||
openPositions(eventBurstBook,Object.assign({},agentById("diversifier"),{aggressive:true}),eventBurstSuggestions,"All",{
|
||||
minConv:0,maxNew:4,maxFrac:0.04,reserve:0.05,targetExposure:0.90,learning:buildAdaptiveProfile(eventBurstBook),marketLearning:{samples:0,pending:0,buckets:{}},
|
||||
},new Set(),{});
|
||||
const eventBurstExposure=bundleEventExposure(eventBurstBook,"event-burst");
|
||||
const unverifiedBundleBook=defaultPortfolio(),unverifiedBundleOpen=openNegativeRiskBundle(unverifiedBundleBook,AGENTS.find(a=>a.id==="value"),
|
||||
Object.assign({},bundleSuggestion,{depth_verified:false,verification_status:"top-of-book-estimate"}),100,null);
|
||||
const depthCappedBundleBook=defaultPortfolio(),depthCappedBundle=Object.assign({},bundleSuggestion,{execution_units:50});
|
||||
@@ -8370,6 +8393,11 @@ function runEngineSelfTest(){
|
||||
derivesLegacyBundleEventKey:bundleEventKey({bundle_id:"dominance:legacy-event:market-a:market-b"})==="legacy-event",
|
||||
capsUnderlyingEventExposure:eventCapBook.positions.length===2&&eventCapBook.lastDecision.rejectionCounts.bundle_event_cap===1,
|
||||
blocksLowReturnPerLockedDay:slowCapitalBook.positions.length===0&&slowCapitalBook.lastDecision.rejectionCounts.bundle_capital_efficiency===1,
|
||||
durationAwareSizingScalesProtectedCapital:highEfficiencyBook.positions.length===2
|
||||
&&highEfficiencyCost>=799.9&&highEfficiencyCost<=800.1&&bundlePositionCapPct(highEfficiencyBundle)===0.08,
|
||||
sameCycleEventBurstStaysWithinCap:eventBurstExposure<=STARTING_BALANCE*BUNDLE_EVENT_CAP_PCT+0.01
|
||||
&&new Set(eventBurstBook.positions.map(pos=>pos.bundle_id)).size===2
|
||||
&&eventBurstBook.lastDecision.rejectionCounts.bundle_event_cap>=1,
|
||||
consumesLiveBidDepthForExit:bundleExecutableSaleLeg({bids:[{price:"0.50",size:"30"},{price:"0.49",size:"20"}]},50,{rate:0,exponent:1,takerOnly:true}).bid_price===0.496,
|
||||
holdsWhenOnlyEightyPercentProfitIsAvailable:!belowCaptureBundleExit.actionable&&belowCaptureBundleExit.status==="capture-below-threshold"
|
||||
&&belowCaptureBundleExit.capture_ratio===0.8,
|
||||
@@ -8386,7 +8414,7 @@ function runEngineSelfTest(){
|
||||
rejectsMismatchedClobFeeCurve:!bundleFeeSchedulesMatch({rate:0.05,exponent:1,takerOnly:true},normalizeClobFeeSchedule({fd:{r:0.04,e:1,to:true}})),
|
||||
rejectsMissingClobFeeCurve:!bundleFeeSchedulesMatch({rate:0.05,exponent:1,takerOnly:true},null),
|
||||
depthVwapConsumesMultipleAskLevels:depthVwapFixture===0.396,
|
||||
sizesToLargestVerifiedProfitableFill:scalableBundleQuote.units===421.05&&Math.abs(scalableBundleQuote.notional-399.9975)<0.0001
|
||||
sizesToLargestVerifiedProfitableFill:scalableBundleQuote.units===1052.63&&Math.abs(scalableBundleQuote.notional-999.9985)<0.0001
|
||||
&&scalableBundleQuote.net_return>0.05,
|
||||
stopsSizingAtShallowestBundleLeg:depthLimitedBundleQuote.units>=119.9&&depthLimitedBundleQuote.units<=120
|
||||
&&depthLimitedBundleQuote.notional<=BUNDLE_MAX_VERIFIED_NOTIONAL,
|
||||
|
||||
@@ -16,13 +16,13 @@ const settlementCalibrationAudit = JSON.parse(fs.readFileSync(new URL("../resear
|
||||
const sportsEvaluator = fs.readFileSync(new URL("./evaluate-sports-favorites.mjs", import.meta.url), "utf8");
|
||||
const build = Number(index.match(/const BUILD_VERSION = (\d+);/)?.[1]);
|
||||
|
||||
assert.equal(build, 124);
|
||||
assert.equal(build, 125);
|
||||
assert.equal(vercelConfig.git?.deploymentEnabled?.["runtime-state"], false);
|
||||
assert.equal(settlementCalibrationAudit.requested_markets, 5000);
|
||||
assert.equal(settlementCalibrationAudit.train_passed, 0);
|
||||
assert.equal(settlementCalibrationAudit.validation_selected, 0);
|
||||
assert.equal(settlementCalibrationAudit.holdout_passed, 0);
|
||||
assert.match(index, /Adaptive strategy 65 · exact bundle conversion · build 124/);
|
||||
assert.match(index, /Adaptive strategy 65 · capital-efficient protected sizing · build 125/);
|
||||
assert.deepEqual([...ALLOWED_RUNTIME_KEYS].sort(), ["pma_agents_v2", "pma_suggestions_v5"]);
|
||||
assert.match(index, /function collectPublicRuntimeItems\(\)/);
|
||||
assert.match(index, /const PUBLIC_RUNTIME_KEYS=Object\.freeze\(\[AGENTS_KEY,SUG_KEY\]\)/);
|
||||
@@ -72,10 +72,10 @@ assert.match(api, /Buffer\.from\(file\.content/);
|
||||
assert.match(api, /searchParams\.set\("runtime", `\$\{Date\.now\(\)\}/);
|
||||
assert.match(workflow, /cron: "2,7,12,17,22,27,32,37,42,47,52,57 \* \* \* \*"/);
|
||||
assert.match(workflow, /contents: write/);
|
||||
assert.match(workflow, /EXPECTED_BUILD: "124"/);
|
||||
assert.match(workflow, /EXPECTED_BUILD: "125"/);
|
||||
assert.equal((workflow.match(/if: always\(\)/g) || []).length, 2);
|
||||
assert.match(routingReleaseWorkflow, /name: Release protected agent routing after Vercel quota reset/);
|
||||
assert.match(routingReleaseWorkflow, /routesExclusiveNoPairToTailAlpha/);
|
||||
assert.match(routingReleaseWorkflow, /name: Release capital-efficient protected sizing after Vercel quota reset/);
|
||||
assert.match(routingReleaseWorkflow, /bundlePositionCapPct/);
|
||||
assert.match(routingReleaseWorkflow, /cron: "25 1-23\/2 23 8 \*"/);
|
||||
assert.match(workflow, /actions: write/);
|
||||
assert.match(workflow, /cancel-in-progress: false/);
|
||||
@@ -108,9 +108,14 @@ assert.match(index, /function bundleFeeSchedulesMatch\(expected,reported\)/);
|
||||
assert.match(index, /rejectsMismatchedClobFeeCurve:/);
|
||||
assert.doesNotMatch(index, /\/fee-rate\?token_id=/);
|
||||
assert.match(index, /function maximizeBundleExecution\(candidate,books,minimumUnits\)/);
|
||||
assert.match(index, /const BUNDLE_MAX_VERIFIED_NOTIONAL=400;/);
|
||||
assert.match(index, /const BUNDLE_MAX_VERIFIED_NOTIONAL=1000;/);
|
||||
assert.match(index, /const BUNDLE_EVENT_CAP_PCT=0\.12;/);
|
||||
assert.match(index, /const BUNDLE_MIN_DAILY_RETURN=0\.00002;/);
|
||||
assert.match(index, /const BUNDLE_MIN_DAILY_RETURN=0\.0005;/);
|
||||
assert.match(index, /const BUNDLE_BASE_POSITION_CAP_PCT=0\.06;/);
|
||||
assert.match(index, /const BUNDLE_HIGH_EFFICIENCY_POSITION_CAP_PCT=0\.08;/);
|
||||
assert.match(index, /const BUNDLE_IMMEDIATE_POSITION_CAP_PCT=0\.10;/);
|
||||
assert.match(index, /const BUNDLE_HIGH_EFFICIENCY_DAILY_RETURN=0\.002;/);
|
||||
assert.match(index, /function bundlePositionCapPct\(item=\{\}\)/);
|
||||
assert.match(index, /fee_check_eligible_structures:executableAudit\.filter\(candidate=>candidate\.fee_check_attempted\)\.length/);
|
||||
assert.match(index, /"profit-below-floor"/);
|
||||
assert.match(index, /"return-below-floor"/);
|
||||
@@ -171,6 +176,8 @@ assert.match(index, /atomicallyRecyclesEightySixPercentProfit:/);
|
||||
assert.match(index, /prioritizesReturnPerLockedDay:/);
|
||||
assert.match(index, /capsUnderlyingEventExposure:/);
|
||||
assert.match(index, /blocksLowReturnPerLockedDay:/);
|
||||
assert.match(index, /durationAwareSizingScalesProtectedCapital:/);
|
||||
assert.match(index, /sameCycleEventBurstStaysWithinCap:/);
|
||||
assert.match(index, /sizesToLargestVerifiedProfitableFill:/);
|
||||
assert.match(index, /stopsSizingAtShallowestBundleLeg:/);
|
||||
assert.match(index, /!s\.depth_verified\|\|!s\.fees_verified\|\|s\.verification_status!=="executable"/);
|
||||
|
||||
Reference in New Issue
Block a user