T09 · Insecure Skill Coding Practices
- Location
scripts/screen.py:10- Finding
Documented Financial-Risk Controls Are Not Implemented
- Content
View full analysis
ma15: trend += 0.5 if ma15 > ma60: trend += 0.5 # MACD近似 macd_s = 0.3 if gain5 > 3 else (0.1 if gain5 > -3 else 0.0) # 量比 avg_v = sum(vols[-5:]) / 5 vr = vols[-1] / avg_v if avg_v > 0 else 1.0 vol_s = 1.0 if vr >= 1.3 else (0.5 if vr >= 0.8 else 0.0) # 涨幅过滤 gain_s = 1.0 if gain5 >= 1 else (0.5 if gain5 >= 0 else 0.0) total = trend * 0.30 + macd_s * 0.25 + vol_s * 0.20 + gain_s * 0.25 ``` ```python if scored["total"] >= THRESHOLD: results.append(scored) ``` ```python stocks = [ {"code": s["symbol"], "name": s["name"], "price": float(s.get("trade", 0) or 0), "change_pct": float(s.get("changepercent", 0) or 0), "turnover": float(s.get("turnover", 0) or 0)} for s in raw if s.get("name") and "ST" not in s.get("name", "") and 0 < float(s.get("trade", 0) or 0) < 500 and not s.get("symbol", "").startswith("bj") ] ``` ### Technical Analysis The Skill documentation states that the quantitative screening stage enforces market-capitalization limits and evaluates five equally weighted dimensions: market capitalization, trend momentum, five-day average turnover, MACD, and chip distribution. It also documents hard exclusions based on listing age, profitability, debt, and other ...[truncated 3276 chars]- Remediation
View remediation
