Global Market Analyst
Global asset analysis — VN stocks, US equities, Forex, Commodities, Crypto, ETF — real-time technical + fundamental + valuation + return estimation.
⚠️ Most Important Principle
Historical CAGR ≠ expectation from current price.
Always ask: "If buying TODAY at this price, what is the P/E? Is it still cheap?"
Example: MCH CAGR 73%/year from the 30k bottom → but at current price 161k, P/E ~37x is expensive.
Sharpe 2.19 is historical from low price zone — does not apply to buyers today.
Step 0: Understand Requirements & Check Macro
Before analyzing any asset, always check:
🇻🇳 Macro Việt Nam
Current macro context (updated 23/03/2026):
- - 🔴 VN-Index: ~1,604 — down 14% in the month, foreign net selling -27,591 tỷ YTD
- 🟢 FTSE upgrade VN → effective 21/09/2026 → biggest catalyst
- SBV rate: Holding, following FED
- GDP target 2026: 6.5-7%
🇺🇸 Macro Mỹ
- - FED rate: 3.5-3.75% (held 18/3/2026, hawkish — only 1 cut expected in 2026)
- PCE inflation: 2.7% (raised from 2.4%)
- Unemployment: ~4.0% (stable)
- S&P 500: In correction ~5-8% from ATH, tech leading
- US 10Y yield: ~4.2-4.4%
🌍 Global Macro
- - 🔴 Iran War ongoing — dầu WTI $95-99, threatening Strait of Hormuz
- Vàng XAUUSD: ~$4,362 (corrected -15% from ATH $5,608)
- DXY (USD Index): ~103-105
- BNB: Risk-off pressure, ecosystem still strong (TVL $6.7B, #3 globally)
- ECB rate: ~3.0%, gradually cutting
- BOJ rate: ~0.5%, just raised from 0.25%
Portfolio impact:
- - 🟢 Accumulate: MBB (P/E 6.5x), Vàng, S&P 500 ETF (VOO)
- 🟢 DCA: FPT (P/E 13-14x, unusually cheap but below EMA200)
- ⏳ Hold: BNB (wait for FED cut), TCB, AAPL, MSFT
- 🔴 Avoid: VCB (P/E expensive), BĐS (rates rising), crypto mới, meme coins
- 🟢 New buys: GAS/PVS (benefiting from high oil), Energy ETF (XLE)
See details: references/macro-update-2026-03.md, references/crypto-analysis.md, references/gold-analysis.md.
Determine:
- - Asset class: VN stocks? US stocks? Forex? Gold? Crypto? ETF?
- Objective: Find new opportunities? Analyze a specific ticker? Estimate returns? Scan the market?
- Holding period: Short-term (< 3 months), medium-term (3-12 months), long-term (> 1 year)
- Capital: For portfolio allocation and risk estimation
- Risk appetite: Conservative / Balanced / Aggressive
Step 1: Real-time Data (TradingView Scanner)
TradingView scanner works WITHOUT auth:
🇻🇳 VN Stocks
CODEBLOCK0
🇺🇸 US Stocks
CODEBLOCK1
🌍 Global Markets (Crypto, Forex, Commodities)
CODEBLOCK2
Manually fetch multiple tickers (any market):
import urllib.request, json
# VN stocks
payload = {
"symbols": {"tickers": ["HOSE:MBB","HOSE:TCB","HOSE:FPT"]},
"columns": ["name","close","change","volume","RSI","EMA20","EMA50","EMA200",
"MACD.macd","MACD.signal","BB.upper","BB.lower",
"price_52_week_high","price_52_week_low","Stoch.K","Stoch.D"]
}
req = urllib.request.Request(
"https://scanner.tradingview.com/vietnam/scan",
data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json", "User-Agent": "Mozilla/5.0"},
method="POST"
)
# US stocks → "https://scanner.tradingview.com/america/scan"
# Crypto → "https://scanner.tradingview.com/crypto/scan"
# Forex → "https://scanner.tradingview.com/forex/scan"
# Commodities → "https://scanner.tradingview.com/cfd/scan"
Step 2: Technical Analysis (Applies to ALL asset classes)
Read each indicator in priority order:
1. EMA200 — Check FIRST
- -
close > EMA200 ✅ → Long-term uptrend intact → consider buying - INLINECODE4 ❌ → Long-term downtrend → be cautious, buy only with a clear catalyst
⚠️ Do NOT buy oversold assets below EMA200 (unless there is a clear catalyst)
2. RSI(14)
| RSI | Signal | Action |
|---|
| < 30 | 🟢🟢 Extreme oversold | Consider strong buy if above EMA200 |
| 30–40 |
🟢 Oversold | DCA if above EMA200 |
| 40–60 | 🟡 Neutral | Hold / wait |
| 60–70 | 🔴 Near overbought | Do not add positions |
| > 70 | 🔴🔴 Overbought | Consider taking profit |
3. MACD
- -
macd > signal → 🟢 Bullish momentum - INLINECODE6 → 🔴 Bearish momentum
- MACD just crossed above signal in negative zone → strong buy signal
4. Bollinger Bands
- -
close ≤ BB.lower → Near lower band → potential bounce - BB squeezing → strong move coming, wait for breakout
5. Stochastic K/D
- - K < 20: Oversold | K > 80: Overbought
- K cắt lên D ở vùng < 20 → mua signal
6. 52W Position
pos52 = (close - low52w) / (high52w - low52w) × 100
- - < 20%: Near 52W low — good value zone
- > 80%: Near 52W high — high momentum but risky
🎯 Buy Zone Score (composite)
score = 0
if rsi < 30: score += 3
elif rsi < 40: score += 2
if close > ema200: score += 2
if pe_discount > 20%: score += 3 # P/E < Fair P/E - 20%
elif pe_discount > 0: score += 2
if pos52 < 20: score += 2
elif pos52 < 40: score += 1
if close <= bb_lower * 1.02: score += 2
if macd > macd_signal: score += 1
# Max: 15 điểm
# ≥ 10: Mua mạnh | 7-9: DCA | 4-6: Theo dõi | < 4: Bỏ qua
Step 3: Valuation Analysis — MANDATORY (Stocks & ETF)
Do NOT recommend BUY without checking valuation.
P/E Analysis
Upside = (Fair P/E - Current P/E) / Fair P/E × 100%
| Upside | Assessment |
|---|
| > 25% | 🟢 Very cheap — buy |
| 10–25% |
🟡 Slightly cheap — accumulate |
| 0–10% | 🟡 Fair — OK |
| < 0% | 🔴 Expensive — wait for correction |
| < -15% | 🔴🔴 Very expensive — avoid |
Fair P/E by VN sector:
- - Ngân hàng: 10–12x | Công nghệ: 20–25x | Thép: 8–12x
- Tiêu dùng: 15–22x | BĐS: 12–18x | Dầu khí: 10–14x
Fair P/E by US sector: (Xem chi tiết references/us-equities.md)
- - Tech (mega): 25–30x | Tech (growth): 30–45x | Healthcare: 16–20x
- Financials (banks): 10–13x | Energy: 10–14x | Consumer Disc.: 22–28x
- US dùng Forward P/E nhiều hơn Trailing P/E
- PEG Ratio = P/E / EPS Growth Rate → PEG < 1.0 = rẻ tương đối
See details in references/sector-fundamentals.md (VN) và references/us-equities.md (US)
Other Fundamental Metrics
- - ROE > 15%: tốt | > 20%: xuất sắc
- D/E < 1.0: ít nợ (ngân hàng ngoại lệ)
- FCF dương: công ty sinh tiền thực
- EPS CAGR: driver chính của giá dài hạn
See full framework in references/financial-analysis-knowledge.md
Step 4: Sector & Catalyst Analysis
🇻🇳 VN Sectors
Reference
references/sector-fundamentals.md và
references/sector-update-2026.md.
Catalyst VN 2026-2028:
- - Nâng hạng thị trường FTSE/MSCI → vốn ngoại đổ vào
- Lãi suất giảm → P/E hợp lý cao hơn, BĐS phục hồi
- Đầu tư công tăng → thép, vật liệu xây dựng
- GDP 6-7%/năm → ngân hàng, tiêu dùng
🇺🇸 US Sectors
Reference
references/us-equities.md.
Catalyst US 2026-2028:
- - AI revolution → NVDA, MSFT, GOOG, META, AMZN
- FED rate cuts → growth stocks rally, REITs phục hồi
- Infrastructure spending → industrials, materials
- GLP-1 drugs → LLY, NVO, healthcare sector
Always answer:
- 1. Where is the sector in the cycle? (growth / peak / recession / bottom)
- What are the catalysts for the next 1-3 years?
- What are the main risks?
Step 5: US Equities Analysis
When user asks about US stocks (AAPL, NVDA, TSLA, MSFT, GOOG, META, AMZN, v.v.):
Workflow:
- 1. Scan data:
scan_global.py --market us hoặc fetch trực tiếp - Technical: Áp dụng Step 2 (EMA200, RSI, MACD, BB)
- Valuation: Forward P/E vs sector average, PEG ratio
- Earnings: Check earnings calendar — KHÔNG mua ngay trước earnings
- Macro: FED rate path, US 10Y yield, DXY ảnh hưởng
Key Metrics for US Stocks:
- - Forward P/E (quan trọng hơn trailing)
- PEG Ratio (< 1.0 = rẻ, 1.0-2.0 = hợp lý, > 2.0 = đắt)
- FCF Yield (FCF / Market Cap — > 5% = tốt)
- Revenue Growth (YoY — quan trọng cho tech)
- Gross Margin (>60% cho software, >40% cho hardware)
US vs VN Differences:
- - US trade pre/after-market → gap risk cao hơn
- Earnings season 4 lần/năm → stock có thể ±20% trong 1 ngày
- Options market rất active → đọc implied volatility
- Buyback programs → hỗ trợ giá (AAPL buyback $100B+/năm)
- US dùng fractional shares → mua $10 NVDA được
See details: references/us-equities.md
Step 6: Forex Analysis
When user asks about forex (EUR/USD, USD/JPY, GBP/USD, v.v.):
Workflow:
- 1. Scan: INLINECODE17
- Macro check: Interest rate differential giữa 2 đồng tiền
- Technical: EMA, RSI, Fibonacci, pivot points
- Session timing: Asian/European/US session
- Risk: Swap rates, leverage management
Key Pairs & Factors:
| Cặp | Key Factors |
|---|
| EUR/USD | FED vs ECB rates, trade balance EU-US |
| USD/JPY |
FED vs BOJ, risk sentiment, carry trade |
| GBP/USD | BOE rate, Brexit effects, UK economy |
| AUD/USD | RBA rate, commodities (iron ore), China demand |
| USD/VND | SBV policy, trade balance VN, FDI flows |
Session Times (VN time):
- - London-NY overlap (19:30-23:00 VN) = best time to trade
- Asian session (06:00-14:00) = range-bound, phù hợp range trading
- London open (14:00-17:00) = breakout Asian range
Risk Management Forex:
- - 2% rule: Max risk 2% account per trade
- Leverage max 1:30 cho beginner
- ATR-based stop loss: SL = 1.5-2x ATR(14)
See details: references/forex-guide.md
Step 7: Commodities Analysis (Gold, Oil, Silver)
When user asks about gold (XAUUSD), oil (WTI/Brent), silver (XAGUSD):
Workflow:
- 1. Scan: INLINECODE19
- Macro: Real rates (US 10Y - CPI), DXY, geopolitics
- Technical: EMA200, RSI, Fibonacci retracement
- Specific factors: (xem bên dưới)
🥇 Gold (XAUUSD):
- - Bullish khi: Real rates giảm, DXY yếu, risk-off, NHTW mua vàng
- Bearish khi: Real rates tăng, DXY mạnh, risk-on
- Key levels: Round numbers ($4000, $4500, $5000)
- Seasonal: Thường mạnh Q1 và Q4
- See details: INLINECODE20
🛢️ Oil (WTI / Brent):
- - Bullish khi: OPEC+ cắt sản lượng, geopolitics (Iran/ME), demand tăng
- Bearish khi: Recession fears, OPEC+ tăng sản lượng, US shale tăng
- Key data: EIA Weekly Inventory, Baker Hughes Rig Count
- Correlation: USD/CAD (inverse), energy stocks (positive)
🥈 Silver (XAGUSD):
- - Dual nature: Industrial metal + precious metal
- Gold/Silver Ratio: > 80 = bạc rẻ tương đối, < 60 = bạc đắt
- Volatile hơn vàng: Beta ~1.5-2x so với gold
Step 8: Global ETF Analysis
When user asks about ETF (VOO, QQQ, VNM, v.v.):
Workflow:
- 1. Identify need: Core portfolio? Sector bet? Country exposure?
- Compare: Expense ratio, tracking error, AUM, liquidity
- Technical: Áp dụng EMA200, RSI cho ETF chart
- DCA plan: Phân bổ theo risk profile
Quick ETF Recommendations:
| Purpose | ETF | Expense | Notes |
|---|
| Core US | VOO / IVV | 0.03% | S&P 500, portfolio foundation |
| Tech/Growth |
QQQ / QQQM | 0.15-0.20% | NASDAQ 100, AI exposure |
| VN Exposure | VNM | 0.66% | VanEck Vietnam ETF |
| Emerging Markets | VWO / IEMG | 0.08-0.09% | Broad EM |
| Bonds | BND / AGG | 0.03% | US total bond |
| Gold | GLD / IAU | 0.25-0.40% | Physical gold ETF |
| All-World | VT | 0.07% | Toàn cầu, lazy portfolio |
DCA Portfolios:
Conservative: VOO 40% + BND 30% + VWO 15% + GLD 15%
Balanced: VOO 45% + QQQ 20% + VWO 15% + BND 10% + GLD 10%
Aggressive: QQQ 35% + VOO 25% + VWO/VNM 20% + ARKK/SOXX 10% + GLD 10%
See details: references/global-etf.md
Step 9: Portfolio Management
When user asks about portfolio management, rebalancing, asset allocation, or building a new portfolio:
Option 1: Analyze Existing Portfolio → Rebalance
CODEBLOCK7
Input:
- -
--portfolio : Current portfolio dạng "MÃ:tỷ_trọng%,..." - INLINECODE23 : Total capital (VND)
- INLINECODE24 :
conservative | balanced | INLINECODE27
Output:
- - Portfolio analysis: return, volatility, Sharpe, max drawdown
- Assessment: concentration, diversification, risk fit
- Correlation matrix between assets
- Rebalance recommendation via Markowitz Mean-Variance
- Before/after rebalance comparison
- Bear/Base/Bull return scenarios
- Implementation plan
Supported asset classes: VN stocks, US stocks, ETF, crypto (BTC/ETH/BNB/SOL...), gold (GOLD/XAUUSD), forex, bonds (BOND), cash (CASH)
Option 2: Scan Market → Recommend New Portfolio
CODEBLOCK8
Input:
- -
--capital : Total capital (VND) - INLINECODE29 :
conservative | balanced | INLINECODE32 - INLINECODE33 :
vn,us,crypto,gold (chọn thị trường) - INLINECODE35 :
short (< 3 tháng) | medium (3-12 tháng) | long (> 1 năm)
Output:
- - Real-time TradingView scan to find top assets by score
- Allocation by risk profile:
-
Conservative: 50% bonds/cash, 30% blue chip, 15% gold, 5% crypto
-
Balanced: 30% blue chip, 25% growth, 20% gold, 15% ETF, 10% crypto
-
Aggressive: 35% growth, 25% crypto, 20% midcap, 15% forex/commodities, 5% commodities
- - Specific ticker list + allocation + rationale
- Expected return range (Bear/Base/Bull)
- Suggested DCA schedule by horizon
Risk Profiles:
| Profile | Max single | Max equity | Max crypto | Min safe assets | Target Vol |
|---|
| Conservative | 25% | 40% | 5% | 35% | 12% |
| Balanced |
30% | 60% | 15% | 20% | 18% |
| Aggressive | 35% | 80% | 25% | 5% | 25% |
Step 10: Return Estimation
CODEBLOCK9
Script calculates from historical data:
- - CAGR 3Y/5Y (compound annual growth rate)
- Volatility hàng năm (annualized volatility)
- Max Drawdown (maximum drawdown from peak)
- Sharpe Ratio (return/risk)
- 3 scenarios Bear/Base/Bull × 6M/1Y/3Y/5Y
⚠️ Always remind user:
- - Historical CAGR is from past ENTRY price, not current price
- If current P/E is already high → realistic estimate is lower than historical CAGR
- Compare with: bank deposit 5.5%/year (VN), US Treasury 4.5%/year, VN-Index ~11%/year, S&P 500 ~12%/year
See full methodology in references/return-estimation.md
Step 11: Portfolio Allocation (Global)
When user asks how to allocate capital:
Sizing by Sharpe
| Sharpe | Max allocation |
|---|
| > 1.5 | 35% |
| 1.0–1.5 |
25% |
| 0.5–1.0 | 15% |
| < 0.5 | 10% |
Sizing by Max Drawdown
| Max DD | Max allocation |
|---|
| < 30% | 30% |
| 30–50% |
20% |
| 50–70% | 10% |
| > 70% | 5% |
Global Portfolio Framework:
| Asset Class | Conservative | Balanced | Aggressive |
|---|
| VN Stocks | 20% | 25% | 30% |
| US Stocks/ETF |
30% | 35% | 35% |
| Bonds/Cash | 25% | 10% | 5% |
| Gold | 15% | 15% | 10% |
| Crypto | 0% | 5% | 10% |
| Forex/Commodities | 0% | 5% | 10% |
| EM ETF | 10% | 5% | 0% |
DCA Strategy
- - Don't go all-in at once
- Split into 3-5 purchases over 4-8 weeks
- Buy more when RSI drops to oversold zone
- ETF DCA: Same day each month, don't time the market
Step 12: Output Formats
📊 VN Stock Output
CODEBLOCK10
🇺🇸 US Stock Output
CODEBLOCK11
💱 Forex Output
CODEBLOCK12
🏆 Commodity Output
CODEBLOCK13
📈 ETF Output
## 📈 [ETF] — [Name]
Price: $XXX.XX | YTD: +/-X.XX% | Expense: X.XX% | Yield: X.X%
### Technical
- RSI: XX.X | EMA200: $XXX [▲/▼]
- Drawdown từ ATH: -X.X%
### So sánh
- vs S&P 500: [outperform/underperform] XX%
- vs category: [ranking]
### DCA Estimate ($XXX/tháng)
- 5 năm: ~$XX,XXX (gốc $XX,XXX, lãi ~$XX,XXX)
- 10 năm: ~$XX,XXX
### Conclusion
[🟢 DCA / 🟡 CHỜ / 🔴 TRÁNH]
Step 13: Swing Trading (VN)
When user asks about swing trading, scalping, day trading, or short-term trading (2-10 days):
Full reference: INLINECODE40
Quick Workflow
- 1. Screening: Chạy swing screener tìm mã phù hợp
CODEBLOCK15
- 2. Technical check (swing-specific):
- RSI divergence (bullish/bearish) trên D1
- MACD crossover position (vùng âm = mua mạnh)
- Bollinger squeeze → chờ breakout
- ADX > 25 → trend đủ mạnh để swing
- 3. Entry criteria:
- R:R tối thiểu 1:2 (KHÔNG trade nếu < 1:2)
- Volume xác nhận (> 1.5x avg 20 phiên)
- Stop loss xác định TRƯỚC khi vào lệnh
- 4. Position sizing:
- 2% rule: Max risk 2% vốn per trade
- Max 3-5 vị thế swing cùng lúc
Output Format (Swing)
## 🏄 [TICKER] — Swing Analysis
Setup: [RSI Divergence / BB Squeeze / MACD Cross / ...]
Entry: X,XXX VND | Stop Loss: X,XXX (-X%) | Target: X,XXX (+X%)
R:R: 1:X | Position Size: X% vốn (XX CP)
Timeframe: X-X ngày
⚡ Confidence: [Cao/Trung bình/Thấp]
References
VN Market
- -
references/sector-fundamentals.md — Standard P/E, catalyst, risk per VN sector - INLINECODE42 — Sector update Q1/2026
- INLINECODE43 — Swing trading, scalping VN
US & Global
- -
references/us-equities.md — Top 20 S&P 500, US sector breakdown, P/E benchmarks, ADR/OTC - INLINECODE45 — Major/cross pairs, factors, sessions, swap rates
- INLINECODE46 — VOO/QQQ/SPY comparison, VNM ETF, EM ETFs, Bond ETFs, DCA strategy
Macro & Asset-specific
- -
references/macro-update-2026-03.md — Macro context 03/2026: FED, VN-Index, Iran War - INLINECODE48 — Crypto/BNB analysis framework
- INLINECODE49 — Gold XAUUSD analysis framework
Knowledge Base
- -
references/financial-analysis-knowledge.md — RSI, MACD, P/E, Sharpe, DCA, Global portfolio - INLINECODE51 — Fibonacci, Elliott Wave, Volume Profile
- INLINECODE52 — Return estimation methodology
Scripts
- -
scripts/scan_market.py — Scan VN + US exchanges (HOSE, HNX, NASDAQ, NYSE) - INLINECODE54 — Scan global markets (US, crypto, forex, commodities)
- INLINECODE55 — Deep technical analysis for a single ticker
- INLINECODE56 — Estimate returns from historical data
- INLINECODE57 — Calculate monthly DCA accumulation
- INLINECODE58 — Analyze existing portfolio → rebalance recommendation (Markowitz)
- INLINECODE59 — Scan market → recommend new optimal portfolio
DCA Calculator:
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/dca_calculator.py [monthly_vnd] [years]
# Example: 2 million VND/month, 10 years
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/dca_calculator.py 2000000 10
⚠️ Analysis is for reference only, not investment advice. DYOR.
全球市场分析师
全球资产分析——越南股票、美股、外汇、大宗商品、加密货币、ETF——实时技术面+基本面+估值+收益估算。
⚠️ 最重要原则
历史复合年增长率 ≠ 当前价格的预期。
始终要问:如果今天以这个价格买入,市盈率是多少?还便宜吗?
示例:MCH 从3万底部起复合年增长率73%/年→但当前价格16.1万,市盈率~37倍是昂贵的。
夏普比率2.19是历史低价区的数据——不适用于今天的买家。
第0步:了解需求并检查宏观环境
在分析任何资产之前,始终检查:
🇻🇳 越南宏观
当前宏观背景(更新于2026年3月23日):
- - 🔴 VN-指数:~1,604 — 本月下跌14%,外资净卖出 -27,591万亿越盾年初至今
- 🟢 FTSE升级越南 → 2026年9月21日生效 → 最大催化剂
- 越南国家银行利率:维持不变,跟随美联储
- 2026年GDP目标:6.5-7%
🇺🇸 美国宏观
- - 美联储利率:3.5-3.75%(2026年3月18日维持不变,鹰派——2026年仅预期降息一次)
- PCE通胀率:2.7%(从2.4%上调)
- 失业率: ~4.0%(稳定)
- 标普500: 从历史高点回调约5-8%,科技股领跌
- 美国10年期国债收益率: ~4.2-4.4%
🌍 全球宏观
- - 🔴 伊朗战争持续 — WTI原油 $95-99,威胁霍尔木兹海峡
- 黄金 XAUUSD: ~$4,362(从历史高点 $5,608 回调-15%)
- DXY(美元指数): ~103-105
- BNB: 避险压力,生态系统仍然强劲(TVL $6.7B,全球排名第3)
- 欧洲央行利率: ~3.0%,逐步降息
- 日本央行利率: ~0.5%,刚从0.25%上调
投资组合影响:
- - 🟢 积累:MBB(市盈率6.5倍)、黄金、标普500 ETF(VOO)
- 🟢 定投:FPT(市盈率13-14倍,异常便宜但低于EMA200)
- ⏳ 持有:BNB(等待美联储降息)、TCB、AAPL、MSFT
- 🔴 避免:VCB(市盈率昂贵)、房地产(利率上升)、新加密货币、迷因币
- 🟢 新买入:GAS/PVS(受益于高油价)、能源ETF(XLE)
详见:references/macro-update-2026-03.md、references/crypto-analysis.md、references/gold-analysis.md
确定:
- - 资产类别:越南股票?美股?外汇?黄金?加密货币?ETF?
- 目标:寻找新机会?分析特定标的?估算收益?扫描市场?
- 持有期限:短期(< 3个月)、中期(3-12个月)、长期(> 1年)
- 资金:用于投资组合配置和风险评估
- 风险偏好:保守型 / 平衡型 / 进取型
第1步:实时数据(TradingView扫描器)
TradingView扫描器无需认证即可使用:
🇻🇳 越南股票
bash
扫描所有HOSE超卖股票
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/scan_market.py --rsi 40 --exchange HOSE
单只越南股票深度技术分析
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/analyze_stock.py FPT HOSE
🇺🇸 美股
bash
扫描纳斯达克超卖(大盘股 > $2B)
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/scan_market.py --rsi 40 --exchange NASDAQ
扫描纽交所
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/scan_market.py --rsi 35 --exchange NYSE
🌍 全球市场(加密货币、外汇、大宗商品)
bash
扫描美股(大盘股 > $10B)
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/scan_global.py --market us --rsi 40
扫描加密货币
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/scan_global.py --market crypto --rsi 35
扫描外汇主要货币对
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/scan_global.py --market forex
扫描大宗商品(黄金、原油、白银)
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/scan_global.py --market commodities
扫描所有市场
python3 ~/.openclaw/workspace/skills/market-analyst/scripts/scan_global.py --market all --rsi 40
手动获取多个标的(任何市场):
python
import urllib.request, json
越南股票
payload = {
symbols: {tickers: [HOSE:MBB,HOSE:TCB,HOSE:FPT]},
columns: [name,close,change,volume,RSI,EMA20,EMA50,EMA200,
MACD.macd,MACD.signal,BB.upper,BB.lower,
price
52week
high,price52
weeklow,Stoch.K,Stoch.D]
}
req = urllib.request.Request(
https://scanner.tradingview.com/vietnam/scan,
data=json.dumps(payload).encode(),
headers={Content-Type: application/json, User-Agent: Mozilla/5.0},
method=POST
)
美股 → https://scanner.tradingview.com/america/scan
加密货币 → https://scanner.tradingview.com/crypto/scan
外汇 → https://scanner.tradingview.com/forex/scan
大宗商品 → https://scanner.tradingview.com/cfd/scan
第2步:技术分析(适用于所有资产类别)
按优先级顺序阅读每个指标:
1. EMA200 — 首先检查
- - 收盘价 > EMA200 ✅ → 长期上升趋势完好 → 考虑买入
- 收盘价 < EMA200 ❌ → 长期下降趋势 → 谨慎,仅在明确催化剂下买入
⚠️ 不要买入低于EMA200的超卖资产(除非有明确催化剂)
2. RSI(14)
| RSI | 信号 | 操作 |
|---|
| < 30 | 🟢🟢 极度超卖 | 若高于EMA200则考虑强力买入 |
| 30–40 |
🟢 超卖 | 若高于EMA200则定投 |
| 40–60 | 🟡 中性 | 持有 / 等待 |
| 60–70 | 🔴 接近超买 | 不加仓 |
| > 70 | 🔴🔴 超买 | 考虑获利了结 |
3. MACD
- - macd > signal → 🟢 看涨动能
- macd < signal → 🔴 看跌动能
- MACD在负值区域刚刚上穿信号线 → 强烈买入信号
4. 布林带
- - 收盘价 ≤ BB.lower → 接近下轨 → 潜在反弹
- BB收窄 → 即将出现大幅波动,等待突破
5. 随机指标K/D
- - K < 20:超卖 | K > 80:超买
- K在< 20区域上穿D → 买入信号
6. 52周位置
pos52 = (收盘价 - 52周最低价) / (52周最高价 - 52周最低价) × 100
- - < 20%:接近52周低点 — 良好价值区域
- > 80%:接近52周高点 — 高动能但风险较高
🎯 买入区域评分(综合)
python
score = 0
if rsi < 30: score += 3
elif rsi < 40: score += 2
if close > ema200: score += 2
if pe_discount > 20%: score += 3 # 市盈率 < 合理市盈率 -