Install
$ agentstack add skill-thanhdatngo2003-claude-market-skills-market-trading-strategy ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Market Trading Strategy — Decision Framework
> ⛔ CRITICAL: LẤY GIÁ TỪ SCRIPT/API — KHÔNG BAO GIỜ WEBSEARCH GIÁ > > Hành động ĐẦU TIÊN: chạy python scripts/analyze_all.py [TICKER1] [TICKER2] ... > Script dùng VPS API (realtime) + yfinance (fallback) để lấy giá CHÍNH XÁC từ sàn + phân tích kỹ thuật + cơ bản + dự báo. > Nếu script fail: dùng WebFetch gọi https://bgapidatafeed.vps.com.vn/getliststockdata/[TICKER] > > KHÔNG BAO GIỜ WebSearch giá. WebSearch chỉ cho: tin tức, sentiment, analyst, bear case. > > Entry/Exit/SL/TP PHẢI dựa trên giá từ script/API — sai giá 2-3% = sai SL/TP = lỗ thật.
🧠 BƯỚC 0 — ĐỌC JOURNAL TRƯỚC KHI PHÂN TÍCH (Learning Loop)
Skill này có bộ nhớ dài hạn lưu tại ~/.claude/skills-data/market-analyst/. Mỗi lần phân tích đều được ghi journal và Claude phải đọc track record cũ trước khi đưa ra recommendation mới.
Quy trình BẮT BUỘC:
- Trước phân tích — chạy:
python scripts/journal_manager.py context [TICKER] --price [GIA_HIEN_TAI]
- Trả về: track record cũ, calibration score, lessons learned, lịch sử thesis
- Nếu
bull_hit_rate/dev/null
python scripts/analyze_all.py HPG VIX
Script sử dụng VPS API (realtime, không cần package) + yfinance (fallback) để lấy:
- ✅ Giá REALTIME chính xác từ sàn (VPS API: `bgapidatafeed.vps.com.vn`)
- ✅ OHLC, volume, khối ngoại mua/bán, order book, room ngoại
- ✅ Phân tích kỹ thuật: RSI, MACD, Bollinger, Ichimoku, VWAP, Elliott Wave, S/R
- ✅ Phân tích cơ bản: P/E, ROE, margins, Piotroski F-Score (từ yfinance)
- ✅ Dự báo 3 kịch bản Bull/Base/Bear
- ✅ `IMPORTANT_INSTRUCTIONS` — liệt kê những gì CẦN và KHÔNG CẦN WebSearch
**Lưu ý giá VPS API:** Trả theo đơn vị nghìn (18.1 = 18,100 VND). Script tự convert.
**Entry/Exit/SL/TP PHẢI dựa trên giá từ script/API** — đây là nguồn chính xác duy nhất. **KHÔNG BAO GIỜ** tính entry/SL/TP dựa trên giá từ bài báo — giá báo delay có thể khiến SL đặt sai vùng, kích hoạt sớm hoặc không bảo vệ được vốn.
**Ưu tiên 2 — Nếu script fail (ví dụ trong Claude.ai sandbox):** Dùng **WebFetch** gọi VPS API trực tiếp:
WebFetch URL: https://bgapidatafeed.vps.com.vn/getliststockdata/[TICKER] Prompt: "Trả về JSON: lastPrice, r, c, f, highPrice, lowPrice, openPrice, lot, fBVol, fSVolume, fRoom, avePrice"
Gọi TỪNG MÃ MỘT. Nếu fail, THỬ LẠI 1 lần.
**Ưu tiên 3 — Fallback cuối cùng:** WebSearch giá từ `finance.vietstock.vn` hoặc `cafef.vn`. Phải có giá chính xác trước khi tiếp tục.
## Bước 1.5: Hiểu bối cảnh người dùng
Thu thập: vốn, mục tiêu (ngắn/trung/dài hạn), mức chấp nhận rủi ro, kinh nghiệm. Hỏi lại nếu thiếu — tư vấn không có context cá nhân thì generic và có thể gây hại.
## Bước 2: WebSearch BỔ SUNG (CHỈ cho tin tức & sentiment)
WebSearch KHÔNG dùng để lấy:
- ❌ Giá cổ phiếu (đã có từ VPS API)
- ❌ OHLC, volume, khối ngoại (đã có từ VPS API)
WebSearch CHỈ dùng cho:
- ✅ Tin tức mới nhất ảnh hưởng giá
- ✅ Analyst consensus & khuyến nghị
- ✅ Bear case / rủi ro / contrarian
- ✅ Insider activity
- ✅ Bối cảnh vĩ mô
### Tại sao cần research kỹ trước khi cho trade signal
Một buy signal dựa trên data cũ hoặc thiếu context có thể dẫn đến lỗ. Tin tức 1 ngày trước có thể thay đổi hoàn toàn setup. Contrarian research giúp tránh FOMO — mua đỉnh vì ai cũng nói "mua".
**Data bổ sung (2-3 queries):**
"[ticker] tin tức mới nhất ảnh hưởng giá" "[ticker] KQKD quý gần nhất" "VN-Index xu hướng hiện tại"
**Contrarian / Bear case (2-3 queries) — BẮT BUỘC trước mọi buy signal:**
"[ticker] rủi ro downside 2026" "[ticker] bear case analysis" "[ticker] khối ngoại bán insider bán"
Tại sao contrarian check quan trọng cho trading: nếu bạn đang mua, ai đang bán? Họ biết gì mà bạn chưa biết? Nếu consensus quá bullish → phần lớn demand đã thể hiện trong giá → upside hạn chế.
**Mid/small cap entries (1-2 queries nếu relevant):**
"cổ phiếu midcap breakout tuần này VN" "small cap VN volume đột biến"
Mid/small cap thường có entry opportunities tốt hơn blue-chip vì ít bị coverage → market inefficiency lớn hơn → alpha tiềm năng cao hơn. Nhưng rủi ro cũng cao hơn (thanh khoản thấp, thông tin ít).
### Nguồn data bổ sung
- Script/VPS API đã cung cấp giá realtime — dùng làm nền tảng cho entry/exit/SL/TP
- WebSearch cho tin tức, sentiment, contrarian analysis, và bối cảnh
## Bước 3: Dự báo 3 kịch bản — TRƯỚC KHI ra signal
Tại sao forecast trước signal: signal (MUA/BÁN/CHỜ) phải dựa trên expected return, không phải cảm tính. Nếu bull case +20% (30%) và bear case -15% (30%) và base +5% (40%), expected return = +4% — có thể không đáng risk.
| Kịch bản | Xác suất | Target | Return | Trigger |
|-----------|----------|--------|--------|---------|
| Bull | 25-30% | [giá] | +X% | [điều kiện] |
| Base | 45-55% | [giá] | +Y% | [kịch bản trung tâm] |
| Bear | 20-30% | [giá] | -Z% | [rủi ro hiện thực hóa] |
**Expected Return = Sum(probability x return)**
- Expected Return > 15%: Signal MUA nếu R:R > 1:2
- Expected Return 5-15%: Signal THEO DÕI, chờ entry tốt hơn
- Expected Return = 1:2, đỏ nếu < 1:1.5
**Kịch bản tabs (switchable):**
- Tab Tốt: Giá tăng → chốt TP1, TP2, trailing stop
- Tab Xấu: Stop loss kích hoạt, tổn thất bao nhiêu tiền
- Tab Sideway: Giữ hay thoát, opportunity cost
**Mid/Small Cap Entry Notes (nếu applicable):**
- Lưu ý thanh khoản: "Volume TB 500 triệu/phiên → limit order, không market order"
- Spread awareness: "Spread 1-2% → factor vào entry/exit cost"
- Scale in strategy: "Chia entry 3 đợt thay vì all-in vì thanh khoản thấp"
Nếu hỏi **phân bổ vốn:**
- Allocation chart (donut hoặc horizontal stacked bars)
- Bảng: Tài sản | Tỷ trọng % | Số tiền | Lý do
- Lịch triển khai (không đổ hết 1 lần)
Nếu hỏi **DCA:**
- DCA plan: Tháng | Số tiền | Phân bổ theo tài sản
- Tổng dự kiến sau N tháng
- Quy tắc kỷ luật: mua đều dù thị trường lên/xuống
**Expandable:**
- Phân tích kỹ thuật chi tiết
- Phân tích cơ bản chi tiết
- Contrarian / Bear case tổng hợp
- Risk Management Plan
- Macro context
**Disclaimer đầy đủ — bắt buộc**
### Expert Voice
Viết như portfolio manager brief trực tiếp:
- "Với vốn 200 triệu, risk 2%/lệnh = 4 triệu max loss. Entry HPG tại 26,500, SL 25,000 (gap risk -5.7%) → position size = 2,600 CP. TP1: 29,000 (+9.4%), TP2: 32,000 (+20.8%). R:R = 1:1.65 tại TP1, 1:3.6 tại TP2."
- Cụ thể, có số, có logic rõ ràng
- Ghi rõ: "Dữ liệu tính đến [ngày]. Kiểm tra lại giá trước khi đặt lệnh."
## References
- `references/market-analyst-guide.md` — Framework chuyên gia, mục 5 & 6
- `references/risk_management.md` — Position sizing, stop loss strategies
- `references/indicator_guide.md` — Tín hiệu entry/exit
- `references/ichimoku_guide.md` — Ichimoku Cloud signals cho entry/exit
- `references/vwap_guide.md` — VWAP levels cho institutional flow
- `references/deep_research.md` — Multi-source research
- `references/expert_persona.md` — Expert reasoning
- `references/vn_market_guide.md` — T+2, biên độ +-7%, thuế 0.1%
- `references/upgrade_rules.md` — Quy tắc nâng cấp v5
---
## Nhắc lại: Script trước, WebSearch sau
Nếu bạn chưa chạy `python scripts/analyze_all.py`, DỪNG LẠI và chạy script ngay bây giờ. Entry/Exit/SL/TP PHẢI dùng giá từ script/API.
## Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- **Author:** [ThanhDatNgo2003](https://github.com/ThanhDatNgo2003)
- **Source:** [ThanhDatNgo2003/claude-market-skills](https://github.com/ThanhDatNgo2003/claude-market-skills)
- **License:** MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.