Commit Graph
25 Commits
Author SHA1 Message Date
Richard 6fd7e563f4 G3 & G4: Map UsdcSize, OutcomeIndex, compute Category ROI and add migration 2026-07-19 12:35:03 +02:00
Richard 7045002ca3 WebUI Redesign and Component 1: category mapper fixes 2026-07-19 10:51:07 +02:00
Richard 16431f38a5 feat: implement Part D and E from FIXPLAN
- D1/D2/D2c: Added TraderTraits entity, TraderTraitCalculator, Market Return Metrics (MedianWin, AvgWin, etc.), and trait filters
- D3: Implemented HF-Trader Tiering via IngestMode (Full, Aggregated, SnapshotOnly) and updated TradeHistoryWorker to respect tiers
- E1-E5: Added MasterStatus to Trader, TraderWindowMetrics for rolling analytics, Fingerprint metrics (PriceBandProfile, P50/P90), Copyability aggregates (Volume, Drift, Edge)
- E6: Implemented GET /api/traders/{id}/profile and GET /api/traders/correlation
- Replaced FIXPLAN-2026-07-09.md with FIXPLAN-TODO.md and FIXPLAN-DONE.md
- Cleaned up API docs and plan to use generic terms (removed hardcoded PolyTrader references)
- Added respective EF Core Migrations
2026-07-14 09:04:31 +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
RichardandClaude Fable 5 850c47a404 Fix embedded-server endpoint drift, add Recalculate All Traders button
- Shared ApiConfiguration.MapPredictalyticsEndpoints() used by both the
  standalone API and the embedded WinForms Kestrel server: the embedded
  host was missing /api/watchlist and /api/dev (empty watchlist page),
  the standalone host was missing /api/search.
- New Development menu action "Recalculate All Traders": backfills
  ResolutionOutcome from snapped outcome prices, wipes derived analytics
  (snapshots, category stats, rebuildable positions), zeroes aggregates
  and marks every trader for re-analysis. Raw trades untouched.
- Static files now served with Cache-Control: no-cache in both hosts,
  plus ?v= cache-buster on app.js/style.css (stale browser JS masked
  earlier UI fixes).
- Watchlist hardened: endpoint null-safe, real Analytics.CopytradingScore,
  Platform field; repository includes Trader.Analytics; page shows a
  visible error row instead of staying silently blank.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 17:58:10 +02:00
Richard 1787422243 Fix: Implement FixPlan part A9, A10, B 2026-07-10 12:04:27 +02:00
Richard 7964194e9e Implement WinRate, Bankroll, Positions UI and add Trades30d to Analytics 2026-07-09 12:44:32 +02:00
Richard a4acd23a60 Fix worker pagination, apply Analytics fixes, add analyze backlog endpoint 2026-07-08 20:13:52 +02:00
Richard 4eb0d99b4e Fix Estimator scoring and PnL engine cashflow 2026-07-07 18:30:20 +02:00
Richard 8d056653f9 Fix EF Core ExecuteSqlRawAsync DBNull mapping error by using null instead of DBNull.Value 2026-07-07 13:06:27 +02:00
Richard 3105f6f28e Use raw SQL INSERT IGNORE for TradeRepository.AddRangeAsync to prevent DbUpdateException on duplicates 2026-07-07 13:01:31 +02:00
Richard 5ca50836a9 Fix DbUpdateException in TradeRepository and Polymarket API 400 on max offset 2026-07-07 12:23:37 +02:00
Richard 10eefd3546 Fix API offset limit 400 Bad Request, implement requested UI/UX improvements 2026-07-06 22:34:33 +02:00
Richard fb703b6c81 feat: Jobs infrastructure, endpoints, UI and worker prioritization 2026-07-06 19:58:23 +02:00
Richard d3fac35785 Fix EF Core shadow property mapping bug for TraderAnalytics 2026-07-05 20:14:23 +02:00
Richard c38b4d498f feat: add TradeContext, Subcategory and LastAnalyzedAt 2026-07-05 18:56:18 +02:00
Richard 8f6bce23f3 fix: filter unmapped trades from UI display 2026-07-05 15:01:54 +02:00
Richard c81e5638b5 fix: Resolve EF Core shadow property issue and increase migration timeout 2026-07-05 14:22:16 +02:00
Richard e9e9ce0d5a feat: Add category performance, update WebUI and OpenRouter integration, fix bugs 2026-07-05 14:13:16 +02:00
Richard d102af2965 Enhance UI, add AI integration, improve logging and database stats 2026-07-04 21:11:31 +02:00
Richard f8c8230d99 Implement A3, A4, A5, B3: Add MarketOutcomePriceSnapshot, implement Polymarket CLOB prices-history endpoint, improve strategy classification, introduce CopytradingScore, and decouple/optimize scoring pipeline into a separate worker 2026-07-03 11:20:28 +02:00
Richard e994e1ce72 Implement A1, A6, A2: Add TraderPosition entity, PositionPnLEngine (Average-Cost-Method), Market-level WinRate, and integrate with TraderAnalyticsWorker 2026-07-03 11:16:42 +02:00
Richard 5fe7ab63ac Fix B6: Market concurrency lock, watchlist exclusion from cleanup, optimized trade ID deduplication query, and TradeHistoryWorker sync logic 2026-07-03 11:10:53 +02:00
Richard 340bfdaa82 B1: EF Core migrations baseline validated against real dev DB
- Design-time AppDbContextFactory now builds its connection string via
  MySqlConnectionStringBuilder from PREDICTALYTICS_DB_* env vars instead of a
  hardcoded local default, so no secret needs to live in source/config to run
  migrations against any target database.
- InitialBaseline migration applied end-to-end against a fresh dev MySQL DB
  and confirmed via `dotnet ef migrations list`.
2026-07-03 10:30:13 +02:00
Richard afb251acfc Initial commit: Predictalytics solution
Clean Architecture .NET 8 solution (Domain/Application/Infrastructure/Api/Worker/WinFormsHost)
for analyzing Polymarket traders for copytrading/strategy-replication candidates.

Includes EF Core InitialBaseline migration and DB secrets removed from source/config
in preparation for version control.
2026-07-01 19:53:29 +02:00