技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
quick-event-etf-study【数据与研究】Event-driven concept ETF research: start from a concept or event, identify related stocks, build a market-cap-weighted ETF index, analyze market-cap changes around the event window, and produce an interactive HTML dashboard. Use when the user asks about concept stocks, concept ETFs, event-driven analysis, or event studies. Triggers on: mentions of ho…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
600519.SH / 0700.HKreferences/common_pitfalls.md in full, then self-check against the checklist at the end before delivery.query, language, event_date_source, generated_at, price_adjustment, market, data_source, and constituent_snapshot in the code configuration block. Resolve language to a concrete "zh" or "en" string from the query text (CJK detection) before hard-coding it. Do not let reruns of the same study update these values automatically.references/concept_research.md for methodology.raw/ -> compute daily market cap.
start_date = 3-5 trading days before the reference date; end_date = 2-3 trading days after the user's focus window.references/export_event_results.py to produce 3 standard data files plus 1 reproducibility manifest. Always pass market ("china_a" or "us") and generated_at.references/render_event_dashboard.py to read the standard files and produce an HTML dashboard. Use assets/dashboard_template.html as the shell template. See "Dashboard Chart Selection" below for choosing modules.report.md; it must include ## Assumptions and ## Known Limitations.references/validate_event_outputs.py -> reconcile numbers -> complete the pitfalls checklist.report.md + PNG files + HTML dashboard.| File | When to read it |
|---|---|
references/common_pitfalls.md | Required reading, first step for every task |
references/concept_research.md | When identifying concept stocks or searching for related companies |
references/dashboard_schema.md | When generating or customizing the HTML dashboard |
references/export_event_results.py | Call when exporting standard files |
references/render_event_dashboard.py | Call when generating the dashboard |
references/validate_event_outputs.py | Validate before delivery |
references/event_study_template.py | Skeleton for writing analysis code |
Write 4 files to the cwd, using the concept name as the prefix (e.g. ai_chip):
| File | Content |
|---|---|
<prefix>_prices.csv | Daily constituent prices and market caps:date, ticker, name, close, market_cap, tier |
<prefix>_portfolio.csv | Daily ETF NAV and total market cap:date, mcap_weighted_nav, equal_weighted_nav, total_market_cap |
<prefix>_summary.json | Summary metadata + statistics + constituent list |
<prefix>_run_manifest.json | Reproducibility manifest: input hashes, parameters, dependency versions, output hashes |
generated_at must be passed explicitly and reused for reproducible reruns.language must be resolved to "zh" or "en" and hard-coded in the configuration block.pre_event_date, anchored at 100.ffill_before_pct_change.<prefix>_constituents_sources.csv.assets/dashboard_template.html as the shell template.<prefix>_dashboard.html.include_modules parameter. Available modules:| Module ID | Chart Content | Suggested Scenario |
|---|---|---|
overview | KPI cards + main NAV curve + drawdown | Required |
nav | Market-cap-weighted vs equal-weighted NAV dual-line | When comparing weighting methods |
weight | Tier-colored weight donut | When many constituents or uneven weights |
impact | Per-stock event-day/peak/latest return bars | When analyzing stock-level reactions |
mcap | Sector total market-cap trend area | When focusing on sector value changes |
table | Constituent detail table | Required |
Selection guidance:
["overview", "nav", "weight", "impact", "mcap", "table"]["overview", "nav", "table"]["overview", "weight", "impact", "table"]["overview", "nav", "mcap", "table"]Market-aware colors: China A-shares (china_a) use red up/green down; US equities (us) use green up/red down.
| Market | Up | Down |
|---|---|---|
china_a | #ef5350 | #26a69a |
us | #26a69a | #ef5350 |
raw for market-aware coloring.#3b82f6, orange #f97316, purple #8b5cf6.#3b82f6, T2 #60a5fa, T3 #93c5fd.#ef4444 with white label on red background.custom_html Constraintses-custom- prefix.language.FontProperties(fname="/System/Library/Fonts/Supplemental/Arial Unicode.ttf").<prefix>_<name>.png, dpi=150.report.md must include:
## Assumptions: event-date source, reference-date choice, constituent criteria, weighting method, share basis, window length, price-adjustment method.## Known Limitations: survivorship bias, data coverage, excessive single-stock weight, market-cap calculation basis, and event expectations priced in before the official event date.Options/derivatives pricing, live trading, deep single-stock fundamental analysis, and cross-market arbitrage.