aipa-analyze

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

aipa-analyze

aipa-analyze

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. It combines OHLCV price data with LLM analysis to produce actionable trading insights using frameworks like Wyckoff, VPA (Volume Price Analysis), and MA momentum scoring.
aipa
是一款基于AI的金融分析CLI工具,支持越南股票、加密货币及全球资产分析。它将OHLCV价格数据与LLM分析相结合,借助Wyckoff、VPA(量价分析)、MA动量评分等框架生成可落地的交易洞察。

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 analyze VCB
uvx aipa-cli analyze VCB

Fallback: pip (if uv is not available)

备选方式:pip(若uv不可用)

pip install aipa-cli aipa analyze VCB
pip install aipa-cli aipa analyze VCB

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

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

python3 -m pip install aipa-cli --break-system-packages aipa analyze VCB

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 analyze VCB

本技能中的所有命令示例均为简洁起见使用`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 analyze VCB
  2. Fallback on failure — if a command fails with a schema or missing argument error, retry with
    @latest
    :
    uvx aipa-cli@latest analyze VCB
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 analyze VCB
  2. 执行失败时的备选方案——若命令因架构或参数缺失错误失败,添加
    @latest
    重试:
    uvx aipa-cli@latest analyze VCB
若通过
pip
全局安装了
aipa
,请在每次使用前更新:
bash
pip install --upgrade aipa-cli
Agent应优先使用
uvx aipa-cli
执行所有命令。仅当
uvx
不可用时,才使用
aipa
作为备选。

Environment Variables

环境变量

VariableRequiredDefaultPurpose
OPENAI_API_KEY
Yes (for AI)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
是(用于AI功能)LLM提供商的API密钥
OPENAI_BASE_URL
OpenRouter兼容OpenAI的API基础地址
OPENAI_MODEL
openrouter/owl-alpha
用于分析的模型
首次运行时可执行
aipa setup
进行交互式配置。设置将保存至
~/.aipriceaction/settings.json

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 analyze

在分析中使用观察列表代码

aipa analyze $(aipa watchlist get VN30)
undefined
aipa analyze $(aipa watchlist get VN30)
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
Note: All intervals work natively —
1m
,
5m
,
15m
,
30m
,
1h
,
4h
,
1D
,
1W
,
2W
. Non-native intervals are aggregated client-side from base data.

周期描述
1m
1分钟
5m
5分钟
15m
15分钟
30m
30分钟
1h
1小时
4h
4小时
1D
1天(默认)
1W
1周
注:所有周期均原生支持——
1m
5m
15m
30m
1h
4h
1D
1W
2W
。非原生周期将基于基础数据在客户端进行聚合。

aipa analyze
— AI Analysis

aipa analyze
— AI分析

Run AI-powered technical analysis on one or more tickers.
bash
aipa analyze TICKER [TICKERS...] [options]
对一个或多个代码运行AI驱动的技术分析。
bash
aipa analyze TICKER [TICKERS...] [options]

Flags

标志参数

FlagDefaultDescription
TICKER [TICKERS...]
One or more ticker symbols (auto-uppercased)
--interval
1D
Time interval:
1m
,
5m
,
15m
,
30m
,
1h
,
4h
,
1D
,
1W
,
2W
--limit N
20
Number of bars/candles to fetch
--source
auto-detectFilter by source:
vn
,
crypto
,
global
--start-date
Start date (e.g.
2025-04-01
)
--end-date
End date (e.g.
2025-04-30
)
--reference-ticker
auto-detectReference ticker:
VNINDEX
(VN stocks),
BTCUSDT
(crypto),
^GSPC
(global)
--lang
saved settingLanguage:
en
or
vn
--ma-type
ema
Moving average type:
ema
or
sma
--question TEXT
template 0Custom analysis question (overrides templates)
--questions
List available question templates and exit
--context-only
Dump raw context without calling LLM (no API key needed)
--no-system-prompt
Exclude system prompt from context output
--verbose
Show thinking tokens during analysis
标志默认值描述
TICKER [TICKERS...]
一个或多个代码符号(自动转换为大写)
--interval
1D
时间周期:
1m
5m
15m
30m
1h
4h
1D
1W
2W
--limit N
20
要获取的K线/蜡烛图数量
--source
自动检测按数据源过滤:
vn
crypto
global
--start-date
开始日期(例如
2025-04-01
--end-date
结束日期(例如
2025-04-30
--reference-ticker
自动检测参考代码:越南股票用
VNINDEX
,加密货币用
BTCUSDT
,全球资产用
^GSPC
--lang
已保存的设置语言:
en
vn
--ma-type
ema
移动平均线类型:
ema
sma
--question TEXT
模板0自定义分析问题(覆盖模板)
--questions
列出可用的问题模板并退出
--context-only
导出原始上下文,不调用LLM(无需API密钥)
--no-system-prompt
在上下文输出中排除系统提示
--verbose
分析过程中显示思考标记

Usage Examples

使用示例

bash
undefined
bash
undefined

Basic single-ticker analysis

基础单代码分析

aipa analyze VCB
aipa analyze VCB

Multi-ticker comparison

多代码对比

aipa analyze VCB TCB MBB CTG VPB
aipa analyze VCB TCB MBB CTG VPB

Specific interval and bar count

指定周期和K线数量

aipa analyze BTCUSDT --interval 4h --limit 50
aipa analyze BTCUSDT --interval 4h --limit 50

Custom date range

自定义日期范围

aipa analyze FPT --start-date 2025-01-01 --end-date 2025-05-01
aipa analyze FPT --start-date 2025-01-01 --end-date 2025-05-01

Custom analysis question

自定义分析问题

aipa analyze VIC --question "What is the Wyckoff phase and what are the key price targets?"
aipa analyze VIC --question "当前处于Wyckoff哪个阶段?关键价格目标是什么?"

Vietnamese language output

越南语输出

aipa analyze VNM --lang vn
aipa analyze VNM --lang vn

Dump raw data context without AI analysis (no API key needed)

导出原始数据上下文,不进行AI分析(无需API密钥)

aipa analyze VCB --context-only
aipa analyze VCB --context-only

Show thinking tokens during analysis

分析过程中显示思考标记

aipa analyze HPG --verbose
aipa analyze HPG --verbose

Override auto-detected reference ticker

覆盖自动检测的参考代码

aipa analyze VCB --reference-ticker VN30
aipa analyze VCB --reference-ticker VN30

Specific source

指定数据源

aipa analyze BTCUSDT --source crypto

---
aipa analyze BTCUSDT --source crypto

---

Analysis Workflow

分析流程

Follow this multi-step workflow for every analysis request. Do NOT just run
aipa analyze
and stop.
所有分析请求均需遵循以下多步骤流程,不可仅运行
aipa analyze
就结束。

Step 1: Daily Timeframe Analysis

步骤1:日线图分析

Run
aipa analyze
on the daily chart first. Use
--limit 50
minimum for sufficient context. For Wyckoff phase identification or TP setting, use
--limit 60
or higher.
bash
aipa analyze VCB --limit 50
首先对日线图运行
aipa analyze
。为获取足够上下文,
--limit
至少设为50。若需识别Wyckoff阶段或设置目标价(TP),请将
--limit
设为60或更高。
bash
aipa analyze VCB --limit 50

Step 2: Volume Profile for Support/Resistance

步骤2:成交量分布分析支撑/阻力位

Run
aipa volume-profile
to get structural price levels (POC, Value Area, high-volume nodes). Use a multi-day range covering at least 20 trading days.
bash
aipa volume-profile VCB --start-date 2026-04-14 --end-date 2026-05-27
Note: The dates above are examples. Always use a range covering at least 30 trading days (roughly 6 calendar weeks) ending on today. Calculate
--start-date
dynamically.
Cross-reference the volume profile levels with the daily analysis — key S/R levels with high volume clusters are more significant.
运行
aipa volume-profile
获取结构性价格水平(POC、价值区间、高成交量节点)。使用至少覆盖20个交易日的多日范围。
bash
aipa volume-profile VCB --start-date 2026-04-14 --end-date 2026-05-27
注: 以上日期为示例。请始终使用至少覆盖30个交易日(约6个日历周)且截止至今日的范围。需动态计算
--start-date
将成交量分布水平与日线分析交叉验证——伴随高成交量集群的关键支撑/阻力位更具意义。

Step 3: Intraday Deep Dive (If Needed)

步骤3:日内深度分析(按需进行)

Based on the daily analysis, decide whether an intraday look adds value:
TriggerAction
Daily shows breakout/reversal forming NOWRun
--interval 1h --limit 50
to see entry timing
Daily shows tight consolidation near key levelRun
--interval 4h --limit 50
to check for patterns
User asks about entry/exit timing or scalpingRun
--interval 15m --limit 50
for micro structure
Daily chart is clear and no timing ambiguitySkip intraday — daily analysis is sufficient
bash
undefined
基于日线分析结果,判断日内分析是否能增加价值:
触发条件操作
日线显示当前正在形成突破/反转运行
--interval 1h --limit 50
查看入场时机
日线显示在关键水平附近处于窄幅盘整运行
--interval 4h --limit 50
检查形态
用户询问入场/出场时机或日内交易运行
--interval 15m --limit 50
分析微观结构
日线图清晰且时机无歧义跳过日内分析——日线分析已足够
bash
undefined

1h for entry/exit timing

1小时周期用于入场/出场时机分析

aipa analyze VCB --interval 1h --limit 50
aipa analyze VCB --interval 1h --limit 50

15m for scalping or micro structure

15分钟周期用于日内交易或微观结构分析

aipa analyze VCB --interval 15m --limit 50
undefined
aipa analyze VCB --interval 15m --limit 50
undefined

Step 4: Present Combined Analysis

步骤4:整合分析结果呈现

Synthesize all steps into a single response:
  • Daily chart: Trend, Wyckoff phase, key levels
  • Volume profile: Structural S/R with volume confirmation
  • Intraday (if run): Entry/exit timing, short-term patterns
Do NOT present each step as a separate section. Combine insights into a coherent analysis.

将所有步骤的结果整合为单一回复:
  • 日线图:趋势、Wyckoff阶段、关键水平
  • 成交量分布:带成交量确认的结构性支撑/阻力位
  • 日内分析(若已运行):入场/出场时机、短期形态
请勿将每个步骤作为单独部分呈现,需将洞察整合为连贯的分析内容。

When to Use This Skill vs Others

何时使用此技能 vs 其他技能

User RequestUse
"Analyze VCB"
aipa analyze VCB
"Compare FPT and VNM"
aipa analyze FPT VNM
"Wyckoff analysis for HPG"
aipa analyze HPG --question "Wyckoff analysis with phases, events, and price targets"
"Research the banking sector deeply"Use the
aipa-research
skill instead
"Get price data for VCB"Use the
aipa-data
skill instead
"Show me OHLCV candles for BTC"Use the
aipa-data
skill instead
"What are the top stocks today?"
aipa live-data
(no AI, quick market overview)
"Top gainers / losers"
aipa performers
(no AI)
"Best stocks by trading value"
aipa performers --sort-by value
(no AI)
"Volume profile / POC / value area"
aipa volume-profile TICKER
(no AI)
"What banking stocks are available?"
aipa ticker-list --source vn --group NGAN_HANG
Key rule: AI insights →
aipa-analyze
, raw numbers →
aipa-data
, comprehensive report →
aipa-research
, quick market overview →
aipa live-data
.

用户请求使用技能
"分析VCB"
aipa analyze VCB
"对比FPT和VNM"
aipa analyze FPT VNM
"对HPG进行Wyckoff分析"
aipa analyze HPG --question "Wyckoff analysis with phases, events, and price targets"
"深入研究银行业板块"改用
aipa-research
技能
"获取VCB的价格数据"改用
aipa-data
技能
"展示BTC的OHLCV蜡烛图"改用
aipa-data
技能
"今天的热门股票有哪些?"
aipa live-data
(无AI,快速市场概览)
"涨幅/跌幅榜"
aipa performers
(无AI)
"按成交额排名的优质股票"
aipa performers --sort-by value
(无AI)
"成交量分布/POC/价值区间"
aipa volume-profile TICKER
(无AI)
"有哪些银行股可用?"
aipa ticker-list --source vn --group NGAN_HANG
核心规则:AI洞察 →
aipa-analyze
,原始数据 →
aipa-data
,综合报告 →
aipa-research
,快速市场概览 →
aipa live-data

Question Templates

问题模板

The CLI includes pre-built analysis question templates organized by framework. Use
--questions
to list all available templates.
CLI包含按框架分类的预构建分析问题模板。使用
--questions
列出所有可用模板。

Single-Ticker Templates (English)

单代码模板(英文)

IndexTemplateDescription
0Trading OpportunityWyckoff phases, Smart Money behavior, deployment roadmap, risk management
1News & Events ResearchDetect extreme moves (>6.7% or Volume >150%), web search for causes
2Price Action & VolumeVPA analysis, smart money footprints, supply/demand zones
3MA Momentum & TrendMA alignment, crossover detection, volume confirmation
4Wyckoff MethodWyckoff phases, Spring/Upthrust/SOS events, price targets
5Bob Volman Price ActionMicro pullback entries, breakout/fading setups, trade planning
索引模板描述
0交易机会Wyckoff阶段、聪明资金行为、部署路线、风险管理
1新闻与事件研究检测极端波动(涨跌幅>6.7%或成交量>150%),搜索背后原因
2价格行为与成交量VPA分析、聪明资金痕迹、供需区间
3MA动量与趋势MA对齐、交叉信号检测、成交量确认
4Wyckoff方法Wyckoff阶段、Spring/Upthrust/SOS事件、价格目标
5Bob Volman价格行为微回调入场、突破/反向交易设置、交易规划

Multi-Ticker Templates (English)

多代码模板(英文)

IndexTemplateDescription
0Trading OpportunityAnalyze all tickers, rank by opportunity quality
1Stock Performance ComparisonCompare price action strength, MA momentum, volume
2Market Trend AnalysisSector rotation via MA scores, accumulation/distribution
3Risk & Support/ResistanceMap S/R levels with volume context
4News & Events ResearchDetect extreme moves across multiple tickers
5Bob Volman Price ActionApplied to multiple tickers with ranking
6Wyckoff MethodMulti-ticker Wyckoff analysis with ranking
Vietnamese translations exist for all templates (use
--lang vn
).
索引模板描述
0交易机会分析所有代码,按机会质量排名
1股票表现对比对比价格行为强度、MA动量、成交量
2市场趋势分析通过MA分数分析板块轮动、积累/派发情况
3风险与支撑/阻力位结合成交量上下文绘制支撑/阻力位
4新闻与事件研究检测多个代码的极端波动
5Bob Volman价格行为应用于多个代码并排名
6Wyckoff方法多代码Wyckoff分析并排名
所有模板均有越南语翻译(使用
--lang vn
)。

Using Templates

使用模板

bash
undefined
bash
undefined

List all templates

列出所有模板

aipa analyze --questions
aipa analyze --questions

Use a specific template by index (TUI only: /analyze VCB 2)

通过索引使用特定模板(仅TUI:/analyze VCB 2)

In CLI, use --question for custom questions

在CLI中,使用--question设置自定义问题

aipa analyze HPG --question "Phân tích theo phương pháp Wyckoff: xác định pha, sự kiện quan trọng (Spring/Upthrust/SOS), mục tiêu giá và xác nhận khối lượng"

---
aipa analyze HPG --question "Phân tích theo phương pháp Wyckoff: xác định pha, sự kiện quan trọng (Spring/Upthrust/SOS), mục tiêu giá và xác nhận khối lượng"

---

Interpreting Output

输出解读

The CLI outputs to two streams:
  • stdout: The final analysis result (the AI's response). This is what you should present to the user.
  • stderr: Status messages with structured markers for tracking progress.
CLI输出分为两个流:
  • stdout:最终分析结果(AI的回复)。这是需要呈现给用户的内容。
  • stderr:包含结构化标记的状态消息,用于跟踪进度。

Status Markers (stderr)

状态标记(stderr)

MarkerMeaning
[build]
Context building status and timing
[analyze]
Analysis question being sent to the LLM
[tool]
Tool call being executed (e.g., fetching OHLCV data)
[tool-result]
Tool execution result returned
[thinking]
Agent reasoning tokens (only with
--verbose
)
[error]
Error message
[done]
Analysis complete, includes total time
[result]
Final analysis output follows
When presenting results to the user, always use the stdout output (after the
[result]
marker in stderr).
标记含义
[build]
上下文构建状态及耗时
[analyze]
正在向LLM发送分析问题
[tool]
正在执行工具调用(例如获取OHLCV数据)
[tool-result]
工具执行结果已返回
[thinking]
Agent思考标记(仅在
--verbose
模式下显示)
[error]
错误消息
[done]
分析完成,包含总耗时
[result]
后续为最终分析输出
向用户呈现结果时,请始终使用stdout输出(即stderr中
[result]
标记之后的内容)。

Attribution

归属声明

When presenting any analysis 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生成,可能存在不准确之处。

No API Key — Agent Fallback

无API密钥时的Agent备选方案

When
OPENAI_API_KEY
is not set,
aipa analyze
prints the raw context to stdout and exits with
[info]
messages instead of an error. The context contains all the OHLCV data, MA scores, and market metadata needed for analysis.
If you are an AI agent and see this fallback output, you should perform the analysis yourself using the printed context:
  1. Read the OHLCV data, MA scores, and market context from the stdout output
  2. Apply the same analytical framework the CLI would have used (Wyckoff, VPA, MA momentum, etc.)
  3. Produce the analysis result as if the LLM agent had generated it
  4. Present the result to the user in the same format the CLI normally would
The context output is identical to
aipa analyze --context-only
, so treat it as your input data and do the reasoning yourself.

当未设置
OPENAI_API_KEY
时,
aipa analyze
会将原始上下文打印到stdout并附带
[info]
消息退出,而非抛出错误。上下文包含分析所需的所有OHLCV数据、MA分数及市场元数据。
若你是AI Agent且看到此备选输出,请自行使用打印的上下文进行分析
  1. 从stdout输出中读取OHLCV数据、MA分数及市场上下文
  2. 应用CLI原本会使用的分析框架(Wyckoff、VPA、MA动量等)
  3. 生成如同LLM Agent生成的分析结果
  4. 以CLI常规输出格式向用户呈现结果
上下文输出与
aipa analyze --context-only
完全一致,请将其作为输入数据自行完成推理。

Fundamentals: Ask Before Running

基本面分析:运行前需询问用户

Do NOT automatically run
aipa fundamentals
commands unless the user explicitly asks for fundamental data or fundamental analysis (phân tích cơ bản).
Technical analysis (VPA, Wyckoff, MA) is the default. Only fetch fundamentals when:
  • The user explicitly says "fundamentals", "fundamental analysis", "cơ bản", "phân tích cơ bản", "PE", "ROE", "NPL", "CAR", etc.
  • The user asks about valuation, profitability, or financial health
  • The user asks to compare stocks by financial metrics (not price action)
Version gate:
aipa fundamentals
requires aipa-cli >= 0.1.43. Verify before use:
bash
aipa --version
If < 0.1.43, upgrade:
uvx aipa-cli@latest
or
pip install --upgrade aipa-cli
.
NOTE:
--lang
and
--no-system-prompt
are NOT valid for
aipa fundamentals
commands. Do NOT add them.
When fundamentals are relevant, use these commands to enrich your technical analysis:
bash
undefined
除非用户明确要求基本面数据或基本面分析(phân tích cơ bản),否则请勿自动运行
aipa fundamentals
命令
。技术分析(VPA、Wyckoff、MA)为默认选项。仅在以下情况获取基本面数据:
  • 用户明确提及“fundamentals”“fundamental analysis”“cơ bản”“phân tích cơ bản”“PE”“ROE”“NPL”“CAR”等词汇
  • 用户询问估值、盈利能力或财务健康状况
  • 用户要求按财务指标对比股票(而非价格行为)
版本要求:
aipa fundamentals
需要aipa-cli >= 0.1.43。使用前请验证版本:
bash
aipa --version
若版本低于0.1.43,请升级:
uvx aipa-cli@latest
pip install --upgrade aipa-cli
注意:
--lang
--no-system-prompt
不适用于
aipa fundamentals
命令,请勿添加。
当基本面分析相关时,可使用以下命令丰富技术分析内容:
bash
undefined

Quick company snapshot

快速公司概况

aipa fundamentals info VCB
aipa fundamentals info VCB

Latest financial ratios

最新财务比率

aipa fundamentals ratios VCB --latest
aipa fundamentals ratios VCB --latest

Bank-specific metrics (NPL, CAR, CASA, CIR)

银行特定指标(NPL、CAR、CASA、CIR)

aipa fundamentals ratios VCB --category bank --latest
aipa fundamentals ratios VCB --category bank --latest

Compare ROE across peers

对比同行ROE

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

Screen for value stocks

筛选价值股

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

Screen banking sector for asset quality

筛选银行业资产质量

aipa fundamentals screen --industry "ngân hàng" --npl-max 0.015 --sort-by npl --direction asc
undefined
aipa fundamentals screen --industry "ngân hàng" --npl-max 0.015 --sort-by npl --direction asc
undefined

How Fundamentals Enhance Technical Analysis

基本面分析如何增强技术分析

When the user asks for fundamentals, combine technical and fundamental views:
  1. Valuation context: Is the stock expensive (high PE/PB) or cheap? A breakout at PE=8 is different from PE=30.
  2. Bank health (VN banks): NPL, CAR, CASA, CIR provide critical risk context. High NPL + bearish technicals = strong sell signal.
  3. Profitability confirmation: High ROE/ROA supports bullish thesis. Declining margins = fundamental weakness beneath technical strength.
  4. Screening for candidates: Use
    rank
    and
    screen
    to find fundamentally strong stocks, then apply technical analysis to time entries.
当用户要求基本面分析时,需结合技术面与基本面视角:
  1. 估值上下文:股票是高估(高PE/PB)还是低估?PE=8时的突破与PE=30时的突破意义不同。
  2. 银行健康状况(越南银行):NPL、CAR、CASA、CIR提供关键风险上下文。高NPL+看空技术信号=强烈卖出信号。
  3. 盈利能力确认:高ROE/ROA支撑看涨论点。利润率下降=技术面强势背后存在基本面弱点。
  4. 筛选候选股票:使用
    rank
    screen
    找到基本面强劲的股票,再应用技术分析确定入场时机。

Fundamental Comparison Workflow

基本面对比流程

When comparing fundamentals across multiple tickers (e.g., "compare VCB TCB MBB fundamentals", "which bank is healthiest", "rank banks by NPL"), follow this 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
当对比多个代码的基本面时(例如“对比VCB、TCB、MBB的基本面”“哪家银行最健康”“按NPL排名银行”),请遵循以下流程。请勿仅对每个代码单独调用
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

General stocks: dividend + valuation

普通股票:股息+估值

aipa fundamentals rank FPT VNM HPG MWG --sort-by dividend_yield --direction desc aipa fundamentals rank FPT VNM HPG MWG --sort-by pe --direction asc

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

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

```bash
aipa fundamentals rank FPT VNM HPG MWG --sort-by dividend_yield --direction desc aipa fundamentals rank FPT VNM HPG MWG --sort-by pe --direction asc

**步骤2:筛选优质股票(可选但推荐)**

使用`aipa fundamentals screen`结合代码筛选优质标的,可立即排除弱势候选:

```bash

Only banks with acceptable asset quality AND profitability

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

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

Only stocks with reasonable valuation

仅保留估值合理的股票

aipa fundamentals screen VCB FPT HPG VNM --pe-max 20 --roe-min 0.10 --sort-by pe --direction asc
aipa fundamentals screen VCB FPT HPG VNM --pe-max 20 --roe-min 0.10 --sort-by pe --direction asc

Entire sector with quality filter

筛选整个板块的优质标的

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

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

Only after Steps 1-2, use `ratios --latest` for individual 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 and trying to manually compare across outputs. The ranking shows relative position immediately, and the screen eliminates unsuitable candidates before wasting tokens on deep dives.

aipa fundamentals screen --industry "ngân hàng" --npl-max 0.02 --car-min 0.09 --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个代码调用N次
ratios
再手动对比输出高效。排名可立即显示相对位置,筛选可在深入分析前排除不合适的候选,避免浪费token。

Analysis Framework

分析框架

When performing analysis (either via the CLI or as agent fallback), 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. Fundamental Context (when requested): When the user asks for fundamentals, enrich the technical analysis with PE, PB, ROE, NPL, CAR, and other financial metrics. Fundamentals do NOT replace technical analysis — they add context.
  9. 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).
进行分析时(无论是通过CLI还是作为Agent备选方案),请遵循以下优先级:
  1. 量价分析(VPA):始终分析价格与成交量的关系,识别聪明资金行为、积累/派发形态及趋势强度确认
  2. 量价确认:寻找价格变动的成交量确认——突破时成交量增加(看涨) vs 上涨时成交量减少(看背离)
  3. Wyckoff阶段:基于量价形态识别市场阶段(积累、上涨、派发、下跌)。关键事件:Spring、Upthrust、SOS(强势信号)、SOW(弱势信号)、买入高潮、供应测试
  4. 带成交量的支撑/阻力位:伴随高成交量的关键水平更具意义——寻找支撑/阻力位的成交量峰值
  5. 成交量趋势:将当前成交量与近期平均成交量对比,判断价格变动的可信度
  6. 极端价格变动:检测单日涨跌幅超过±6.7%(越南市场涨跌幅限制)的情况,并搜索近期新闻/事件寻找原因
  7. 风险管理:每份分析必须同时包含正面(机会、优势、看涨信号)和负面(风险、劣势、看空信号)洞察。用具体价格水平量化下行风险,明确当前论点失效的条件,切勿呈现片面观点
  8. 基本面上下文(按需):当用户要求基本面分析时,用PE、PB、ROE、NPL、CAR等财务指标丰富技术分析内容。基本面分析不能替代技术分析——仅作为补充上下文。
  9. 核心板块(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 — call
    aipa analyze
    ,
    aipa get-ohlcv-data
    , and/or
    aipa performers
    BEFORE answering price-related questions
  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. 主动使用工具——回答价格相关问题前,先调用
    aipa analyze
    aipa get-ohlcv-data
    和/或
    aipa performers
  4. 研究新闻或事件时,务必注明来源名称(例如“来源:CafeF”“来源:VNExpress”)
  5. 交易时间:越南市场交易时间为ICT时间09:00–15:00(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日(购买后的首个交易日)建议或尝试执行任何止损(Stop Loss)或止盈(Take Profit)操作,因为股票尚未完成结算。
  • 建议卖出操作时,务必核对股票的购买日期。

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. Auto-uppercase: Ticker symbols are automatically converted to uppercase. You can pass
    vcb
    ,
    btcusdt
    , etc. — they will be treated as
    VCB
    ,
    BTCUSDT
    .
  2. Use
    --context-only
    for data inspection
    : If you only need to see what data is available without spending API credits, use
    aipa analyze VCB --context-only
    .
  3. Default is good enough: The default template (index 0, Trading Opportunity) is comprehensive. Only specify
    --question
    when the user has a specific analytical framework in mind.
  4. Multi-ticker for comparisons: When the user asks to "compare" or "which is better", pass multiple tickers:
    aipa analyze VCB TCB MBB
    .
  5. Use
    --lang vn
    for Vietnamese users
    : If the user writes in Vietnamese or asks for Vietnamese output, add
    --lang vn
    .
  6. Use
    --verbose
    for transparency
    : When the user wants to see the reasoning process, add
    --verbose
    .
  7. aipa-data
    for raw numbers
    : If the user asks for "price data", "candle data", or "OHLCV" without wanting AI analysis, use the
    aipa-data
    skill instead.
  8. Interval matters: For intraday analysis, use
    1h
    or
    4h
    . For swing trading, use
    1D
    . For scalping, use
    15m
    or
    5m
    .
  9. Combine with
    --limit
    : More bars = more context. Use
    --limit 50
    or
    --limit 100
    for deeper analysis. Default is 20.
  10. Reference ticker: Auto-detected based on the ticker's source —
    VNINDEX
    for VN stocks,
    BTCUSDT
    for crypto,
    ^GSPC
    for global stocks. Use
    --reference-ticker
    to override.
  11. Use
    aipa performers
    to find tickers to analyze — run multiple perspectives
    : When the user asks "what should I analyze?" or "what's moving today?", run
    aipa performers
    with multiple
    --sort-by
    values to get a multi-perspective view. Always run at least these two: default (price change) and value (trading value). Add MA scores when the user cares about trends. Cross-referencing the lists reveals more significant tickers. Then analyze the interesting ones with
    aipa analyze
    .
    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 support/resistance context
    : When analyzing a ticker and the user asks about key price levels, support, resistance, or "where is the volume?", run
    aipa volume-profile TICKER
    to get POC (Point of Control), 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 VCB --date 2026-05-08
      — single date (only when specifically requested)
    • aipa volume-profile BTCUSDT --source crypto --bins 30 --start-date 2026-05-05 --end-date 2026-05-09
      — crypto multi-day
    • aipa volume-profile FPT --start-date 2026-05-01 --end-date 2026-05-09 --bins 30 --value-area-pct 80
      — full options
  1. 自动大写转换:代码符号会自动转换为大写。你可以传入
    vcb
    btcusdt
    等——它们会被视为
    VCB
    BTCUSDT
  2. 使用
    --context-only
    检查数据
    :若仅需查看可用数据而无需消耗API额度,可使用
    aipa analyze VCB --context-only
  3. 默认模板足够全面:默认模板(索引0,交易机会)内容全面。仅当用户有特定分析框架需求时,才指定
    --question
  4. 多代码用于对比:当用户要求“对比”或“哪个更好”时,传入多个代码:
    aipa analyze VCB TCB MBB
  5. 对越南用户使用
    --lang vn
    :若用户用越南语提问或要求越南语输出,请添加
    --lang vn
  6. 使用
    --verbose
    提升透明度
    :当用户希望查看推理过程时,添加
    --verbose
  7. aipa-data
    用于原始数据
    :若用户要求“价格数据”“蜡烛图数据”或“OHLCV”且无需AI分析,请改用
    aipa-data
    技能。
  8. 周期选择很重要:日内分析使用
    1h
    4h
    。波段交易使用
    1D
    。日内交易使用
    15m
    5m
  9. 结合
    --limit
    使用
    :K线越多,上下文越充分。深入分析时使用
    --limit 50
    --limit 100
    。默认值为20。
  10. 参考代码:根据代码的数据源自动检测——越南股票用
    VNINDEX
    ,加密货币用
    BTCUSDT
    ,全球资产用
    ^GSPC
    。可使用
    --reference-ticker
    覆盖默认设置。
  11. 使用
    aipa performers
    寻找分析标的——多视角运行
    :当用户询问“我应该分析什么?”或“今天哪些标的有波动?”时,结合多个
    --sort-by
    值运行
    aipa performers
    ,获取多视角结果。至少运行以下两个:默认(价格变动)和成交额(value)。若用户关注趋势,可添加MA分数。交叉对比列表可发现更重要的标的,再用
    aipa analyze
    进行分析。
    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
    获取支撑/阻力位上下文
    :分析代码且用户询问关键价格水平、支撑位、阻力位或“成交量分布在哪里?”时,运行
    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 VCB --date 2026-05-08
      — 单一日期(仅在明确要求时使用)
    • aipa volume-profile BTCUSDT --source crypto --bins 30 --start-date 2026-05-05 --end-date 2026-05-09
      — 加密货币多日范围
    • aipa volume-profile FPT --start-date 2026-05-01 --end-date 2026-05-09 --bins 30 --value-area-pct 80
      — 完整参数示例