T09 · Insecure Skill Coding Practices
- Location
trader.py:218- Finding
Minimum Market Volume Safeguard Is Declared but Never Enforced
- Content
View full analysis
tuple[bool, str]: """Standard market quality gates.""" p = getattr(market, "current_probability", None) if not isinstance(p, (int, float)): return False, "missing probability" spread_cents = getattr(market, "spread_cents", None) if isinstance(spread_cents, (int, float)) and spread_cents / 100 > MAX_SPREAD: return False, f"Spread {spread_cents/100:.1%} > {MAX_SPREAD:.1%}" resolves_at = getattr(market, "resolves_at", None) if resolves_at: try: resolves = datetime.fromisoformat(resolves_at.replace("Z", "+00:00")) days = (resolves - datetime.now(timezone.utc)).days if days < MIN_DAYS: return False, f"Only {days} days to resolve" except Exception: pass return True, "ok" ``` ### Technical Analysis `SIMMER_MIN_VOLUME` is documented as a minimum market-volume filter, loaded into the application, and displayed at runtime. Nevertheless, neither `valid_market()` nor `compute_signal()` reads a market-volume field or compares it with `MIN_VOLUME`. This discrepancy creates a false security expectation. A market can pass all implemented checks even if it has negligible liquidity. The spread check is not an adequate substitute for a volume or liquidity chec ...[truncated 1069 chars]- Remediation
View remediation
