aipa-research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

aipa-research

aipa-research

Developed by AIPriceAction. More data and documentation at https://aipriceaction.com
由AIPriceAction开发。更多数据和文档请访问 https://aipriceaction.com

What is aipa

什么是aipa

aipa
is an AI-powered financial analysis CLI for Vietnamese stocks, cryptocurrencies, and global assets. The
deep-research
command runs a multi-agent pipeline that produces comprehensive market reports far more thorough than single-ticker analysis.
aipa
是一款AI驱动的金融分析CLI工具,支持越南股票、加密货币及全球资产分析。
deep-research
命令运行多Agent流水线,生成的市场报告比单只股票分析详尽得多。

Installation

安装

Use
uvx
— it always pulls the latest version from PyPI automatically. No install step needed.
bash
undefined
推荐使用
uvx
——它会自动从PyPI拉取最新版本,无需安装步骤。
bash
undefined

Preferred: uvx (always up-to-date, no install needed)

首选:uvx(始终保持最新,无需安装)

uvx aipa-cli deep-research
uvx aipa-cli deep-research

Fallback: pip (if uv is not available)

备选:pip(若uv不可用)

pip install aipa-cli aipa deep-research
pip install aipa-cli aipa deep-research

Last fallback: system pip (if pip fails due to PEP 668)

最后备选:系统pip(若pip因PEP 668安装失败)

python3 -m pip install aipa-cli --break-system-packages aipa deep-research

All command examples in this skill use `aipa` for brevity. Replace `aipa` with `uvx aipa-cli` if not installed globally.
python3 -m pip install aipa-cli --break-system-packages aipa deep-research

为简洁起见,本技能中的所有命令示例均使用`aipa`。若未全局安装,请将`aipa`替换为`uvx aipa-cli`。

Keeping the CLI Updated

保持CLI更新

The aipa CLI is actively developed with frequent improvements. Always prefer
uvx aipa-cli
over
aipa
. When using
uvx
:
  1. Use plain
    uvx
    for fast cached execution:
    uvx aipa-cli deep-research
  2. Fallback on failure — if a command fails with a schema or missing argument error, retry with
    @latest
    :
    uvx aipa-cli@latest deep-research
If
aipa
is installed globally via
pip
, update before each session:
bash
pip install --upgrade aipa-cli
The agent should prefer
uvx aipa-cli
for all commands. Only fall back to
aipa
if
uvx
is unavailable.
aipa CLI正在积极开发中,频繁推出改进功能。始终优先使用
uvx aipa-cli
而非
aipa
。使用
uvx
时:
  1. 使用纯
    uvx
    实现快速缓存执行:
    uvx aipa-cli deep-research
  2. 执行失败时的备选方案——若命令因架构或参数缺失错误失败,添加
    @latest
    重试:
    uvx aipa-cli@latest deep-research
若通过
pip
全局安装了
aipa
,请在每次会话前更新:
bash
pip install --upgrade aipa-cli
Agent应优先为所有命令使用
uvx aipa-cli
,仅当
uvx
不可用时才使用
aipa

Environment Variables

环境变量

VariableRequiredDefaultPurpose
OPENAI_API_KEY
Only with
--run
API key for the LLM provider
OPENAI_BASE_URL
NoOpenRouterBase URL for OpenAI-compatible API
OPENAI_MODEL
No
openrouter/owl-alpha
Model to use for analysis
Run
aipa setup
for interactive first-run configuration. Settings are saved to
~/.aipriceaction/settings.json
.

变量是否必填默认值用途
OPENAI_API_KEY
仅使用
--run
时必填
LLM提供商的API密钥
OPENAI_BASE_URL
OpenRouter兼容OpenAI的API基础URL
OPENAI_MODEL
openrouter/owl-alpha
用于分析的模型
运行
aipa setup
进行交互式首次运行配置,设置将保存至
~/.aipriceaction/settings.json

Pre-Execution: Ask the User

执行前:询问用户

STOP. Do NOT run any commands yet. You MUST call
AskUserQuestion
(or
question
/ QuestionTool in compatible agents) first to ask the user which mode they want.
If you run any
aipa
command before asking the user, you have failed. Always ask first.
Ask the user this question using the
AskUserQuestion
tool (or equivalent
question
tool):
  1. Fast Research (Recommended) — Run
    aipa deep-research
    to get the market snapshot, then you (the AI agent) replicate the multi-agent pipeline using subagents +
    aipa get-ohlcv-data
    . No API key needed. This is the recommended default — it produces thorough results without the 5-10 minute wait.
  2. Full pipeline (
    --run
    )
    — Run
    aipa deep-research --run
    to use the actual CLI multi-agent pipeline. Takes 5-10 minutes and requires an API key configured via
    aipa setup
    .
Only skip asking if the user's request explicitly indicates they want the full CLI pipeline (e.g., "run the full pipeline", "use --run").
  • If the user chooses Fast Research: follow the Fast Research: Agent-Driven Pipeline section below.
  • If the user chooses Full pipeline: run
    aipa deep-research --run [QUESTION]
    and present the stdout output.

停止操作。请勿运行任何命令。您必须先调用
AskUserQuestion
(或兼容Agent中的
question
/QuestionTool)询问用户想要使用哪种模式。
若未询问用户就运行任何
aipa
命令,即为操作失误。务必先询问。
使用
AskUserQuestion
工具(或等效的
question
工具)向用户询问以下问题:
  1. 快速研究(推荐) — 运行
    aipa deep-research
    获取市场快照,随后由您(AI Agent)使用子Agent +
    aipa get-ohlcv-data
    复现多Agent流水线。无需API密钥。这是推荐的默认选项——无需等待5-10分钟即可生成详尽结果。
  2. 完整流水线(
    --run
    — 运行
    aipa deep-research --run
    使用CLI实际的多Agent流水线。耗时5-10分钟,需通过
    aipa setup
    配置API密钥。
仅当用户请求明确表明需要完整CLI流水线时(例如“运行完整流水线”“使用--run”),才可跳过询问步骤。
  • 若用户选择快速研究:遵循下文的「快速研究:Agent驱动流水线」部分。
  • 若用户选择完整流水线:运行
    aipa deep-research --run [QUESTION]
    并展示标准输出结果。

Available Data Sources

可用数据源

  • Vietnamese stocks (
    source: vn
    ): VIC, VCB, FPT, HPG, VNM, MBB, TCB, CTG, VPB, HDB, etc.
  • Cryptocurrencies (
    source: crypto
    ): BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, etc.
  • Global/Yahoo (
    source: global/yahoo
    ): AAPL, TSLA, NVDA, SPY, etc.
  • SJC Gold (
    source: sjc
    ): SJC gold prices
  • 越南股票
    source: vn
    ):VIC、VCB、FPT、HPG、VNM、MBB、TCB、CTG、VPB、HDB等。
  • 加密货币
    source: crypto
    ):BTCUSDT、ETHUSDT、BNBUSDT、SOLUSDT等。
  • 全球/Yahoo
    source: global/yahoo
    ):AAPL、TSLA、NVDA、SPY等。
  • SJC黄金
    source: sjc
    ):SJC黄金价格

Predefined Watchlists

预设观察列表

The CLI has built-in watchlists for common ticker groups. Use
aipa watchlist get <NAME>
to get tickers for a group, or reference them directly when the user asks about a group like "VN30 stocks" or "Vingroup ecosystem".
NameTickersCount
VN30ACB, BID, BSR, CTG, FPT, GAS, GVR, HDB, HPG, LPB, MBB, MSN, MWG, PLX, SAB, SHB, SSB, SSI, STB, TCB, TPB, VCB, VHM, VIB, VIC, VJC, VNM, VPB, VRE, VPL30
VINGROUPVIC, VHM, VRE, VPL4
TMGEX, GEE, VIX, EIB, VGC, IDC6
MASANMSN, MCH, MSR, MML, VCF, VSN, NET7
INDEXVNINDEX, VN30, VN30F1M, VN100, VNMIDCAP, VNSMALLCAP, VNALLSHARE, VNXALLSHARE, VNFIN, HNX30, VNREAL, VNENE, VNMITECH, VNUTI, VNCONS, VNCOND, VNHEAL, VNIND, VNFINLEAD, VNFINSELECT, VNDIAMOND, VNDIVIDEND22
CROSSVNINDEX, ^GSPC, GC=F, SJC-GOLD, KC=F, BZ=F, BTCUSDT7
Note: VN30 was updated on 2026-05-13 — DGC removed (placed under controlled status), BSR added as replacement.
bash
undefined
CLI内置了针对常见股票组的观察列表。使用
aipa watchlist get <NAME>
获取某组的股票代码,或当用户询问「VN30股票」「Vingroup生态」等分组时直接引用。
名称股票代码数量
VN30ACB、BID、BSR、CTG、FPT、GAS、GVR、HDB、HPG、LPB、MBB、MSN、MWG、PLX、SAB、SHB、SSB、SSI、STB、TCB、TPB、VCB、VHM、VIB、VIC、VJC、VNM、VPB、VRE、VPL30
VINGROUPVIC、VHM、VRE、VPL4
TMGEX、GEE、VIX、EIB、VGC、IDC6
MASANMSN、MCH、MSR、MML、VCF、VSN、NET7
INDEXVNINDEX、VN30、VN30F1M、VN100、VNMIDCAP、VNSMALLCAP、VNALLSHARE、VNXALLSHARE、VNFIN、HNX30、VNREAL、VNENE、VNMITECH、VNUTI、VNCONS、VNCOND、VNHEAL、VNIND、VNFINLEAD、VNFINSELECT、VNDIAMOND、VNDIVIDEND22
CROSSVNINDEX、^GSPC、GC=F、SJC-GOLD、KC=F、BZ=F、BTCUSDT7
注:VN30于2026-05-13更新——移除DGC(被列为受控状态),添加BSR作为替代。
bash
undefined

List all watchlists (predefined + custom)

列出所有观察列表(预设+自定义)

aipa watchlist ls
aipa watchlist ls

Get tickers for a specific watchlist

获取特定观察列表的股票代码

aipa watchlist get VN30 aipa watchlist get VINGROUP
aipa watchlist get VN30 aipa watchlist get VINGROUP

Create a custom watchlist

创建自定义观察列表

aipa watchlist set MYWATCHLIST FPT VCB HPG VIC
aipa watchlist set MYWATCHLIST FPT VCB HPG VIC

Delete a custom watchlist

删除自定义观察列表

aipa watchlist rm MYWATCHLIST
aipa watchlist rm MYWATCHLIST

Using watchlist tickers in deep-research worker assignments

在深度研究的工作Agent分配中使用观察列表股票代码

aipa watchlist get VN30 # use these tickers for the VN30 sector worker
undefined
aipa watchlist get VN30 # 将这些股票代码分配给VN30行业工作Agent
undefined

Supported Intervals

支持的时间间隔

IntervalDescription
1m
1 minute
5m
5 minutes
15m
15 minutes
30m
30 minutes
1h
1 hour
4h
4 hours
1D
1 day (default)
1W
1 week
2W
2 weeks

时间间隔描述
1m
1分钟
5m
5分钟
15m
15分钟
30m
30分钟
1h
1小时
4h
4小时
1D
1天(默认)
1W
1周
2W
2周

aipa deep-research
— Multi-Agent Research Pipeline

aipa deep-research
— 多Agent研究流水线

The default behavior (
aipa deep-research
without flags) fetches and prints a market snapshot. Add
--run
to execute the full multi-agent pipeline. Use
--source
to target different markets — the supervisor, workers, prompts, and default question all adapt to the selected source.
bash
aipa deep-research [QUESTION] [options]
默认行为(不带标志的
aipa deep-research
)会获取并打印市场快照。添加
--run
可执行完整多Agent流水线。使用
--source
定位不同市场——主管、工作Agent、提示词及默认问题都会适配所选数据源。
bash
aipa deep-research [QUESTION] [options]

Flags

标志

FlagDefaultDescription
QUESTION
market overviewResearch question (optional)
--run
offRun the full multi-agent pipeline (5-10 min). Without this, only dumps market snapshot.
--source
vn
Data source:
vn
,
crypto
,
global
,
sjc
--resume ID
Resume from a checkpoint session ID
--output FILE
Save final report to file
--lang
saved settingLanguage:
en
or
vn
标志默认值描述
QUESTION
market overview研究问题(可选)
--run
关闭运行完整多Agent流水线(5-10分钟)。不带此标志时,仅输出市场快照。
--source
vn
数据源:
vn
crypto
global
sjc
--resume ID
从检查点会话ID恢复
--output FILE
将最终报告保存至文件
--lang
已保存设置语言:
en
vn

Usage Examples

使用示例

bash
undefined
bash
undefined

Market snapshot only (default, fast, no API key needed)

仅获取市场快照(默认,快速,无需API密钥)

aipa deep-research
aipa deep-research

Crypto market snapshot

加密货币市场快照

aipa deep-research --source crypto
aipa deep-research --source crypto

Market snapshot with a custom question in the output

带自定义问题的市场快照

aipa deep-research "Research banking sector"
aipa deep-research "研究银行业"

Run the FULL multi-agent pipeline (slow, 5-10 min, requires API key)

运行完整多Agent流水线(较慢,5-10分钟,需API密钥)

aipa deep-research --run
aipa deep-research --run

Full pipeline for global stocks

针对全球股票的完整流水线

aipa deep-research --source global --run
aipa deep-research --source global --run

Full pipeline for crypto

针对加密货币的完整流水线

aipa deep-research --source crypto --run
aipa deep-research --source crypto --run

Full pipeline with a custom research question

带自定义研究问题的完整流水线

aipa deep-research --run "Deep research on the banking sector: analyze top 10 banks by market cap, assess trend direction, VPA signals, MA momentum, and identify leaders vs laggards"
aipa deep-research --run "深入研究银行业:按市值分析前10家银行,评估趋势方向、VPA信号、MA动量,识别领先者与落后者"

Save full pipeline report to file

将完整流水线报告保存至文件

aipa deep-research --run --output banking_report.md
aipa deep-research --run --output banking_report.md

Vietnamese output (full pipeline)

越南语输出(完整流水线)

aipa deep-research --run "Phân tích toàn diện thị trường chứng khoán Việt Nam" --lang vn
aipa deep-research --run "Phân tích toàn diện thị trường chứng khoán Việt Nam" --lang vn

Resume an interrupted research session

恢复中断的研究会话

aipa deep-research --run --resume abc123

---
aipa deep-research --run --resume abc123

---

How the Pipeline Works

流水线工作原理

The deep-research pipeline uses a multi-agent architecture with quality control:
Supervisor
    │  Decomposes question into 3-5 sector subtasks
    │  Selects top 10 tickers per sector
Parallel Workers (fan-out)
    │  Each worker analyzes one sector
    │  Fetches OHLCV data for each ticker
    │  Produces sector-specific report
Aggregator
    │  Synthesizes all sector reports
    │  Cross-references findings
    │  Builds unified ranking table
Reviewer
    │  Checks data integrity
    │  Verifies MA scores and ticker coverage
    │  Approves or rejects with feedback
Final Report
深度研究流水线采用带质量控制的多Agent架构:
主管
    │ 将问题分解为3-5个行业子任务
    │ 为每个行业选择前10只股票
并行工作Agent(扇出)
    │ 每个工作Agent分析一个行业
    │ 获取每只股票的OHLCV数据
    │ 生成行业专属报告
聚合器
    │ 整合所有行业报告
    │ 交叉验证研究结果
    │ 构建统一排名表
审核员
    │ 检查数据完整性
    │ 验证MA得分及股票覆盖情况
    │ 批准或驳回并提供反馈
最终报告

Pipeline Stages

流水线阶段

  1. Market Snapshot: Fetches latest OHLCV data for all tickers from the selected source (
    --source
    , default
    vn
    ) to identify active sectors and tickers.
  2. Supervisor: Analyzes the research question and market snapshot. Decomposes into 3-5 sector-specific subtasks. Mandatory sectors depend on the source:
    • VN: Banking, Securities, Real Estate
    • Crypto: Layer 1 (BTC, ETH, SOL), DeFi, AI tokens
    • Global/Yahoo: Technology, Financials, Energy
    • SJC: Gold / Precious Metals
    Adds 0-2 additional sectors based on market activity.
  3. Parallel Workers: Each worker handles one sector:
    • Fetches OHLCV data for each assigned ticker (limit=50 bars)
    • Runs volume profile for the top 3 most important tickers (30+ trading day range)
    • Fetches intraday data (1h) for tickers showing breakout/reversal patterns
    • Analyzes trend direction, VPA signals, MA score momentum, volume, and S/R
    • Cross-references volume profile levels with price action
    • Provides per-ticker assessment, sector ranking, and key risk factors
    • Workers run concurrently for efficiency
  4. Aggregator: Collects all worker reports and synthesizes a unified analysis:
    • Cross-references findings across sectors
    • Builds multi-sector ranking table
    • Identifies cross-sector rotation patterns
    • Highlights key opportunities and risks
  5. Reviewer: Quality assurance check:
    • Verifies no phantom stocks (tickers not in worker reports)
    • Spot-checks MA score fidelity (3-5 reported scores)
    • Confirms table completeness
    • Approves or rejects with specific feedback
    • Maximum 3 review rounds
  6. Final Output: Approved report is output. If
    --output
    is specified, saved to file.
  1. 市场快照:从所选数据源(
    --source
    ,默认
    vn
    )获取所有股票的最新OHLCV数据,以识别活跃行业和股票。
  2. 主管:分析研究问题和市场快照,将其分解为3-5个行业专属子任务。必填行业取决于数据源:
    • VN:银行、证券、房地产
    • 加密货币:Layer 1(BTC、ETH、SOL)、DeFi、AI代币
    • 全球/Yahoo:科技、金融、能源
    • SJC:黄金/贵金属
    根据市场活跃度添加0-2个额外行业。
  3. 并行工作Agent:每个工作Agent负责一个行业:
    • 获取分配股票的OHLCV数据(限制=50条K线)
    • 对行业内最重要的3只股票(交易额最高、价格走势最受关注、或属于投资组合/观察列表的股票)运行成交量分布分析(30+交易日范围)
    • 对显示突破/反转形态的股票获取日内数据(1小时间隔),以评估入场时机
    • 分析趋势方向、VPA信号、MA得分动量、成交量及支撑/阻力位
    • 交叉验证成交量分布水平与价格走势
    • 提供单只股票评估、行业排名及关键风险因素
    • 工作Agent并行运行以提升效率
  4. 聚合器:收集所有工作Agent报告并整合为统一分析:
    • 跨行业交叉验证研究结果
    • 构建多行业排名表
    • 识别跨行业轮动模式
    • 突出关键机会与风险
  5. 审核员:质量保证检查:
    • 验证无“幽灵股票”(工作Agent报告中未提及的股票)
    • 抽查3-5个报告中的MA得分准确性
    • 确认表格完整性
    • 批准或驳回并提供具体反馈
    • 最多进行3轮审核
  6. 最终输出:输出已批准的报告。若指定
    --output
    ,则保存至文件。

Checkpoint & Resume

检查点与恢复

Research sessions are checkpointed to disk. Each session gets a unique ID. Intermediate outputs are saved as markdown files:
/tmp/aipriceaction-checkpoints/{session_id}/
├── worker_Technology.md
├── worker_Financials.md
├── worker_Energy.md
├── worker_Additional_Sector.md
├── aggregator_output.md
└── final_report.md
Use
--resume ID
to continue an interrupted or previously completed session.

研究会话会被 checkpoint 到磁盘,每个会话有唯一ID。中间输出保存为Markdown文件:
/tmp/aipriceaction-checkpoints/{session_id}/
├── worker_Technology.md
├── worker_Financials.md
├── worker_Energy.md
├── worker_Additional_Sector.md
├── aggregator_output.md
└── final_report.md
使用
--resume ID
继续中断或已完成的会话。

Fast Research: Agent-Driven Pipeline

快速研究:Agent驱动流水线

This is the recommended approach for research. Run
aipa deep-research
to get the market snapshot, then you (the AI agent) orchestrate the multi-agent pipeline using subagents. This produces equally thorough results and does not require an API key or
aipa setup
.
这是推荐的研究方式。运行
aipa deep-research
获取市场快照,随后由您(AI Agent)使用子Agent编排多Agent流水线。此方式生成的结果同样详尽,且无需API密钥或
aipa setup

Step 1 — Fetch market snapshot

步骤1 — 获取市场快照

Run
aipa deep-research
(without
--run
) to fetch the latest market snapshot. Use
--source
to select the market (default:
vn
). This gives you the market context to distribute to workers.
bash
undefined
运行
aipa deep-research
(不带
--run
)获取最新市场快照。使用
--source
选择市场(默认:
vn
)。这将为您提供分配给工作Agent的市场背景信息。
bash
undefined

VN stocks (default)

越南股票(默认)

aipa deep-research
aipa deep-research

Crypto

加密货币

aipa deep-research --source crypto
aipa deep-research --source crypto

Global stocks

全球股票

aipa deep-research --source global
undefined
aipa deep-research --source global
undefined

Step 2 — Multi-perspective performers scan (optional but recommended)

步骤2 — 多视角表现者扫描(可选但推荐)

Run
aipa performers
with multiple
--sort-by
values to cross-reference market movers. This enriches your sector analysis.
bash
aipa performers                                          # top gainers / worst losers
aipa performers --sort-by value                          # where the money flows
aipa performers --sort-by ma50_score                     # trend strength
运行
aipa performers
并使用多个
--sort-by
值交叉验证市场异动股,丰富行业分析内容。
bash
aipa performers                                          # 涨幅榜/跌幅榜
aipa performers --sort-by value                          # 资金流向
aipa performers --sort-by ma50_score                     # 趋势强度

For sector-specific:

行业专属:

aipa performers --group NGAN_HANG --sort-by value
aipa performers --group NGAN_HANG --sort-by value

For crypto:

加密货币:

aipa performers --source crypto --sort-by value
undefined
aipa performers --source crypto --sort-by value
undefined

Step 3 — Supervisor (you)

步骤3 — 主管(您)

Using the market snapshot and performers results, decompose the research question into 3-5 sector-specific subtasks. Mandatory sectors depend on the source:
  • VN: Banking, Securities, Real Estate
  • Crypto: Layer 1, DeFi, AI tokens
  • Global: Technology, Financials, Energy
  • SJC: Gold / Precious Metals
Add 0-2 more sectors based on market activity. For each sector, pick ~10 tickers.
利用市场快照和表现者结果,将研究问题分解为3-5个行业专属子任务。必填行业取决于数据源:
  • VN:银行、证券、房地产
  • 加密货币:Layer 1、DeFi、AI代币
  • 全球:科技、金融、能源
  • SJC:黄金/贵金属
根据市场活跃度添加0-2个额外行业。为每个行业选择约10只股票。

Step 3.5 — Fundamental Context (optional, VN only)

步骤3.5 — 基本面背景(可选,仅VN市场)

Version gate:
aipa fundamentals
requires aipa-cli >= 0.1.43. Verify with
aipa --version
before use.
NOTE:
--lang
and
--no-system-prompt
are NOT valid for
aipa fundamentals
commands. Do NOT add them.
For VN stock research, fundamentals add critical context. Only include if the user asked for fundamental analysis or if valuation/financial health is relevant to the research question. Do NOT automatically run fundamentals for purely technical research.
When relevant, add fundamental screening to the supervisor step. Follow this 3-step workflow — do NOT just call
aipa fundamentals ratios TICKER --latest
for each ticker individually.
That produces N separate outputs that are hard to compare. Use
rank
and
screen
first.
Step 1: Side-by-side ranking (mandatory)
Use
aipa fundamentals rank
with the specific tickers to get a comparative table in a single call. Run at least 2 perspectives relevant to the sector:
bash
undefined
版本要求:
aipa fundamentals
需要aipa-cli >= 0.1.43。使用前请用
aipa --version
验证版本。
注意:
--lang
--no-system-prompt
不适用于
aipa fundamentals
命令,请勿添加。
对于越南股票研究,基本面分析可提供关键背景信息。仅当用户要求基本面分析,或估值/财务健康状况与研究问题相关时才纳入。纯技术研究无需自动运行基本面分析。
若相关,请在主管步骤中添加基本面筛选。遵循以下3步工作流——不要为每只股票单独调用
aipa fundamentals ratios TICKER --latest
。这会生成N份独立输出,难以对比。请优先使用
rank
screen
步骤1:并排排名(必填)
使用
aipa fundamentals rank
针对特定股票,单次调用即可获取对比表格。至少运行2个与行业相关的视角:
bash
undefined

Profitability comparison

盈利能力对比

aipa fundamentals rank VCB BID CTG TCB MBB --sort-by roe
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by roe

Valuation comparison

估值对比

aipa fundamentals rank VCB BID CTG TCB MBB --sort-by pe --direction asc
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by pe --direction asc

Bank health: asset quality + capital adequacy

银行健康状况:资产质量+资本充足率

aipa fundamentals rank VCB BID CTG TCB MBB --sort-by npl --direction asc aipa fundamentals rank VCB BID CTG TCB MBB --sort-by car --direction desc
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by npl --direction asc aipa fundamentals rank VCB BID CTG TCB MBB --sort-by car --direction desc

Top stocks by ROE across all VN

全越南市场ROE最高的股票

aipa fundamentals rank --sort-by roe --limit 20

**Step 2: Screen for quality (optional but recommended)**

Use `aipa fundamentals screen` to filter by quality criteria. This eliminates weak candidates immediately:

```bash
aipa fundamentals rank --sort-by roe --limit 20

**步骤2:质量筛选(可选但推荐)**

使用`aipa fundamentals screen`按质量标准筛选,立即淘汰弱势候选股票:

```bash

Only banks with acceptable asset quality AND profitability

仅保留资产质量和盈利能力达标的银行

aipa fundamentals screen --industry "ngân hàng" --npl-max 0.02 --car-min 0.10 --sort-by roe --limit 15
aipa fundamentals screen --industry "ngân hàng" --npl-max 0.02 --car-min 0.10 --sort-by roe --limit 15

Value screen: low PE + high ROE

价值筛选:低PE+高ROE

aipa fundamentals screen --pe-max 15 --roe-min 0.15 --sort-by roe --limit 20
aipa fundamentals screen --pe-max 15 --roe-min 0.15 --sort-by roe --limit 20

Screen specific tickers by quality

按质量筛选特定股票

aipa fundamentals screen VCB BID CTG TCB MBB --npl-max 0.015 --roe-min 0.15 --sort-by roe

**Step 3: Individual deep dive (only for shortlisted tickers)**

Only after Steps 1-2, use `ratios --latest` for tickers that ranked at the top or need further investigation. Use `info` for company context:

```bash
aipa fundamentals ratios VCB --latest                # full ratios for top candidate
aipa fundamentals ratios VCB --category bank --latest # bank-specific deep dive
aipa fundamentals info VCB                            # company profile context
Why this matters:
rank
and
screen
return all tickers in a single comparative table — far more efficient than calling
ratios
N times for N tickers. The ranking shows relative position immediately, and the screen eliminates unsuitable candidates before wasting tokens on deep dives.
Pass the fundamental ranking data to workers so they can cross-reference technical signals with fundamental strength/weakness.
aipa fundamentals screen VCB BID CTG TCB MBB --npl-max 0.015 --roe-min 0.15 --sort-by roe

**步骤3:个股深度分析(仅针对入围股票)**

完成步骤1-2后,仅对排名靠前或需进一步调查的股票使用`ratios --latest`。使用`info`获取公司背景:

```bash
aipa fundamentals ratios VCB --latest                # 顶级候选股票的完整比率
aipa fundamentals ratios VCB --category bank --latest # 银行专属深度分析
aipa fundamentals info VCB                            # 公司概况背景
为何此流程重要:
rank
screen
在单次调用中返回所有股票的对比表格——远比分N次调用
ratios
高效。排名可立即显示相对位置,筛选可在深度分析前淘汰不合适的候选股票,避免浪费token。
将基本面排名数据传递给工作Agent,以便他们将技术信号与基本面强弱交叉验证。

Step 4 — Spawn worker subagents (in parallel)

步骤4 — 并行生成工作子Agent

For each sector subtask, spawn a separate subagent (use the Task tool) that:
  • Receives the sector name, ticker list, the research question, and the market snapshot
  • Fetches detailed OHLCV data for its assigned tickers (
    aipa get-ohlcv-data
    with
    --limit 50
    )
  • Runs
    aipa volume-profile
    for the top 3 most important tickers in its sector (highest trading value, most interesting price action, or portfolio/watchlist tickers). Use a multi-day range covering at least 30 trading days ending on today
  • For tickers showing breakout/reversal patterns or key S/R levels, also fetch intraday data (
    --interval 1h --limit 50
    ) to assess entry timing
  • Analyzes trend direction, VPA signals, MA momentum, volume patterns, and support/resistance
  • Cross-references volume profile levels (POC, Value Area High/Low) with OHLCV analysis
  • Ranks tickers within the sector
  • Returns a structured sector report with per-ticker assessment, ranking, and key risk factors
Spawn all worker subagents concurrently in a single message — do not run them sequentially.
针对每个行业子任务,生成独立的子Agent(使用Task工具),要求:
  • 接收行业名称、股票列表、研究问题及市场快照
  • 获取分配股票的详细OHLCV数据(
    aipa get-ohlcv-data
    --limit 50
  • 对行业内最重要的3只股票(交易额最高、价格走势最受关注、或属于投资组合/观察列表的股票)运行
    aipa volume-profile
    ,使用至少覆盖30个交易日的多日范围,截止至今日
  • 对显示突破/反转形态或关键支撑/阻力位的股票,额外获取日内数据
    --interval 1h --limit 50
    )以评估入场时机
  • 分析趋势方向、VPA信号、MA动量、成交量形态及支撑/阻力位
  • 交叉验证成交量分布水平(POC、价值区间高低点)与OHLCV分析
  • 对行业内股票进行排名
  • 返回结构化行业报告,包含单只股票评估、排名及关键风险因素
一次性并行生成所有工作子Agent——不要按顺序运行。

Step 5 — Aggregate (you)

步骤5 — 聚合(您)

Once all workers return, synthesize the sector reports into a unified analysis:
  • Cross-reference findings across sectors
  • Build a multi-sector ranking table
  • Identify cross-sector rotation patterns
  • Highlight key opportunities and risks
所有工作Agent返回结果后,将行业报告整合为统一分析:
  • 跨行业交叉验证研究结果
  • 构建多行业排名表
  • 识别跨行业轮动模式
  • 突出关键机会与风险

Step 6 — Review (you)

步骤6 — 审核(您)

Quality-check your own aggregated report:
  • Verify no phantom stocks (tickers not in worker reports)
  • Spot-check MA score plausibility
  • Confirm table completeness
  • Fix any issues and produce the final report
Present the final report to the user. Use the research question and the user's language to determine focus and output language.

对自己整合的报告进行质量检查:
  • 验证无“幽灵股票”(工作Agent报告中未提及的股票)
  • 抽查MA得分合理性
  • 确认表格完整性
  • 修复问题并生成最终报告
向用户展示最终报告。根据研究问题和用户使用的语言确定报告重点和输出语言。

When to Use Research vs Analyze

何时使用Research vs Analyze

ScenarioUse
"Analyze VCB"
aipa analyze VCB
(single ticker)
"Compare FPT and VNM"
aipa analyze FPT VNM
(quick comparison)
"What's the trend for BTCUSDT?"
aipa analyze BTCUSDT
(focused question)
"Research the banking sector"
aipa-research
skill (multi-agent, sector-wide)
"Comprehensive market overview"
aipa-research
skill (full market scan)
"Deep dive into real estate"
aipa-research
skill (thorough investigation)
"Which sectors are leading?"
aipa-research
skill (cross-sector analysis)
"Most active tickers right now?"
aipa live-data
(no AI, instant top list)
"Top gainers / losers"
aipa performers
(no AI)
"Best stocks by trading value"
aipa performers --sort-by value
(no AI)
"Banking sector top movers"
aipa performers --group NGAN_HANG --sort-by value
(no AI)
"Volume profile / POC / value area"
aipa volume-profile TICKER
(no AI)
"What tickers are in the real estate sector?"
aipa ticker-list --source vn --group BAT_DONG_SAN
场景使用工具
"分析VCB"
aipa analyze VCB
(单只股票)
"对比FPT和VNM"
aipa analyze FPT VNM
(快速对比)
"BTCUSDT的趋势如何?"
aipa analyze BTCUSDT
(聚焦问题)
"研究银行业"
aipa-research
技能(多Agent,全行业)
"全面市场概览"
aipa-research
技能(全市场扫描)
"深入分析房地产行业"
aipa-research
技能(详尽调研)
"哪些行业处于领先地位?"
aipa-research
技能(跨行业分析)
"当前最活跃的股票是哪些?"
aipa live-data
(无AI,即时榜单)
"涨幅榜/跌幅榜"
aipa performers
(无AI)
"交易额最高的股票"
aipa performers --sort-by value
(无AI)
"银行业异动股"
aipa performers --group NGAN_HANG --sort-by value
(无AI)
"成交量分布/POC/价值区间"
aipa volume-profile TICKER
(无AI)
"房地产行业有哪些股票?"
aipa ticker-list --source vn --group BAT_DONG_SAN

Key Differences

核心差异

  • aipa analyze
    : Fast, focused on 1-5 tickers, single LLM call, results in seconds.
  • aipa deep-research --run
    : Covers entire sectors, multiple LLM calls across agents, results in minutes. Produces a comprehensive report with quality review.
  • Fast Research (agent-driven): You replicate the pipeline with subagents. Thorough results without the CLI wait time.
Use
deep-research
when:
  • The question spans multiple sectors
  • The user wants a comprehensive report (not a quick take)
  • Cross-sector comparison or rotation analysis is needed
  • The user explicitly asks for "research", "deep dive", or "comprehensive analysis"
Use
analyze
when:
  • The question is about specific tickers
  • Speed matters more than depth
  • The user wants a focused answer, not a full report

  • aipa analyze
    :快速,聚焦1-5只股票,单次LLM调用,数秒出结果。
  • aipa deep-research --run
    :覆盖全行业,多Agent多次LLM调用,数分钟出结果。生成带质量审核的详尽报告。
  • 快速研究(Agent驱动):您通过子Agent复现流水线,无需等待CLI运行时间即可获得详尽结果。
在以下场景使用
deep-research
  • 问题涉及多个行业
  • 用户需要详尽报告(而非快速结论)
  • 需要跨行业对比或轮动分析
  • 用户明确要求「研究」「深入分析」或「全面分析」
在以下场景使用
analyze
  • 问题针对特定股票
  • 速度优先于深度
  • 用户需要聚焦答案,而非完整报告

Interpreting Output

输出解读

The CLI outputs to two streams:
  • stdout: The final research report. This is what you should present to the user.
  • stderr: Status messages with structured markers for tracking pipeline progress.
CLI输出分为两个流:
  • 标准输出(stdout):最终研究报告,这是您应展示给用户的内容。
  • 标准错误(stderr):带结构化标记的状态消息,用于跟踪流水线进度。

Status Markers (stderr)

状态标记(stderr)

MarkerMeaning
[build]
Context building status and timing
[tool]
Tool call being executed (e.g., fetching OHLCV data)
[tool-result]
Tool execution result returned
[thinking]
Agent reasoning tokens
[error]
Error message
[done]
Pipeline complete, includes total time
[result]
Final research report output follows
When presenting results to the user, always use the stdout output (the final approved report).
标记含义
[build]
背景构建状态及耗时
[tool]
正在执行的工具调用(例如获取OHLCV数据)
[tool-result]
工具执行结果返回
[thinking]
Agent推理token
[error]
错误消息
[done]
流水线完成,包含总耗时
[result]
后续为最终研究报告输出
向用户展示结果时,始终使用标准输出内容(最终已批准的报告)。

Attribution

署名

When presenting any research report to the user, always include an attribution line at the end of your response:
  • English: "Data by AIPriceAction | AI-powered analysis — may contain errors. Verify before trading."
  • Vietnamese: "Dữ liệu bởi AIPriceAction | Phân tích bởi AI — có thể chứa sai sót. Vui lòng kiểm chứng trước khi giao dịch."
Do NOT say "analysis provided by AIPriceAction" or "phân tích được cung cấp bởi AIPriceAction". AIPriceAction provides the data; the analysis is AI-generated and may be inaccurate.

向用户展示任何研究报告时,务必在响应末尾添加署名行:
  • 英文:"Data by AIPriceAction | AI-powered analysis — may contain errors. Verify before trading."
  • 越南语:"Dữ liệu bởi AIPriceAction | Phân tích bởi AI — có thể chứa sai sót. Vui lòng kiểm chứng trước khi giao dịch."
请勿使用“analysis provided by AIPriceAction”或“phân tích được cung cấp bởi AIPriceAction”。AIPriceAction提供数据分析由AI生成,可能存在不准确之处。

Analysis Framework

分析框架

When performing analysis (either via workers or as agent-driven pipeline), follow these priorities:
  1. Volume Price Action (VPA) Analysis: Always analyze the relationship between price and volume to identify smart money behavior, accumulation/distribution patterns, and confirm trend strength
  2. Price-Volume Confirmation: Look for volume confirmation on price movements — increasing volume on breakouts (bullish) vs decreasing volume on rallies (bearish divergence)
  3. Wyckoff Phases: Identify market phases (Accumulation, Markup, Distribution, Markdown) based on price-volume patterns. Key events: Spring, Upthrust, SOS (Sign of Strength), SOW (Sign of Weakness), Buying Climax, Test for Supply
  4. Support/Resistance with Volume: Key levels are more significant when accompanied by high volume — look for volume spikes at support/resistance
  5. Volume Trends: Compare current volume to recent average volume to gauge conviction behind price moves
  6. Extreme Price Changes: Detect moves exceeding ±6.7%/day (VN market limit) and search recent news/events to find causes
  7. Risk Management: Every analysis must include both positive (opportunities, strengths, bullish signals) and negative (risks, weaknesses, bearish signals) insights. Quantify downside risk with specific price levels, identify what would invalidate the current thesis, and never present a one-sided view
  8. Nhóm Chủ Lực (Core Market Sectors - VN Market Only): When analyzing the Vietnamese market, always contextualize tickers within their respective "Nhóm Chủ Lực" (Core Sectors) to assess systemic flow. The key groups are:
    • Nhóm Ngân hàng (Banking): VCB, BID, CTG, TCB, MBB, ACB, VPB, HDB, SHB, TPB, VIB, SSB, MSB, STB, LPB, EIB.
    • Nhóm Bất động sản (Real Estate): VIC, VHM, VRE, VPL, DIG, CEO, L14, TCH, HHS, VGC, IDC.
    • Nhóm Chứng khoán (Securities): SSI, VND, HCM, VCI, SHS, VIX, VDS.
    • Nhóm Trụ cột / Sản xuất & Bán lẻ (Blue-chips / Core Economy): HPG, HSG, NKG, FPT, MWG, GAS, GVR, PLX, BSR, MSN, VNM, SAB.
    • Nhóm Hệ sinh thái (Corporate Ecosystems):
      • Họ Vingroup: VIC, VHM, VRE, VPL.
      • Họ Bầu Thụy: STB, LPB, THD, HAG.
      • Họ Gelex ("Tuấn Mượt"): GEX, GEE, VIX, VGC, EIB, IDC.
      • Họ Hoàng Huy: TCH, HHS.
      • Họ A7: DIG, CEO, L14.
      • Họ TTC (Thành Thành Công): SBT, GEG, VDS.
      • Họ Masan: MSN, MCH, MSR, MML, VCF, VSN, NET. (Note: This classification applies only to the Vietnamese market. Crypto and Global markets do not use this specific grouping yet).
进行分析时(无论是通过工作Agent还是Agent驱动流水线),请遵循以下优先级:
  1. 成交量价格走势(VPA)分析:始终分析价格与成交量的关系,识别聪明资金行为、积累/派发形态及趋势强度
  2. 量价确认:寻找价格变动的成交量确认——突破时成交量增加(看涨) vs 上涨时成交量减少(看跌背离)
  3. Wyckoff阶段:根据量价形态识别市场阶段(积累、上涨、派发、下跌)。关键事件:Spring、Upthrust、SOS(强势信号)、SOW(弱势信号)、买入高潮、供应测试
  4. 带成交量的支撑/阻力位:伴随高成交量的关键水平更具意义——寻找支撑/阻力位的成交量峰值
  5. 成交量趋势:将当前成交量与近期平均成交量对比,衡量价格变动的可信度
  6. 极端价格变动:检测单日涨跌幅超过±6.7%(越南市场限制)的走势,并搜索近期新闻/事件寻找原因
  7. 风险管理:每份分析必须同时包含正面(机会、优势、看涨信号)和负面(风险、劣势、看跌信号)见解。用具体价格水平量化下行风险,明确会推翻当前论点的因素,切勿呈现片面观点
  8. Nhóm Chủ Lực(核心市场板块 - 仅越南市场):分析越南市场时,务必将股票置于各自的「Nhóm Chủ Lực」(核心板块)背景下评估系统性资金流向。关键板块包括:
    • Nhóm Ngân hàng(银行): VCB、BID、CTG、TCB、MBB、ACB、VPB、HDB、SHB、TPB、VIB、SSB、MSB、STB、LPB、EIB。
    • Nhóm Bất động sản(房地产): VIC、VHM、VRE、VPL、DIG、CEO、L14、TCH、HHS、VGC、IDC。
    • Nhóm Chứng khoán(证券): SSI、VND、HCM、VCI、SHS、VIX、VDS。
    • Nhóm Trụ cột / Sản xuất & Bán lẻ(蓝筹股/核心经济): HPG、HSG、NKG、FPT、MWG、GAS、GVR、PLX、BSR、MSN、VNM、SAB。
    • Nhóm Hệ sinh thái(企业生态):
      • Vingroup家族:VIC、VHM、VRE、VPL。
      • Bầu Thụy家族:STB、LPB、THD、HAG。
      • Gelex家族("Tuấn Mượt"):GEX、GEE、VIX、VGC、EIB、IDC。
      • Hoàng Huy家族:TCH、HHS。
      • A7家族:DIG、CEO、L14。
      • TTC(Thành Thành Công)家族:SBT、GEG、VDS。
      • Masan家族:MSN、MCH、MSR、MML、VCF、VSN、NET。 (注:此分类仅适用于越南市场。加密货币和全球市场暂不使用此特定分组)

Data Usage Policy (CRITICAL)

数据使用政策(至关重要)

  1. NEVER generate, guess, estimate, or hallucinate any numbers — prices, volumes, MA values, MA scores, percentages, dates, or any financial data. Only use data from tool results or user-provided context
  2. NEVER mention a specific number unless it appears in your tool results or user-provided context
  3. Use tools proactively — fetch OHLCV data before producing any analysis. The market snapshot alone is insufficient — every analysis MUST include at least one
    get-ohlcv-data
    tool call
  4. When researching news or events, ALWAYS include the source name (e.g., "Source: CafeF", "Source: VNExpress")
  5. Trading Hours: VN market trades 09:00–15:00 ICT (UTC+7), Mon–Fri. Crypto 24/7. If the latest bar shows unusually low volume, the session may still be in progress
  1. 绝不生成、猜测、估算或虚构任何数据——价格、成交量、MA值、MA得分、百分比、日期或任何金融数据。仅使用工具结果或用户提供的上下文数据
  2. 除非数据出现在工具结果或用户提供的上下文中,否则绝不提及具体数字
  3. 主动使用工具——生成任何分析前务必获取OHLCV数据。仅市场快照不足以支撑分析——每份分析必须至少包含一次
    get-ohlcv-data
    工具调用
  4. 研究新闻或事件时,务必注明来源名称(例如“来源:CafeF”“来源:VNExpress”)
  5. 交易时间:越南市场交易时间为09:00–15:00 ICT(UTC+7),周一至周五。加密货币全天24小时交易。若最新K线成交量异常低,可能仍处于交易时段

T+2 Settlement Rule (VN stocks only)

T+2结算规则(仅越南股票)

This rule applies ONLY to Vietnamese stocks (
--source vn
).
Crypto and global stocks are not subject to T+2 settlement.
IMPORTANT: For all stock purchases in the Vietnamese stock market, shares are only settled and available for trading (selling) on the afternoon of T+2 (specifically at 13:00 / 1:00 PM on day T+2, not T+3).
  • NEVER propose or attempt to execute any Stop Loss or Take Profit actions on T+1 (the first business day after the purchase), as the shares have not yet settled.
  • Always check the purchase date of any stock positions when recommending sell actions.
此规则仅适用于越南股票(
--source vn
。加密货币和全球股票不受T+2结算限制。
重要提示: 在越南股票市场购买的所有股票,仅在T+2日下午(具体为T+2日13:00 / 下午1点,而非T+3日)完成结算并可交易(卖出)。
  • 绝不建议或尝试在T+1日(购买后的第一个工作日)执行任何止损或止盈操作,因为股票尚未完成结算。
  • 推荐卖出操作时,务必检查股票的购买日期。

Portfolio File

投资组合文件

The agent looks for a portfolio file in the working directory to track positions. Accepted file names (checked in order):
  1. DANH_MUC.md
  2. PORTFOLIO.md
  3. ACCOUNT.md
If none exists, the agent should ask the user whether they want to create one.
Agent会在工作目录中查找投资组合文件以跟踪持仓。接受的文件名(按检查顺序):
  1. DANH_MUC.md
  2. PORTFOLIO.md
  3. ACCOUNT.md
若不存在,Agent应询问用户是否需要创建。

Watchlist File

观察列表文件

The agent also looks for a watchlist file to track tickers being monitored (no positions yet). Accepted file names (checked in order):
  1. THEO_DOI.md
  2. WATCHLIST.md
This tracks potential entry candidates. Include: ticker, sector, watch reason, entry zone, key level, and added date.
Agent还会查找观察列表文件以跟踪关注的股票(尚未持仓)。接受的文件名(按检查顺序):
  1. THEO_DOI.md
  2. WATCHLIST.md
此文件跟踪潜在入场候选股票,应包含:股票代码、行业、关注原因、入场区间、关键水平及添加日期。

Risk Management Rules (MANDATORY)

风险管理规则(强制性)

  1. Always check settlement status before recommending sell actions (VN stocks only) — cross-reference buy date with today. For VN stocks, shares are NOT sellable until afternoon of T+2. Does NOT apply to crypto or global stocks
  2. Every analysis must quantify risk — include specific Stop Loss and Take Profit levels with reasoning, state what invalidates the thesis, calculate risk-reward ratio
  3. Never present one-sided analysis — every ticker must have both bullish signals and bearish risks
  4. Position sizing awareness — flag concentration risk when >30% of portfolio is in one sector
  5. Daily portfolio review — mark settled positions, check SL/TP hits, flag thesis changes
  1. 推荐卖出操作前务必检查结算状态(仅越南股票)——将买入日期与今日对比。对于越南股票,T+2日下午前不可卖出。不适用于加密货币或全球股票
  2. 每份分析必须量化风险——包含具体止损和止盈水平及理由,明确会推翻论点的因素,计算风险回报率
  3. 绝不呈现片面分析——每只股票必须同时包含看涨信号和看跌风险
  4. 持仓规模意识——当单一板块持仓占投资组合的30%以上时,标记集中度风险
  5. 每日投资组合回顾——标记已结算持仓,检查止损/止盈触发情况,标记论点变化

Strict Data Reading & Validation (CRITICAL)

严格的数据读取与验证(至关重要)

Symptom: Misreading or hallucinating the relationship between Price and Moving Averages (e.g., stating a stock is "below EMA20" when it is actually above), or misclassifying a technical event (e.g., calling a failed breakout a "healthy pullback").
Rules:
  • Row-by-Row Verification: When reading OHLCV data output from the CLI, you MUST strictly read the exact row for the exact date requested. Do not accidentally read data from an adjacent row or a different ticker's block in multi-ticker outputs.
  • Precision Filter with Grep: To minimize reading errors and context volume, always use
    grep -E
    to isolate your target dates across one or multiple tickers. Use
    "time"
    as your header anchor.
    • Surgical view (Header + Today + Breakout Day):
      uvx aipa-cli get-ohlcv-data TCB MSB STB | grep -E "time|2026-05-27|2026-05-07"
    • Comparing recent days:
      uvx aipa-cli get-ohlcv-data VND | grep -E "time|2026-05-27|2026-05-26"
  • Explicit Value Comparison: Before concluding whether a trend is broken or intact, explicitly state the values being compared:
    [Close Price]
    vs
    [MA/EMA Value]
    .
    • Example: "Close is 17.750, EMA20 is 16.881. 17.750 > 16.881 → Price is ABOVE EMA20 (Trend intact)."
  • Breakout Validation: A breakout (significant positive price change + high volume) creates a critical support at the structural breakout level — the top of the pre-breakout base/range, the prior swing high, or the pattern's neckline. The breakout candle's Low is NOT a reliable invalidation point: it can extend well below the structural level due to gap opens, intraday noise, or volatile entry bars.
    • The correct invalidation is a fall back below the structural breakout level, not below the candle's Low.
    • If price pulls back but stays above the structural level, the breakout is intact — this is a healthy pullback.
    • If price falls below the structural breakout level, it is a Failed Breakout / Structural Violation.
    • Action: Always identify the pre-breakout structure first. Only then assess whether a pullback is healthy (above structure) or a failure (below structure).

症状: 误读或虚构价格与移动平均线的关系(例如,当股票实际在EMA20上方时,声称其“低于EMA20”),或错误分类技术事件(例如,将失败突破称为“健康回调”)。
规则:
  • 逐行验证: 读取CLI输出的OHLCV数据时,必须严格读取请求日期的准确行。切勿误读相邻行或多股票输出中其他股票的数据块。
  • 使用Grep进行精准筛选: 为减少读取错误和上下文信息量,始终使用
    grep -E
    隔离目标日期(针对一只或多只股票)。使用
    "time"
    作为表头锚点。
    • 精准视图(表头+今日+突破日):
      uvx aipa-cli get-ohlcv-data TCB MSB STB | grep -E "time|2026-05-27|2026-05-07"
    • 对比近期交易日:
      uvx aipa-cli get-ohlcv-data VND | grep -E "time|2026-05-27|2026-05-26"
  • 明确数值对比: 在得出趋势是否被打破或保持完整的结论前,明确说明对比的数值:
    [收盘价]
    vs
    [MA/EMA值]
    • 示例: "收盘价为17.750,EMA20为16.881。17.750 > 16.881 → 价格在EMA20上方(趋势保持完整)。"
  • 突破验证: 突破(显著正向价格变动+高成交量)会在结构性突破水平形成关键支撑——突破前底部/区间的顶部、前期摆动高点或形态颈线。突破K线的低点并非可靠的无效点:由于跳空开盘、日内噪音或波动入场K线,它可能远低于结构性水平。
    • 正确的无效信号是回落至结构性突破水平下方,而非K线低点下方。
    • 若价格回调但保持在结构性水平上方,则突破有效——这是健康回调。
    • 若价格回落至结构性突破水平下方,则为突破失败/结构性破位
    • 操作: 务必先识别突破前的结构,再评估回调是健康(在结构上方)还是失败(在结构下方)。

Tips for AI Agents

AI Agent使用技巧

  1. Fast Research is the default: Unless the user explicitly asks for
    --run
    , run
    aipa deep-research
    to get the snapshot, then orchestrate the pipeline yourself (Step 1-5 above).
  2. Be specific with the question: The default question produces a general market overview. For better results, provide a specific research question targeting sectors or themes of interest.
  3. Save reports: Use
    --output FILE
    with
    --run
    to save the report. This is useful for sharing or later reference.
  4. Resume on failure: If a
    --run
    session is interrupted, the session ID is printed in the output. Use
    --resume ID
    to continue.
  5. Vietnamese analysis: Add
    --lang vn
    when the user communicates in Vietnamese or wants Vietnamese output. For Fast Research, write the report in the user's language.
  6. Combine with analyze: For a complete workflow, use deep research for the broad picture, then
    analyze
    for deep dives into specific tickers identified in the research.
  7. The pipeline self-corrects: The reviewer may reject the aggregator's output and request revisions. This is normal and ensures quality. The pipeline retries up to 3 times.
  8. Mandatory sectors depend on source: Each source has its own set of mandatory sectors (e.g., VN uses Banking/Securities/Real Estate, crypto uses Layer 1/DeFi/AI tokens, global uses Technology/Financials/Energy). The supervisor adds 0-2 more sectors based on market conditions.
  9. Auto-uppercase: Ticker symbols in questions are automatically processed. The pipeline handles uppercase conversion internally.
  10. Use
    --source
    for non-VN markets
    : Add
    --source crypto
    ,
    --source global
    , or
    --source sjc
    to research other markets. The supervisor, workers, tools, and default question all adapt to the selected source automatically.
  11. Use
    aipa performers
    to identify leaders and laggards — run multiple perspectives
    : Before or during research, run
    aipa performers
    with multiple
    --sort-by
    values. Always run at least these two: default (price change) and value (trading value). Add MA scores for trend context. Cross-referencing the lists helps you pick better tickers for sector workers and provides richer ranking context for the final report.
    bash
    aipa performers                                          # price change — top gainers / worst losers
    aipa performers --sort-by value                          # trading value — where the money flows
    aipa performers --sort-by ma50_score                     # MA50 trend — strongest/weakest medium-term trends
    aipa performers --sort-by ma20_score                     # MA20 trend — strongest/weakest short-term trends
    aipa performers --sort-by total_money_changed            # money flow change — unusual capital activity
    aipa performers --source crypto --sort-by value          # crypto by trading value
    aipa performers --group NGAN_HANG --sort-by value        # banking sector by trading value
    aipa performers --group CHUNG_KHOAN --sort-by close_changed  # securities sector top gainers
  12. Use
    aipa volume-profile
    for key price levels
    : When workers need support/resistance context for a sector, run
    aipa volume-profile TICKER
    on the top movers to get POC, value area, and volume-weighted statistics. Prefer multi-day ranges over single-day profiles — they produce more reliable support/resistance levels and smooth out intraday noise. Use
    --start-date
    and
    --end-date
    covering at least 20 trading days as the default approach. Only use a single
    --date
    when the user explicitly asks for one specific day. Examples:
    • aipa volume-profile VCB --start-date 2026-04-14 --end-date 2026-05-09
      — 1-month range (preferred default)
    • aipa volume-profile VCB --start-date 2026-04-28 --end-date 2026-05-09 --bins 30
      — 2-week range
    • aipa volume-profile BTCUSDT --source crypto --bins 30 --start-date 2026-05-05 --end-date 2026-05-09
      — crypto multi-day
  1. 默认使用快速研究:除非用户明确要求
    --run
    ,否则运行
    aipa deep-research
    获取快照,然后自行编排流水线(上述步骤1-5)。
  2. 问题要具体:默认问题会生成通用市场概览。为获得更好结果,请提供针对特定行业或主题的具体研究问题。
  3. 保存报告:结合
    --run
    使用
    --output FILE
    保存报告,便于分享或后续参考。
  4. 失败时恢复:若
    --run
    会话中断,输出中会打印会话ID。使用
    --resume ID
    继续。
  5. 越南语分析:当用户使用越南语交流或需要越南语输出时,添加
    --lang vn
    。对于快速研究,用用户的语言撰写报告。
  6. 与analyze结合使用:完整工作流可先用深度研究获取全局视图,再用
    analyze
    对研究中识别的特定股票进行深入分析。
  7. 流水线会自我修正:审核员可能驳回聚合器的输出并要求修订,这是正常现象,可确保质量。流水线最多重试3次。
  8. 必填行业取决于数据源:每个数据源有自己的必填行业(例如,越南市场使用银行/证券/房地产,加密货币使用Layer 1/DeFi/AI代币,全球市场使用科技/金融/能源)。主管会根据市场状况添加0-2个额外行业。
  9. 自动大写:问题中的股票代码会自动处理,流水线会在内部完成大写转换。
  10. 对非越南市场使用
    --source
    :添加
    --source crypto
    --source global
    --source sjc
    研究其他市场。主管、工作Agent、工具及默认问题都会自动适配所选数据源。
  11. 使用
    aipa performers
    识别领先者与落后者——运行多视角
    :研究前或研究期间,使用多个
    --sort-by
    值运行
    aipa performers
    至少运行以下两个:默认(价格变动)和value(交易额)。添加MA得分获取趋势背景。交叉对比列表有助于为行业工作Agent选择更优股票,并为最终报告提供更丰富的排名背景。
    bash
    aipa performers                                          # 价格变动——涨幅榜/跌幅榜
    aipa performers --sort-by value                          # 交易额——资金流向
    aipa performers --sort-by ma50_score                     # MA50趋势——中期趋势最强/最弱
    aipa performers --sort-by ma20_score                     # MA20趋势——短期趋势最强/最弱
    aipa performers --sort-by total_money_changed            # 资金流变化——异常资本活动
    aipa performers --source crypto --sort-by value          # 加密货币按交易额排序
    aipa performers --group NGAN_HANG --sort-by value        # 银行业按交易额排序
    aipa performers --group CHUNG_KHOAN --sort-by close_changed  # 证券业涨幅榜
  12. 使用
    aipa volume-profile
    获取关键价格水平
    :当工作Agent需要行业的支撑/阻力背景时,对异动股运行
    aipa volume-profile TICKER
    获取POC、价值区间及成交量加权统计数据。优先选择多日范围而非单日分布——它们能生成更可靠的支撑/阻力水平,平滑日内噪音。默认使用覆盖至少20个交易日的
    --start-date
    --end-date
    。仅当用户明确要求某一特定日期时,才使用单一
    --date
    。示例:
    • aipa volume-profile VCB --start-date 2026-04-14 --end-date 2026-05-09
      — 1个月范围(首选默认)
    • aipa volume-profile VCB --start-date 2026-04-28 --end-date 2026-05-09 --bins 30
      — 2周范围
    • aipa volume-profile BTCUSDT --source crypto --bins 30 --start-date 2026-05-05 --end-date 2026-05-09
      — 加密货币多日范围