alice-analysis
できること
このスキルは、過去の価格から取引の指標を計算する短い数式を実行する方法を説明します。市場を分析し、計算をエージェントにさせたい人向けです。
使う場面
- ✓ある株の移動平均や別の指標がほしいとき。
- ✓あるシンボルにどの価格データの情報源を使うか選ぶ必要があるとき。
- ✓ある株がどう動いてきたかの簡単な概要がほしいとき。
スキルのリンク
https://github.com/TraderAlice/OpenAlice/blob/master/default/skills/alice-analysis/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Apple の株の50日移動平均を計算してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、ID で正しい価格の系列を見つけ、過去の価格に対して短い数式を実行し、結果を返します。数式は他のデータを変えることはできません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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 NOasset=. Vendor sources resolve exact catalog matches; passasset="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), ORstart=/end=(YYYY-MM-DD date range), ORend=+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 pastasOf— 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) ` |
よくある質問
プログラミングを知っている必要がありますか?
いいえ。ほしい結果を頼めば、エージェントが短い数式を書いて実行します。
これは常にライブの価格を出しますか?
必ずしもそうではありません。ブローカーのフィードはリアルタイムでも完全でもないことがあるため、データの鮮度を確認すべきだと、スキルは述べています。
生の価格データを自分で取得できますか?
はい。スキルは、独自の分析のために、生の価格のバーをファイルに保存する方法も説明しています。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 7.4k
- ランキング
- #13259
- ライセンス
- AGPL-3.0
- 更新日
- 2026/10/23
コメント
- …
このリポジトリの他のスキル
alice-uta
7.4k接続したブローカーの口座、保有銘柄、価格、注文の履歴を確認し、取引の操作は特に慎重に扱うようエージェントを支援します。
alice
7.4kalice ツールを通して、銘柄を検索し、調査のデータを取り出し、OpenAlice のチームの受信箱と課題を扱うようエージェントを支援します。
build-thesis
7.4k1つの株について、数字と市場の流れの両方を検証し、どこで間違っているかも明示した、バランスのとれた投資の見立てを組み立てるようエージェントを支援します。
delegate-autoquant
7.4k定量的な調査の質問を、専用の AutoQuant のデスクに渡し、根拠のある答えを持ち帰るようエージェントを支援します。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。