Fix: ALPHA-INSIDER received every alert and never placed an order - #15
Open
mpont91 wants to merge 1 commit into
Open
Fix: ALPHA-INSIDER received every alert and never placed an order#15mpont91 wants to merge 1 commit into
mpont91 wants to merge 1 commit into
Conversation
Four gates in sequence, each silent. Alerts carried no token_id, so the strategy could not name what to buy. NEW_ACCOUNT_WHALE set direction from the side rather than the outcome. determineAction read direction as a side, mapping NO to SELL and returning null for any other label. And no strength was emitted, so every signal took the 0.5 default and fell under the 0.6 minimum.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fund polls
aware_alerts, finds them, and trades nothing. Four gates in sequence, none of which logs above debug except the first.1. No token to trade. The detector writes
market_sluganddirectionbut never atoken_id, andInsiderFollowStrategycannot place an order without knowing which outcome token to buy:The alerts now carry one, resolved in a single batch query per run from the (market_slug, outcome) pairs they name. Markets whose outcomes are not labelled Yes/No — a sports market names the teams — fall back to the outcome index, where 0 is YES/UP and 1 is NO/DOWN. An outcome with no trades on record resolves to nothing and the alert goes out without a token, which the strategy skips rather than guessing.
2. NEW_ACCOUNT_WHALE named a side, not an outcome. It set
directionfromargMax(side, total_bet), so 872 alerts carried BUY or SELL.InsiderAlert.directionis documented as"YES" or "NO"and everything downstream reads it as the outcome. It groups onoutcomenow.3.
determineActionread the direction as a side. Wrong in both directions:"NO"mapped to SELL, when following someone entering the No outcome means buying the No token; and anything outside six hardcoded words returned null, so every alert on a team-named market was discarded as "could not determine action". The action comes from the alert type now, which is what actually separates an entry from an exit — the outcome is already pinned bytoken_id.4. No strength, so everything was filtered.
ActiveFundExecutor.validateSignaldrops a signal whosestrengthis belowconfig.minStrength, whichforInsiderStrategysets to 0.60. The detector never emitted the field, so every signal took the consumer's 0.5 default and failed the check — at debug level, so the fund looked like it was accepting alerts and simply choosing not to act.Derived from severity, whose levels already state how actionable each is: LOW is "interesting but not actionable" and MEDIUM "worth monitoring", so both stay under the bar; HIGH is "consider following" and CRITICAL "act quickly", so both clear it.
After
Seven executions in the first ten minutes.