
Alpaca AI 交易代理黑客马拉松(Claude + Alpaca MCP)的自主 SPY 卖出信用价差代理
概览
一个自主期权代理(2026年8月28日-9月4日)。它每周销售一张确定风险的SPY看跌期权差价,针对Alpaca纸质账户的比例,并让Claude通过官方与Alpaca沟通,决定交易距离、金额或是否交易。 每个交易早晨:买回昨日剩余的价差(~09:40 ET),然后卖出带有空头行权价差的SPY看跌价差(1DTE)。每个周期持有一晚;无止损;最后一天不入场,因此账户在判断时为平稳。 这就是周策略的竞赛周节奏:研究规则卖出利差——但在一周竞赛中,允许只做一笔交易,且在2026年8月波动率(~隐含10%)下,5美元宽度的周价差支付率低于0.10美元,因此代理人的信用底线正确拒绝了该价差。日数据显示了权利金实际所在位置:到期时0.6%场外价差支付~0.07美元;到期时,同样的行权价差支付~0美元。
概述(AI 翻译)
Alpaca AI 交易代理黑客松(2026年8月28日 – 9月4日)的自主期权代理。 它每周在一个Alpaca纸质账户上出售一张确定风险的SPY看跌信用差价,账户规模为 账户中选定的部分,并让克劳德——通过官方与羊驼交谈 羊驼MCP服务器——决定距离、大小,或者是否交换。
规则
每个交易早晨:买回昨天剩余的利差(~09:40 ET),然后 卖出一个SPY看跌价差,空头执行价差低于市场0.6%,宽5美元。 **于下一个交易日(1DTE)到期。每个周期持有一晚;无止损;无入场 在最后一天,所以评判时账户是平的。
这就是周策略的竞赛周节奏:研究规则卖出利差 ~比本周末到期市场低3%——但在一周的竞争中 允许仅有一笔交易,且在2026年8月波动率(~隐含10%)时,周利差支付 宽度5美元不到0.10美元,因此代理人的信用底线正确拒绝了该信息。每日数据 显示了权利金实际所在位置:今天**到期,0.6%的价差收益率为~0.07美元;
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Spread Sentinel
An autonomous options agent for the Alpaca AI Trading Agents Hackathon (Aug 28 – Sep 4, 2026). It sells one defined-risk SPY put credit spread a week on an Alpaca paper account, sized to a chosen fraction of the account, and lets Claude — talking to Alpaca through the official Alpaca MCP server — decide the distance, the size, or whether to trade at all.
The rule
Every trading morning: buy back yesterday’s spread for whatever remains (~09:40 ET), then sell a SPY put spread with the short strike ~0.6% below the market, $5 wide, expiring the next trading day (1DTE). One night held per cycle; no stop-loss; no entry on the final day, so the account is flat when it is judged.
This is the contest-week cadence of a weekly strategy: the researched rule sells the spread ~3% below the market expiring at the end of the week — but in a one-week contest that allows exactly one trade, and at August-2026 volatility (~10% implied) the weekly spread paid under $0.10 on $5 of width, so the agent’s credit floor correctly refused it. The daily data showed where the premium actually lives: expiring today, a 0.6%-OTM spread pays ~$0.07; expiring tomorrow, the same strike pays ~$0.65 — almost all of a short-dated spread’s credit is payment for the overnight gap. So the contest cycle holds exactly one night: same shape as the research (short put spread, defined risk, hold to expiry), three full cycles instead of zero, and each morning’s buy-back realises the P&L before the next entry.
Why the strategy — from a backtest of 1,751 weeks (Jan 1993 – Aug 2026; real Alpaca option fills for every week since Feb 2024, a VIX-calibrated model before that, real SPY settlement throughout):
| Weekly win rate | Mean return on capital at risk | Loses when | |
|---|---|---|---|
| 3% OTM, hold to expiry | 93–98% | +1.7% (30 yr) · +4.3% (2023–26) | SPY falls >3% by expiry |
Things that were tested and rejected: a stop on the short-strike touch (60% of touches recover to a full win — the stop turns +3,873%/36 mo into +11%), take-profit/stop-multiple exits, iron condors, single-name underlyings, and sitting out payroll weeks (no effect over 30 years).
Sizing is the only real lever, so it is the agent’s main decision: at 70% of the account at risk a normal week is ≈ +5% and a bad week is −70%; the odds don’t change with size.
What the AI does
Before each entry agent.js builds the trade from live quotes, then asks Claude (headless,
with the Alpaca MCP server and web search) to:
- sanity-check the option quotes through the MCP tools (stale marks, wide markets, odd skew);
- read the calendar and the news for the expiry window (jobs report, CPI, FOMC, ISM, index-moving earnings, shock language);
- return a JSON verdict —
enter/skip, 3% or 4% OTM, 70% or 50% risk — with a reason a judge can read.
Every step is appended to journal/YYYY-MM-DD.md: the gate’s reasoning and transcript, the
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →