HS

hinderager/spread-sentinel

API development

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

0 stars 0 forks 품질 54 트렌드 14

Autonomous SPY put-credit-spread agent for the Alpaca AI Trading Agents Hackathon (Claude + Alpaca MCP)

개요

An autonomous options agent for the (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 — decide the distance, the size, or whether to trade at all. Every trading morning: buy back yesterday's spread for whatever remains (~09:40 ET), then sell a SPY put spread with the short strike , , (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 — 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 , a 0.6%-OTM spread pays ~$0.07; expiring , the same strike pays ~$0.

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:

  1. sanity-check the option quotes through the MCP tools (stale marks, wide markets, odd skew);
  2. read the calendar and the news for the expiry window (jobs report, CPI, FOMC, ISM, index-moving earnings, shock language);
  3. 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

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →