
Alice Analysis
Optional technical-analysis formulas and snapshots through alice analysis.
Install
npx skills add TraderAlice/OpenAlice --skill alice-analysis -g -a claude-code -y- Repository
- TraderAlice/OpenAlice7.4k
- Category
- Engineering
- Updated
- 12d ago
- License
- AGPL-3.0
- Context cost
- Mediumabout 1,750 tokens
- Runs scripts
- No, instructions only
What it does
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.
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)
