MCPcopy Index your code

hub / github.com/Mrjie7205/serenity-bottleneck-hunter / functions

Functions83 in github.com/Mrjie7205/serenity-bottleneck-hunter

↓ 32 callersFunctionadd
(group, sev, where, msg)
scripts/verify_report.py:36
↓ 9 callersFunction_first
(chunk, pat)
scripts/verify_report.py:46
↓ 8 callersFunctionsection
(tag, inner)
scripts/render_report.py:136
↓ 7 callersFunctiong
(k)
scripts/price.py:170
↓ 6 callersFunctionmedian
(xs)
tracking/score_tracker.py:112
↓ 5 callersFunction_load_db
读全表 → dict[ticker -> row]
scripts/ticker_truth.py:33
↓ 5 callersFunctionapprox
(a, b, tol)
scripts/verify_report.py:43
↓ 5 callersFunctionfetch_history
按 EODHD → yfinance 顺序抓;返回 (data, provider) 或 (None, None)。
scripts/price.py:58
↓ 5 callersFunctionfmt
(x)
tracking/score_tracker.py:125
↓ 5 callersFunctionlookup_by_ticker
查 ground truth(无 API call)。返回 dict 或 None
scripts/ticker_truth.py:89
↓ 5 callersFunctionmoney
(s)
scripts/verify_report.py:38
↓ 4 callersFunctionanalyze
(symbol, days=400)
scripts/price.py:70
↓ 4 callersFunctionhist
(sym, days=400)
tracking/score_tracker.py:46
↓ 3 callersFunction_name_matches
统一的容差匹配(company_desc 块 + CSV 块共用,2026-06-XX 抽出避免两套标准)。 真错位(绿的谐波 vs 永新光学,无任何公共子串)仍会被拦;同公司不同写法(村田Murata vs 村田 MLCC、日月光ASE vs 日月光 ASE 封测、Eshallgo
scripts/verify_tickers.py:31
↓ 3 callersFunction_p
(path)
scripts/render_report.py:24
↓ 3 callersFunction_yf_valuation
(yf_symbol, info=None)
scripts/price.py:162
↓ 3 callersFunctioncol
(*names)
scripts/verify_report.py:280
↓ 3 callersFunctioncy
(tk)
scripts/render_report.py:25
↓ 3 callersFunctionmean
(xs)
tracking/score_tracker.py:107
↓ 2 callersFunction_eodhd_search
走 EODHD search API,返回 results list (Code, Name, Exchange, Type, previousClose ...)
scripts/ticker_truth.py:69
↓ 2 callersFunction_is_stale
判 entry 是否过期(> STALE_DAYS)
scripts/ticker_truth.py:57
↓ 2 callersFunction_redteam
(ra, kill, fb="")
scripts/render_report.py:92
↓ 2 callersFunction_save_db
保存全表
scripts/ticker_truth.py:45
↓ 2 callersFunctionbadge
(v, tier)
scripts/render_report.py:82
↓ 2 callersFunctionfull_scan
(sym)
tracking/_full_scan.py:10
↓ 2 callersFunctionhit_rate
(xs)
tracking/score_tracker.py:120
↓ 2 callersFunctionindex
按 ticker 建索引,full(MTRN.US)和 base(MTRN)都做 key
scripts/verify_report.py:49
↓ 2 callersFunctionlookup_map
(d, tk)
scripts/verify_report.py:58
↓ 2 callersFunctionmarket_of
(sym)
tracking/score_tracker.py:57
↓ 2 callersFunctionret_since
(rows, date_str)
tracking/score_tracker.py:72
↓ 2 callersFunctions
(v)
scripts/render_report.py:62
↓ 2 callersFunctionyoy
(metric)
scripts/price.py:145
↓ 1 callersFunction_ak_forecast
()
scripts/price.py:118
↓ 1 callersFunction_ak_valuation
(code, last=None)
scripts/price.py:125
↓ 1 callersFunction_cn_stage
(S, tid)
scripts/render_report.py:114
↓ 1 callersFunction_cnode
(S, n, node_desc, snap)
scripts/render_report.py:117
↓ 1 callersFunction_fetch_eodhd
(symbol, days=400)
scripts/price.py:24
↓ 1 callersFunction_fetch_yf
(symbol, days=400)
scripts/price.py:40
↓ 1 callersFunction_write_fp
(spec, S)
scripts/render_report.py:166
↓ 1 callersFunctioncand_ticker
(chunk)
scripts/verify_report.py:98
↓ 1 callersFunctioncard
(S, x)
scripts/render_report.py:97
↓ 1 callersFunctionchain_viz
(S, spec)
scripts/render_report.py:126
↓ 1 callersFunctioncheck_candidates
(html, scan_by, fp_by)
scripts/verify_report.py:102
↓ 1 callersFunctioncheck_hygiene
(html)
scripts/verify_report.py:215
↓ 1 callersFunctioncheck_sections
(html)
scripts/verify_report.py:78
↓ 1 callersFunctioncheck_status
(html, today, N)
scripts/verify_report.py:193
↓ 1 callersFunctioncheck_styled
(html)
scripts/verify_report.py:241
↓ 1 callersFunctionclose_on_or_after
(rows, date_str)
tracking/score_tracker.py:65
↓ 1 callersFunctioncompute_theme_status
根据 stage 分布判定主题状态。 优先级(从高到低): 1. 多数 early 或 basing-momentum → 🔥 active(含早期启动场景) 2. 多数 ext → 🌡️ mature 3. 多数 cool(且无启动信号)→ ❄️ cooled
tracking/cross_theme_scan.py:84
↓ 1 callersFunctionfetch_etf_holdings
从 stockanalysis.com 拉 ETF top 25 持仓。 返回 [(ticker, name, weight_pct), ...] 列表
scripts/theme_etf_coverage.py:26
↓ 1 callersFunctionfind_scan
(html, explicit)
scripts/verify_report.py:259
↓ 1 callersFunctionfired_invalidation
默认规则:跌幅>15% 且 1m 转负。bespoke rule(invalidation 列)v1 暂只标注留人读。
tracking/score_tracker.py:100
↓ 1 callersFunctionfirst_pullable
(cands)
tracking/score_tracker.py:88
↓ 1 callersFunctionfull
(sym)
tracking/_scan_agent_cn.py:9
↓ 1 callersFunctionfull
(sym)
tracking/_scan_agent.py:8
↓ 1 callersFunctionget_staged_files
git diff --cached --name-only
scripts/verify_tickers.py:174
↓ 1 callersFunctionis_eligible
判定该行是否纳入跨主题计数。
tracking/cross_theme_scan.py:34
↓ 1 callersFunctionjustify
二轴判定的第二轴:这波涨基本面跟不跟得上 → 区分「贵但对(动量龙头)」vs「真贴顶(纯重估)」。 输入 scan 字段:rng + ret_3m + forward_pe/trailing_pe/peg/eps_growth/rev_growth + rs_rank/rs_total。
scripts/render_report.py:29
↓ 1 callersFunctionlayer
(lid,label,small,nodes)
scripts/render_report.py:128
↓ 1 callersFunctionload_existing_coverage
读 forward_picks.csv,返回该主题已覆盖的 ticker set
scripts/theme_etf_coverage.py:61
↓ 1 callersFunctionload_fp
(path)
scripts/verify_report.py:274
↓ 1 callersFunctionload_scan
(path)
scripts/verify_report.py:346
↓ 1 callersFunctionlookup_by_name
按 name(中或英)查 ground truth。返回 list of dict
scripts/ticker_truth.py:95
↓ 1 callersFunctionmain
()
scripts/theme_etf_coverage.py:76
↓ 1 callersFunctionmain
()
scripts/verify_tickers.py:185
↓ 1 callersFunctionmain
()
scripts/verify_report.py:294
↓ 1 callersFunctionmain
()
tracking/check_desc_freshness.py:18
↓ 1 callersFunctionmain
()
tracking/score_tracker.py:129
↓ 1 callersFunctionmain
()
tracking/cross_theme_scan.py:122
↓ 1 callersFunctionmerged_row
(m)
scripts/render_report.py:109
↓ 1 callersFunctionrender
(spec)
scripts/render_report.py:138
↓ 1 callersFunctionresolve_tickers
**强制工作流改造 API** — 输入 names(中文公司名 list)→ 走 EODHD search → 输出 [(ticker, name_zh, name_en), ...] 已验证清单。 miss → API search 新增到 ground truth
scripts/ticker_truth.py:168
↓ 1 callersFunctionret_1m
(rows)
tracking/score_tracker.py:82
↓ 1 callersFunctionruler
(S, tk)
scripts/render_report.py:71
↓ 1 callersFunctionscan_file
扫单个文件,返回 (mismatches, warnings) lists SKIP 机制: - 文件首 500 字符内含 'ticker-verify: skip' → 跳过(文档/示例文件用) - 路径里含 _scan_*.json / _etf_audit_*.json
scripts/verify_tickers.py:60
↓ 1 callersFunctionscls
(r)
scripts/render_report.py:27
↓ 1 callersFunctionsplit_candidates
(html)
scripts/verify_report.py:93
↓ 1 callersFunctionstage_bucket
把 entry_stage 文本桶化为 early / ext / basing-momentum / cool / seed / other。 桶定义(2026-06-01 加 basing-momentum,修复物理 AI 主题被误判 cooled 的 bug): - seed
tracking/cross_theme_scan.py:55
↓ 1 callersFunctionvbucket
(v)
tracking/score_tracker.py:95
↓ 1 callersFunctionverify_pair
**核心验证 API** — 检查 (ticker, claimed_name) 是否匹配 ground truth。 返回 (ok: bool, reason: str) - 命中且 name 匹配 → (True, "ok") - 命中但 name 不匹配 → (Fals
scripts/ticker_truth.py:108
↓ 1 callersFunctionword
(r)
scripts/render_report.py:26
Function_name_matches
(c, tz, te)
scripts/verify_report.py:25
Functionvaluation
多源估值:A股(.SS/.SZ/.SHG/.SHE 或 6 位数)→ akshare,缺字段 yfinance 兜底;美股/海外 → yfinance。 传 last(现价)供 A股算 forward。返回含 src 标来源,便于报告标注与交叉验证。
scripts/price.py:184