Logo van Alpaca Trading

Alpaca Trading

Community
mickpletcher
alpaca-trading

Work safely in the Trading repository for Alpaca helpers, backtesting, journaling, scheduling, and related PowerShell modules. Prefer additive changes, preserve existing trading logic unless the user asks otherwise, and default to paper-trading-safe guidance.

Overzicht

Uitgevermickpletcher
RepositoryAI-Skills
Skillnaamalpaca-trading
Sterren
21
Forks
3
Meegeleverde bestanden
3
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 3

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door mickpletcher op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Alpaca Trading in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/mickpletcher/AI-Skills/tree/main/claude/skills/alpaca-trading
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mickpletcher/AI-Skills.git /tmp/AI-Skills
mkdir -p .claude/skills
cp -r /tmp/AI-Skills/claude/skills/alpaca-trading .claude/skills/alpaca-trading
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Alpaca Trading in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Alpaca Trading automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Alpaca Trading niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Alpaca Trading

Intent

Support safe paper trading, Alpaca automation, broker workflow analysis, and Trading repo changes without increasing live trading risk.

Do Not Use When

  • Do not use for financial advice, guaranteed performance claims, live order execution without explicit user instruction, or unrelated trading platforms.
  • Required context is missing and cannot be reasonably inferred.
  • A more specific skill in this repo is a better match.

Use this skill when the user is working in the Trading repository on Alpaca-connected scripts, backtesting workflows, journaling, scheduling, or reusable PowerShell Alpaca modules.

Trigger When

  • The user mentions the Trading repo, Alpaca scripts, paper trading, backtesting, journaling, scheduler jobs, or Alpaca PowerShell modules.
  • The task touches Alpaca/, Backtesting/, Journal/, Scheduler/, src/, Tests/, rsi_macd_bot/, or btc-signal-executor/.
  • The user wants to build, extend, debug, document, test, or review repo workflows around Alpaca trading.

Repo Shape

The current repository is a mixed Python and PowerShell project with these main areas:

text
Trading/
|-- Alpaca/
|-- Backtesting/
|-- Journal/
|-- Scheduler/
|-- src/
|-- Tests/
|-- rsi_macd_bot/
`-- btc-signal-executor/

Use the existing structure instead of inventing a new module layout.

Default Behavior

  • Preserve what already exists unless the user asks for a larger redesign.
  • Prefer additive scaffolding over speculative rewrites of trading logic.
  • Default to paper-trading-safe patterns and make live-trading risk explicit.
  • Keep API secrets in environment variables or existing repo config flows, never hardcoded.
  • Align with the repo's existing GitHub Spec workflow for non-trivial changes.

Workflow

  1. Identify which existing repo area the change belongs to.
  2. Read the nearby README, script, or module before proposing changes.
  3. Reuse current patterns for Python, PowerShell, logging, and tests.
  4. For non-trivial work, follow the repo workflow: requirements, spec, plan, tasks, implementation, audit, regression test.
  5. Prefer paper-trading examples unless the user explicitly asks for live-trading support.
  6. If live-trading code is requested, require explicit confirmation patterns and keep the safety guard intact.
  7. Update docs and tests alongside behavior changes.

Safety Rules

  • Default to the Alpaca paper endpoint unless the user explicitly requests live trading.
  • Never remove a live-trading confirmation guard from real-money scripts.
  • Treat AI analysis as advisory only. Do not let model output directly trigger order placement without deterministic code checks.
  • Log trade actions and failures using the repo's existing logging and journal patterns.
  • Call out when a request would move from paper trading into live execution risk.

Implementation Notes

Python And PowerShell

  • The repo is mixed-stack. Do not force everything into one language.
  • Alpaca/ contains existing paper-trading helpers.
  • src/ contains reusable PowerShell Alpaca modules such as auth, config, market data, risk, orders, positions, and account helpers.
  • Tests/ contains Python and PowerShell verification coverage.

Live Trading Guard

If a script can send live orders, include an explicit confirmation gate and make the live path opt-in.

powershell
param(
    [switch]$LiveTrading
)

if ($LiveTrading) {
    $Confirm = Read-Host "Type CONFIRM to proceed with live trading"
    if ($Confirm -ne "CONFIRM") {
        exit 0
    }
}

AI Coaching Pattern

If AI analysis is added, keep it advisory:

  • AI returns a labeled assessment such as BULLISH, BEARISH, or NEUTRAL
  • deterministic code applies risk checks and order rules
  • model output alone must not place an order

Alpaca Capability Profile

Tailor repo advice to how Alpaca actually behaves rather than generic broker assumptions:

  • Paper and live use the same API shape but different endpoints; paper fills are simulated and optimistic, so backtest and paper results overstate live fill quality, especially for market orders in thin symbols.
  • Fractional shares trade market-only and have order type restrictions; do not propose fractional limit logic.
  • Bracket and OCO orders are supported but legs cannot be amended freely; cancel and replace is the realistic pattern.
  • Crypto trading has different fee, precision, and minimum rules than equities; do not reuse equity assumptions in btc-signal-executor/.
  • Equity market data on the free tier is IEX-only and delayed for some uses; flag when a strategy assumes SIP-quality data the account may not have.
  • PDT rules apply to margin equity accounts under $25k; day trading logic should check account status instead of assuming.

When a proposal depends on an Alpaca behavior not listed here, verify it against current Alpaca docs instead of assuming.

Order Lifecycle Checklist

Before proposing or reviewing a change that touches order placement, walk the full lifecycle:

  • Entry: validated symbol, side, quantity, and order type; idempotency or duplicate-submit protection; behavior when the market is closed
  • Open order: what happens to unfilled limit orders at end of day; time-in-force is explicit, not defaulted silently
  • Partial fills: position sizing, journaling, and exit logic handle a partially filled entry without double-ordering
  • Exits: stop and target exist before or at entry (bracket or managed); exit logic survives a restart with positions already open
  • Cancel/replace: replaces are atomic from the strategy's view; stale order IDs are not reused
  • Failure paths: rejected orders, API errors, and timeouts are logged to the journal and do not leave untracked positions

A change is incomplete if it improves one lifecycle stage and silently breaks another.

Regression Test Matrix

Map the kind of change to the test passes that must run before it ships:

Change touchesRun
src/ PowerShell modulesPester tests in Tests/, plus a paper-endpoint smoke call for the touched module
Alpaca/ helpersPython tests in Tests/, paper-endpoint smoke test
Order or risk logic anywhereFull Tests/ suite plus a paper trade round trip: place, verify, cancel
Backtesting/Backtest determinism check: same data in, same results out, before and after
Scheduler/Dry-run the scheduled job manually and verify journal output
rsi_macd_bot/ or btc-signal-executor/That bot's own tests plus a paper session observed end to end

If a needed test does not exist, write it as part of the change rather than noting it as a gap.

Constraints

  • Do not invent folders like PaperTrading, LiveTrading, TradeJournal, or AICoaching if the work belongs in the current repo structure.
  • Do not hardcode credentials.
  • Do not rewrite business logic just to modernize style.
  • Do not describe the repo as a Claude-only system; it is a general trading repo with Claude-relevant integrations.

References

  • Root repo guide: Trading/README.md
  • GitHub Spec baseline: Trading/specs/001-core-trading-foundation/
  • Copilot instructions already present in the repo: Trading/.github/copilot-instructions.md

Validation Checklist

  • Repo area matches the real Trading repository layout
  • Paper trading is the default path in examples and guidance
  • Live trading remains explicit and guarded
  • Secrets are sourced from environment variables or existing config flows
  • Changes preserve existing trading logic unless requested otherwise
  • Docs and tests are updated when behavior changes

Help And Examples

If the user is not sure how to use this skill, asks what it needs, or asks for examples:

  • Explain in plain language what this skill can do.
  • Tell the user the minimum input needed for a useful first pass.
  • Show the example prompts below.
  • Offer the fastest next prompt the user can send.

Minimum useful input:

  • A trading goal, repo context, or strategy question plus any symbols, timeframes, or risk rules that matter.

Example prompts:

  • Use alpaca-trading to review my Trading repo and tell me the safest way to add bracket orders.
  • Help me build an Alpaca paper trading workflow for SPY with clear entry, exit, and risk rules.
  • Show me how to use this skill for a repo level trading automation plan.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Alpaca Trading?

Work safely in the Trading repository for Alpaca helpers, backtesting, journaling, scheduling, and related PowerShell modules. Prefer additive changes, preserve existing trading logic unless the user asks otherwise, and default to paper-trading-safe guidance.

Waarom Alpaca Trading gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Alpaca Trading bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Alpaca Trading in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/mickpletcher/AI-Skills/tree/main/claude/skills/alpaca-trading. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Alpaca Trading gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Alpaca Trading gebruiken?

Zoveel als je wilt. Je kunt Alpaca Trading gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Alpaca Trading gratis?

Ja. Deze skill is door mickpletcher op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇