hypothesis(minervini): add min_pct_from_high floor of 7% to avoid resistance stall

This commit is contained in:
Youssef Aitousarrah 2026-04-16 15:36:39 -07:00
parent 7d12a7abb3
commit ece89d27ff
2 changed files with 5 additions and 2 deletions

View File

@ -42,6 +42,7 @@ class MinerviniScanner(BaseScanner):
self.sma_200_slope_days = self.scanner_config.get("sma_200_slope_days", 20)
self.min_pct_off_low = self.scanner_config.get("min_pct_off_low", 30)
self.max_pct_from_high = self.scanner_config.get("max_pct_from_high", 25)
self.min_pct_from_high = self.scanner_config.get("min_pct_from_high", 7) # hypothesis
self.max_tickers = self.scanner_config.get("max_tickers", 0) # 0 = no cap
def scan(self, state: Dict[str, Any]) -> List[Dict[str, Any]]:
@ -202,6 +203,7 @@ class MinerviniScanner(BaseScanner):
price > sma_50, # 4. Price above SMA50
pct_off_low >= self.min_pct_off_low, # 5. At least 30% off 52w low
pct_from_high <= self.max_pct_from_high, # 6. Within 25% of 52w high
pct_from_high >= self.min_pct_from_high, # 7. Not already at resistance (≥7% below high)
]
if not all(conditions):

View File

@ -271,6 +271,7 @@ DEFAULT_CONFIG = {
"sma_200_slope_days": 20, # Days back to check SMA200 slope
"min_pct_off_low": 30, # Must be 30%+ above 52w low
"max_pct_from_high": 25, # Must be within 25% of 52w high
"min_pct_from_high": 7, # Must be at least 7% below 52w high (avoid resistance)
"max_tickers": 0, # 0 = no cap (nightly cache makes full universe fast)
},
"high_52w_breakout": {