Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính7.4k · #13259

alice-analysis

Skill này làm gì

Skill này giải thích cách chạy các công thức ngắn để tính chỉ báo giao dịch từ giá trong quá khứ. Dành cho người phân tích thị trường muốn agent làm phần tính toán giúp mình.

Khi nào nên dùng

  • ✓Khi bạn muốn đường trung bình động hoặc một chỉ báo khác cho một cổ phiếu.
  • ✓Khi bạn cần chọn nguồn dữ liệu giá nào cho một mã.
  • ✓Khi bạn muốn một ảnh chụp nhanh về cách một cổ phiếu đã biến động.

Liên kết skill

https://github.com/TraderAlice/OpenAlice/blob/master/default/skills/alice-analysis/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/TraderAlice/OpenAlice/blob/master/default/skills/alice-analysis/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tính đường trung bình động 50 ngày của cổ phiếu Apple.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tìm chuỗi giá đúng theo ID của nó, chạy một công thức ngắn trên giá lịch sử, rồi trả về kết quả. Các công thức không thể thay đổi bất kỳ dữ liệu nào khác.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

alice analysis — Quant Calculator (v2)

A bounded, side-effect-free expression language for technical analysis. You write a short script; it fetches K-lines by barId and returns a value (or a panel of values). Get barIds from alice analysis search-bars first.

Example

alice market search-bars --query AAPL
alice analysis quant --script $'s = bars("alpaca-paper|AAPL", "1d", count=250)\nsma(s.close, 50)'

Choosing a source

search-bars federates broker and vendor bars. Choose a source by the asset, coverage and entitlement needed for the task. A broker feed is not necessarily realtime or complete; metadata reports its advertised capability. Different sources for the same asset remain separate barIds.

For custom processing, alice market bars ... --output bars.json returns raw OHLCV and metadata for local scripts. The calculator is an optional shortcut.

Vendor barIds infer the asset class from an exact catalog match. If lookup is unavailable or ambiguous, the calculator accepts an explicit asset= hint. Keyless exchange data sources such as binance-readonly are opt-in in Trading settings, so do not assume they exist before search-bars returns them.

No candidates for a non-US symbol? search-bars only fans out over the vendors that are on. A Taiwan or CN A-share searched by its native name can come back empty just because its vendor is off — alice market vendors to see what's available, alice market vendor-set --vendor twse --enabled true to add it (live immediately), then re-run search-bars. See the alice skill.

Language

A script is zero or more name = ... bindings, then a final result expression:

s = bars("alpaca-paper|AAPL", "1d", count=250)
sma(s.close, 50) - sma(s.close, 200)        # +ve = 50 above 200 (uptrend)

bars(barId, interval, count=, asOf=, start=, end=, asset=)

  • barId: "{source}|{symbol}" from search-bars. Broker (alpaca-paper|AAPL) or opt-in keyless exchange data (binance-readonly|BTC/USDT) needs NO asset=. Vendor sources resolve exact catalog matches; pass asset="equity"|"crypto"|"currency"|"commodity" when an explicit hint is needed.
  • interval: 1m 5m 15m 30m 1h 4h 1d 1w.
  • Window: count=N (most-recent N bars — the natural window for indicators), OR start=/end= (YYYY-MM-DD date range), OR end=+count= (point-in-time backtest).

Columns of a bars() series: s.open / s.high / s.low / s.close / s.volume.

Indexing: raw columns are series — index them: s.close[-1] (latest), s.close[-2] (one back). Indicators already return the latest scalar — do NOT index them (sma(s.close, 50), not sma(...)[-1]).

Arithmetic: + - * /, parentheses, unary minus.

Panels — batch many computations in one call

The result can be a labeled dict or a positional list (each entry a single value, max 200). Use this instead of calling the tool N times:

h1 = bars("yfinance|BTC-USD", "1h", count=250, asset="crypto")
h4 = bars("yfinance|BTC-USD", "4h", count=250, asset="crypto")
d1 = bars("yfinance|BTC-USD", "1d", count=250, asset="crypto")
{ "1h": rsi(h1.close, 14), "4h": rsi(h4.close, 14), "1d": rsi(d1.close, 14) }

→ { "1h": 53.2, "4h": 48.9, "1d": 61.4 }

Sibling verbs — dated reads

quant returns latest scalars with no dates. When you need the time axis or a dated research input, reach for these instead (see the retrospective skill for the full workflow):

  • alice analysis snapshot --query XLE [--asOf YYYY-MM-DD] — the honest as-of read: DATED bars (never past asOf — no lookahead), the latest print (close + vs-prevClose + day high/low + amplitude), compact levels, and a freshness contract (isLatestActual / staleTradingDays). Use this for "what does/did X look like", not a hand-rolled quant dump.
  • alice analysis quant … --dates — opt-in date axis on a quant result (dates[barId] for one interval; dates["barId@interval"] when the same barId is used at multiple intervals), to map a dumped series back to days.

Function catalog

Group Functions
Trend sma(s, n) ema(s, n) macd(s, fast, slow, signal) slope(s, n) (signed, rankable trend)
Momentum rsi(s, n=14) roc(s, n) (% change over n)
Volatility stdev(s) atr(high, low, close, n) bbands(s, n, std) zscore(s, n?) (how extended vs window)
Volume rvol(volume, n=20) obv(close, volume) mfi(high, low, close, volume, n=14) `
Câu hỏi thường gặp

Tôi có cần biết lập trình không?

Không. Bạn yêu cầu kết quả bạn muốn, và agent viết rồi chạy công thức ngắn.

Cái này có luôn cho giá thời gian thực không?

Không phải lúc nào. Skill lưu ý rằng nguồn dữ liệu của công ty môi giới có thể không theo thời gian thực hoặc không đầy đủ, nên bạn nên kiểm tra độ mới của dữ liệu.

Tôi có thể lấy dữ liệu giá thô không?

Có. Skill cũng giải thích cách lưu các thanh giá thô ra file để bạn tự phân tích.

Chi tiết

Mô tả gốc của tác giả

Optional technical-analysis formulas and snapshots through alice analysis. Documents the bounded expression language, barId source selection and panels. Raw K-lines for local scripts are available through alice market bars.

repo: TraderAlice/OpenAlice

Độ phổ biến

Sao GitHub
7.4k
Vị trí xếp hạng
#13259
Giấy phép
AGPL-3.0
Cập nhật
23/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự