Use stk CLI to generate Chinese stock analysis reports oriented toward daily monitoring. The core goal is to answer: which tickers need attention today, why, and where the risk levels are.
Load materials
- When command parameters or field contracts need to be confirmed, read
references/commands.md。 - When the meaning of technical indicators or auxiliary factor metrics needs to be explained, read
references/indicator-guide.md; it only explains indicators and does not define trading signals. - When the final report needs to be written, first read
templates/README.md, then read the templates undertemplates/according to the analysis scenario. - When DailyReport needs to be executed, read
workflow/daily-report.md, and generate and write to Obsidian according to the workflow.
Core definitions
-
Primary signals: two types, trend resonance and oversold repair, with complete daily line confirmation.
-
Scan scope: signals, auxiliary factors, volume and risk control use only confirmed complete daily lines; pre-market and intraday use the previous trading day, and only after the post-market confirmation buffer time has passed is the current day's daily line included.
-
Real-time quotes:
last、change_pct、sourceis only used to display the current price status and does not participate in signal strength or volume-price confirmation. -
Live scan:
scan-liveis an independent alert mode; first use complete daily line signals for underlying filtering, then use complete 5m/15m K-lines to output实时跟随、实时转弱、实时过热; do not interpret it as a new daily linedecision。 -
Valid window: an EMA crossover or Supertrend flip occurred within the most recent 3 K-lines, and the direction is consistent.
-
Batch scan: only expand
MonitorResult.focus;观察tickers only countignored.no_signal_count。 -
Single-ticker interpretation: draw conclusions with
decision, provide basis withprimary_signal, and supplement withcontextandrisk. -
decision.signalA value of趋势买入、趋势退出、超卖修复、观察。 -
decision.strengthindicates strength or weakness, and a value of强信号、普通信号、观察。 -
Auxiliary factors read
context.factors[].stateandcontext.factors[].metrics; default scan results have omitted theneutral/nonefactor, and for a complete review add to the command--full-context。 -
daily10is not returned by default; only after the command explicitly passes--daily10may strong-signal tickers include the most recent 10 compressed complete daily lines. -
Exit-type signals only indicate position reduction, exit, or risk warning, and do not express short-selling recommendations.
-
观察by default will not enter batch scanfocus; in single-ticker interpretation it is also only used as a risk, opportunity, or volatility hint, and is not written as a buy, sell, or add-position recommendation. -
For exit-type signals,
risk.stop_lossis the upper invalidation line, andrisk.take_profitis the downside risk reference. -
Signal strength:
强信号requires trend quality or repair quality, auxiliary attitude, and risk-reward ratio to all meet the standard;普通信号means the basic conditions are met;观察means invalid, expired, conflicting, insufficiently confirmed, or insufficient risk-reward ratio.
Analysis steps
Analyze according to a fixed chain of evidence, avoiding merely restating fields.
- First look at the inclusion reason:
focusrepresents needing attention; non-focusis not expanded, andignored.no_signal_countis not interpreted as negative fundamentals. - Start with the conclusion: use
decision.signal、strength、signal_statusto determine today's processing intent, strength, and signal source. - Verify the primary signal: use
primary_signal.ema_cross、ema9/ema26、supertrend_direction、reasonsto explain the trigger source; the smallerbars_since_signalis, the fresher the signal. - Check the auxiliary factors: count the number and names of
context.factorsinconfirming、conflicting、risk、opportunity, then read the correspondingmetricsto give the reason. - Review strong-signal instruments: when there is
daily10, check whether the price over the last 10 days is close to the signal day, whether volume confirms, whether RSI/J is overheated, whether the BOLL position is too high, and whether ATR risk is amplified. - Give execution boundaries: finally use
risk.stop_loss、take_profit、risk_reward_ratio、risk_levelto judge whether it is worth tracking; for longs write stop-loss/take-profit, for shorts write the upper invalidation line/downside reference, and when the risk-reward ratio is poor, downgrade the conclusion to watch.
Indicator interpretation conventions
- For detailed indicator meanings read
references/indicator-guide.md; this section only retains the report convention boundaries. - Indicators are used to explain trend, momentum, volatility, volume, and risk status, and do not independently generate trading conclusions.
context.overall_bias=supportive: the auxiliary factors overall support the primary direction, which can reinforce the conclusion.mixed: the signal can be watched, but it needs to wait for price or volume to continue confirming.risky: the direction is not necessarily wrong, but there are risks such as overheating, shrinking volume, narrowing Bollinger Bands, and weak capital flow, so avoid chasing highs.conflicting: the auxiliary factors clearly conflict, so even if the primary signal holds, the wording strength should be reduced.decision.signal=观察ordecision.strength=观察: not expanded in batch scans; in single-instrument interpretation, only explain the reason for the risk or opportunity, and ifbars_since_signalis very large or empty, explicitly write it as a stale trend/left-side observation.RSIserves only as momentum temperature and does not independently produce buy or sell recommendations; in longs,50-70is healthier,>70leans toward high chasing risk, and<45indicates insufficient momentum.ADXserves only as a trend strength hint;<20indicates the trend is weak and the signal is more prone to fluctuation, while>=25indicates better trend quality.KDJ Jis used to observe short-term overheating or钝化; an extremely high J value is a risk of chasing gains and does not directly negate the trend.MFIshould be interpreted together with direction: in longs, strong MFI is confirmation, and in shorts, weak MFI is confirmation; extreme overbought/oversold should be prioritized as a risk or opportunity hint.divergenceis MACD histogram divergence. Top divergence is a risk of trend deceleration, and bottom divergence is a left-side opportunity hint; neither can replace the primary signal.boll.position_pctapproaching the upper band indicates strength but increased risk of chasing highs, while approaching the lower band indicates weakness or a repair opportunity; whenbandwidth_pctis very low, prioritize writing volatility convergence and waiting for volume to choose direction.volume_price.volume_ratio_5dUse complete daily turnover to confirm breakout quality; same-direction volume expansion is better than same-direction volume contraction, and reverse-direction volume expansion should be listed as a risk.
Typical trigger phrasings
| User phrasing | Trigger mode |
|---|---|
| "How is the market today", "What important news is there" | Market overview |
| "Is there any hotspot", "Help me find a few with good technical patterns" | Technical hotspots |
| "Does Moutai have a signal", "How do you view 600519" | Individual stock signal analysis |
| "How are my holdings/watchlist", "Check the ETF group" | Group daily monitoring |
| "Did intraday/live trading trigger?", "Help me keep an eye on my watchlist" | Live trading alerts |
| "Daily Report", "Trading Daily Report", "DailyReport", "Save to Obsidian" | DailyReport |
| "Daily Report + Stock Picks/Hotspots/Candidates" | DailyReport → Technical Hotspots |
Mode Selection
| User Intent | Mode | Main Commands |
|---|---|---|
| Daily Report, Market, Market Action, News | Market Overview | stk market + stk market news --count 20 |
| DailyReport, Trading Daily Report, Daily Review, Save to Obsidian | DailyReport | stk market + stk market news --count 20 + stk watchlist scan <group> |
| Hotspots, Stock Picks, Technical Patterns, Add to Pool | Technical Hotspots | stk stock hotspot + stk stock candidates + stk stock scan |
| Analyze a certain stock, Are there any signals | Individual Stock Signal Analysis | stk stock scan <symbol> + Optional kline / fundamental |
| Watchlist, Group, Positions, Daily Monitoring | Group Daily Monitoring | stk watchlist scan <group> |
| Intraday, Live Trading, Watch the Market, Trigger Alerts | Live Trading Alerts | stk stock scan-live <symbols...> or stk watchlist scan-live <group> |
When the user requests DailyReport, by default only perform "Market Overview + Group Daily Monitoring"; only append Technical Hotspots when "stock picks, hotspots, candidates" are explicitly mentioned.
Mode Details
Market Overview
Use templates/market-hotspot-analysis.md。
Run in parallel:
stk marketstk market news --count 20
Output: one-sentence market status, market temperature of three regions, 3 important news items, strong directions, risk directions.
DailyReport
Read workflow/daily-report.md, execute according to the workflow: fetch data, analyze, call scenario templates, assemble Obsidian Markdown, write to 14_Trading/DailyReport/{YYYY-MM-DD}.md。
Rules:
- When no group is specified, first extract the group name from the user context; if still unable to determine, run
stk watchlist listthen let the user choose. - Scan results of multiple groups are merged into the same DailyReport, and the group name column is retained.
- For the same trading day, the file is updated by
YYYY-MM-DD.md, without creating duplicate copies. - By default, Technical Hotspots are not included; when the user explicitly requests "hotspots/stock picks/candidates", append the Technical Hotspots section.
- DailyReport only expands
focus, and for watch targets only statistics are written.
Technical Hotspots
Use templates/market-hotspot-analysis.md。
First run in parallel:
stk stock hotspotstk stock candidates
Then run for candidate stocks stk stock scan <code1> <code2> .... Only treat MonitorResult.focus as key candidates; if focus is empty, explicitly state "the candidate pool currently has no trend confirmation signals".
Individual Stock Signal Analysis
Prioritize running stk stock scan <symbol>. If the user needs an explanation of the signal source or fundamentals, then supplement in parallel:
stk stock kline <symbol>stk stock fundamental <symbol>
The conclusion must first give decision.signal、decision.strength、signal_status and whether it enters focus. When it has not entered focus , do not force buy or sell recommendations.
If the user analyzes multiple stocks at once, use templates/multi-stock-deep-comparison.md, compare signal quality, auxiliary attitude, and risk control in a table, without expanding long paragraphs for each stock.
If only analyzing a single stock, output a short table according to the "Analysis Steps": conclusion, primary signal, auxiliary confirmation, risk conflict, and risk control boundaries.
Live Trading Alerts
When the user explicitly requests intraday, live trading, market watching, or trigger alerts, use scan-live. First look at focus, do not expand ignored targets; the conclusion must distinguish between daily-level background and live trading triggers:
daily_signal/daily_strengthis the daily-level background.live_signalis an intraday alert and does not rewrite the daily-leveldecision。risk_lineis the minute-level trigger invalidation line or observation line.volume_ratiois the minute-level K-line turnover comparison, which is not equivalent to the daily linevolume_price.volume_ratio_5d。
Group daily monitoring
Use templates/group-signal-tracking.md。
Run stk watchlist scan <group>, only expand focus。
Group name parsing: directly extract the group name from the text and scan ("ETF group" → "ETF", "semiconductor analysis group" → "semiconductor"); when scanning fails, stk watchlist list find similar groups and retry; only when the user has not provided a group name, list them for selection.
Reporting rules
- Use Chinese, lead with the conclusion.
- Reports are concise by default: first give a 1-2 sentence conclusion, then present the results in a table.
- Analysis of multiple stocks must use a table, not long paragraphs for each stock; only expand on a single security when the user explicitly requests a detailed breakdown.
- Key numbers and judgment fields include:
signal、strength、signal_status、bars_since_signal、stop_loss、take_profit、risk_reward_ratio。 - Directional views must cite fields or values; avoid writing only "trend is good/bad".
- Reports can be saved to
~/.stk/reports/and written viaobsidian-knowledgeto14_Trading/DailyReport/{YYYY-MM-DD-[report-name]}.md。
Error handling
- Single stock failure: record it in the report and continue processing other securities.
- Mass failures: run
stk doctor checkto troubleshoot the data source. - Cache anomalies: run
stk cache clearand then retry.