fix(filter): deprioritize recent movers instead of dropping, exempt mean_reversion pipeline
- Change recent_mover_action default from "filter" to "deprioritize" so candidates that moved >10% in the past 7 days reach the ranker (with lowered priority + context annotation) rather than being silently dropped - Exempt mean_reversion pipeline candidates (rsi_oversold) from the recent-mover action entirely — stocks that pulled back hard are the signal, not a disqualifier Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bab7106d7d
commit
471030facc
|
|
@ -478,6 +478,14 @@ class CandidateFilter:
|
|||
cand["recent_move_status"] = reaction.get("status")
|
||||
|
||||
if reaction.get("status") == "lagging":
|
||||
# Mean-reversion candidates are expected to have moved — exempt them
|
||||
from tradingagents.dataflows.discovery.scanner_registry import SCANNER_REGISTRY
|
||||
source = cand.get("source", "")
|
||||
scanner_cls = SCANNER_REGISTRY.scanners.get(source)
|
||||
scanner_pipeline = getattr(scanner_cls, "pipeline", None)
|
||||
is_mean_reversion = scanner_pipeline == "mean_reversion"
|
||||
|
||||
if not is_mean_reversion:
|
||||
if self.recent_mover_action == "filter":
|
||||
filtered_reasons["recent_moved"] += 1
|
||||
change_pct = reaction.get("price_change_pct", 0)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ DEFAULT_CONFIG = {
|
|||
"filter_recent_movers": True, # Enable/disable filter
|
||||
"recent_movement_lookback_days": 7, # Days to check for recent moves
|
||||
"recent_movement_threshold": 10.0, # % change threshold
|
||||
"recent_mover_action": "filter", # "filter" or "deprioritize"
|
||||
"recent_mover_action": "deprioritize", # "filter" or "deprioritize"
|
||||
# Volume / compression detection
|
||||
"volume_cache_key": "default", # Cache key for volume data
|
||||
"min_market_cap": 0, # Minimum market cap in billions (0 = no filter)
|
||||
|
|
|
|||
Loading…
Reference in New Issue