Commit Graph
3 Commits
Author SHA1 Message Date
RichardandClaude Fable 5 916c3e17a6 Add trait filter spec and possible_insider detection to FIXPLAN Teil D
- Trait filtering is now a binding requirement: trait query parameter on
  GET /api/traders (EXISTS-based), GET /api/traits with counts, dropdown
  plus clickable chips in the UI.
- New trait possible_insider (D2b): detection via market-surprise
  likelihood under market prices (won longshots count, won favorites do
  not), with base filters (rare, large stakes, resolution farmers
  excluded) and a v2 roadmap (buys-before-news timing, one-shot wallets,
  topic concentration, urgency/slippage, niche markets).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 14:52:39 +02:00
RichardandClaude Fable 5 d2f3ec2bd0 Fix category mapping and TotalTrades drift, plan traits/tiering (Teil D)
- MarketCategoryMapper: classify from question text (the Gamma /markets
  endpoint delivers neither category nor event tags, so on-demand markets
  had no signal at all), match short tokens on word boundaries ("eth" no
  longer hits inside "whether", "pop" not inside "popular"), widen the
  keyword lists across all categories.
- UpdateMarketFields: never overwrite a tag-derived category with an
  uninformative "Other" from the on-demand path.
- PositionPnLEngine: sync Trader.TotalTrades to the actual replayed row
  count — the worker-side increment counters drift (INSERT IGNORE,
  deletions, historic imports) and produced Trades30d > TotalTrades.
- Tests: 14 new (mapper classification + word-boundary regression,
  TotalTrades sync + Trades30d invariant, category update guard via
  SQLite) — suite now 32 green + 1 skip.
- FIXPLAN Teil D for the larger rebuilds (AggregatedCount column,
  TraderTraits heuristics, IngestMode tiering for ultra-HF traders).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 14:09:12 +02:00
Richard 1787422243 Fix: Implement FixPlan part A9, A10, B 2026-07-10 12:04:27 +02:00