| name | daily-stock-analysis |
| description | AUTO-INVOKE for fast technical scans and market briefs. Triggers: scan TICKER (or 扫 TICKER, quick TICKER) for single/multi quick analysis; port health (or port-health, 持仓健康) for batch portfolio scan; market brief HK/US (or brief HK/US, 市场简报 HK/US) for index+sector overview. Output is a DSA-style 决策看板 / 市场简报 emitted on stdout for you to deliver. |
MANDATORY ROUTING RULES
These are hard rules with no exceptions. When the user's message matches any of these patterns (case-insensitive), you MUST invoke this skill immediately using the execute_code tool. Do NOT browse the web, do NOT analyze stocks yourself, do NOT use other skills — these scripts produce the full report themselves and print it between stdout markers for you to deliver.
| User's message pattern | Script to run | Notes |
|---|
scan TICKER [TICKER ...], 扫 TICKER, quick TICKER | dsa_scan.py TICKER ... | 1–8 tickers; ~1–3 min each |
port health, port-health, 持仓健康, 持仓体检, 健康扫描 | dsa_port_health.py | reads portfolio_truth.json, ~5–10 min total |
market brief HK, brief HK, 市场简报 HK, 港股简报 | dsa_market_brief.py HK | ~30 s |
market brief US, brief US, 市场简报 US, 美股简报 | dsa_market_brief.py US | ~30 s |
OUTPUT RULE: Every script prints __REPORT_START__ ... __REPORT_END__ to stdout. The text between the markers IS the full DSA-style report (plus a trailing DONE:/FAILED: status line) — your job is to reply with that text verbatim so the user receives the report on your reply channel. Do NOT paraphrase, summarize, or add commentary.
Trigger word disambiguation
- Exact
port → use the existing portfolio-report skill (live P&L). NOT this skill.
port health / 持仓健康 → THIS skill (dsa_port_health.py).
ta TICKER / research TICKER / 研究 TICKER → use the existing trading-agents-research skill (~5 min deep multi-agent analysis). NOT this skill.
scan TICKER / quick TICKER → THIS skill (~1–3 min light technical scan).
- The two are complementary: use
scan for daily monitoring, ta for high-conviction deep dives.
How to invoke
1. Single or multi ticker quick scan
User says: scan NVDA MSFT
Run via execute_code:
import subprocess, sys
result = subprocess.run(
[
"{{DSA_VENV_PYTHON}}",
"{{SKILLS_DIR}}/finance/daily-stock-analysis/scripts/dsa_scan.py",
"NVDA", "MSFT",
],
capture_output=True, text=True, timeout=900,
)
print(result.stdout)
sys.stderr.write(result.stderr)
2. Portfolio batch health scan
User says: port health
import subprocess, sys
result = subprocess.run(
[
"{{DSA_VENV_PYTHON}}",
"{{SKILLS_DIR}}/finance/daily-stock-analysis/scripts/dsa_port_health.py",
],
capture_output=True, text=True, timeout=1800,
)
print(result.stdout)
sys.stderr.write(result.stderr)
3. Market brief
User says: brief US
import subprocess, sys
result = subprocess.run(
[
"{{DSA_VENV_PYTHON}}",
"{{SKILLS_DIR}}/finance/daily-stock-analysis/scripts/dsa_market_brief.py",
"US",
],
capture_output=True, text=True, timeout=300,
)
print(result.stdout)
sys.stderr.write(result.stderr)
Validation
Look at the tool result. It MUST contain __REPORT_START__ and __REPORT_END__ with non-empty body between them.
- If markers exist → reply ONLY with the text between markers, verbatim. That text is the full DSA-style report the user is waiting for.
- If markers are missing → reply ONLY:
ERROR: daily-stock-analysis script failed to produce output. Check stderr. Do NOT fabricate analysis.
Model routing
| Profile | Primary | Fallback | Used by |
|---|
fast_scan | deepseek-v4-pro via AISA gateway (always reasons) | gemini/gemini-2.5-flash (thinking off) | dsa_scan.py, dsa_port_health.py, dsa_market_brief.py |
Configured inside _dsa_lib.get_router(). No environment overrides needed.
Routing decision (2026-04-30, user spec): T1/T2/T3 all use deepseek-v4-pro as
primary, gemini-2.5-flash as fallback. Quality first — DeepSeek-v4-pro provides
the strongest structured-output calibration and Chinese financial reasoning.
Gemini is a free-tier safety net (limited to 20 requests/day) for when the
AISA gateway (which serves the DeepSeek models) is unreachable.
Resources
- Scripts:
{{SKILLS_DIR}}/finance/daily-stock-analysis/scripts/
- Shared lib:
_dsa_lib.py (model routing, yfinance, formatting, report markers)
- Venv:
{{DSA_VENV}}/
- Reference:
{{DSA_REPO_DIR}}/ (cloned DSA repo, kept as prompt-design reference)
- Holdings:
{{PORTFOLIO_DIR}}/portfolio_truth.json (read-only)
Hard guarantees
- Never modifies
portfolio_truth.json or any portfolio data file.
- Uses an isolated venv at
{{DSA_VENV}}/; cannot affect Hermes's own Python environment.
- Falls back to DeepSeek if Gemini is unreachable.
- Does NOT include A-share coverage; tickers like
600519/000001 will return "no data" and be skipped.