fix: reduce false positives in movers and arbitrage detection#12
Conversation
|
@vaisd is attempting to deploy a commit to the Victor's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for all the work on this. Tightening the current heuristics definitely moves things in the right direction, and I appreciate the effort to reduce false positives in both movers and arbitrage detection. One thought for a follow-up PR: instead of continuing to tune keyword overlap thresholds, we may want to try a more semantic matching approach for cross-platform market pairing. Happy to collaborate on that whenever you have bandwidth. A few concrete options worth exploring: Option A: BM25 / lexical ranking
Option B: Small embedding model
Option C: Hybrid
A couple of related improvements that would help regardless of direction:
My suggestion would be to track the semantic matching work as a separate follow-up, so we can experiment against a batch of real false positives and false negatives before committing to a specific approach. |
This PR fixes false positive issues in the movers and arbitrage detection systems by tightening similarity criteria and improving price change accuracy.
Changes Made
arbitrage-detector.ts:
arbitrage.ts:
price-snapshots.ts:
movers.ts:
arbitrage-detector.test.ts:
Tradeoff
The price change normalization in computePriceChange() has a chance to understate real moves that happen quickly within a short window. This tradeoff is intentional to reduce false positives from sparse snapshot timing, where uneven intervals could otherwise inflate what looks like movement.