feat(strategy): skip markets with extreme priors (< 0.08 or > 0.92)
CI/CD / build-and-push (push) Successful in 1m33s

Markets where Polymarket consensus is near-certain leave no room for our
signals to generate MIN_EDGE=0.10 — evaluating them wastes GNews quota and
produces noise. Filter them out early with a clear log reason.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chemavx
2026-04-14 12:48:23 +00:00
parent 82d6d357eb
commit 5a9c6add41
+17
View File
@@ -129,6 +129,23 @@ class BayesianStrategy:
# The market already aggregates information from many traders; # The market already aggregates information from many traders;
# our signals update from that informed baseline, not from 0.5. # our signals update from that informed baseline, not from 0.5.
prior = max(0.05, min(0.95, market.yes_price)) prior = max(0.05, min(0.95, market.yes_price))
# Skip markets where the crowd has already reached near-certainty.
# Below 0.08 or above 0.92 there is not enough room for our signals
# to generate MIN_EDGE — any trade would be fighting near-certain consensus.
if market.yes_price < 0.08:
log.info(
"SKIP %-50s | cat=%-12s | prior=%.3f | reason=prior too low, market already certain",
market.question[:50], category, market.yes_price,
)
return None
if market.yes_price > 0.92:
log.info(
"SKIP %-50s | cat=%-12s | prior=%.3f | reason=prior too high, market already certain",
market.question[:50], category, market.yes_price,
)
return None
sources: list[str] = [f"Prior=poly({prior:.3f})"] sources: list[str] = [f"Prior=poly({prior:.3f})"]
adjustments: list[float] = [] adjustments: list[float] = []