feat(strategy): Manifold cross-market signal + per-feature contribution logging
CI/CD / build-and-push (push) Successful in 2m21s

Signal 5: ManifoldClient queries Manifold Markets API for a matching binary
market by keyword overlap (threshold 0.25) and applies a log-odds adjustment
proportional to the divergence from the Polymarket prior.

  manifold_log_adj = (log_odds(manifold_prob) - log_odds(prior)) × 0.6

A 30pp divergence (Manifold 0.75 vs Poly 0.45) produces edge_gross ≈ 0.19,
clearing the politics far-horizon regime_min=0.12 after costs. Confidence
boosted +0.08 when Manifold match found.

Per-feature observability: every SKIP_EDGE_NET and TRADE log line now includes
  fg=±X.XXX  mom=±X.XXX  mfld=±X.XXXX  news=±X.XXXX
so the contribution of each signal to edge is auditable per market.

Files: bot/data/manifold.py (new), bot/strategy/bayesian.py, bot/main.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chemavx
2026-04-17 10:07:47 +00:00
parent 411d346261
commit 0cdb0758c4
3 changed files with 185 additions and 9 deletions
+4 -1
View File
@@ -10,6 +10,7 @@ from datetime import datetime, timezone
from bot.data.polymarket import PolymarketClient, market_family_key
from bot.data.external import ExternalDataClient
from bot.data.news import NewsClient
from bot.data.manifold import ManifoldClient
from bot.strategy.bayesian import BayesianStrategy, gnews_priority, MAX_NEWS_QUERIES_PER_CYCLE
from bot.risk.manager import RiskManager
from bot.executor.paper import PaperExecutor
@@ -188,7 +189,8 @@ async def main() -> None:
poly = PolymarketClient()
external = ExternalDataClient()
news = NewsClient()
strategy = BayesianStrategy(news=news)
manifold = ManifoldClient()
strategy = BayesianStrategy(news=news, manifold=manifold)
risk = RiskManager(max_position_pct=0.05, max_exposure_pct=0.30)
executor = PaperExecutor(db=db, bankroll=PAPER_BANKROLL) if PAPER_MODE else None
metrics = MetricsTracker(db=db)
@@ -205,6 +207,7 @@ async def main() -> None:
finally:
await db.disconnect()
await news.close()
await manifold.close()
if __name__ == "__main__":