options-strategy
하는 일
이 스킬은 과거 가격 데이터로 옵션 거래 전략을 시험합니다. 여러 다리로 이루어진 옵션 포트폴리오가 과거에 어떻게 성과를 냈을지 보려는 트레이더와 연구자를 위한 스킬입니다.
사용하는 경우
- ✓과거 가격으로 커버드 콜이나 프로텍티브 풋 전략을 시험하고 싶을 때.
- ✓아이언 콘도르, 버터플라이, 캘린더 스프레드 아이디어를 비교할 때.
- ✓옵션 전략의 수명 동안 그릭스 노출이 어떻게 변하는지 보고 싶은 경우.
스킬 링크
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/options-strategy/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 암호화폐 가격 이력으로 커버드 콜 전략을 백테스트하고 결과를 보여 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 Black-Scholes 모델로 기초자산 가격에서 옵션 가격을 추정합니다. 그다음 각 포지션의 수익, 그릭스, 만기 행사를 시간에 따라 시뮬레이션합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Purpose
Backtesting of option portfolio strategies. Starting from the underlying price, the engine synthesizes theoretical option prices with the Black-Scholes model, then simulates PnL, Greeks exposure, and expiration exercise for multi-leg option portfolios.
Applicable scenarios:
- Hedging strategies (
covered call,protective put) - Volatility trading (
straddle,strangle) - Spread strategies (
iron condor,butterfly,calendar spread) - Option pricing analysis and Greeks sensitivity research
Supported Strategy Types
| Strategy | Structure | Applicable Market View |
|---|---|---|
| Covered Call | Hold underlying + short call | Mildly bullish, collect premium |
| Protective Put | Hold underlying + long put | Bullish but wants downside protection |
| Straddle | Buy same-strike call + put | Expect large movement, direction uncertain |
| Strangle | Buy different-strike call + put | Expect large movement, lower cost |
| Iron Condor | Sell put spread + sell call spread | Range-bound market, collect premium |
| Butterfly | Buy low call + sell 2 middle calls + buy high call | Expect narrow-range movement |
| Calendar Spread | Sell near-month + buy far-month at same strike | Exploit differences in time decay |
OptionsSignalEngine Interface
Write the strategy in code/signal_engine.py, with class name SignalEngine, implementing the generate method:
class SignalEngine:
"""Option strategy signal engine."""
def generate(self, data_map: dict) -> list:
"""Generate option trading instructions.
Args:
data_map: code -> DataFrame (columns: open, high, low, close, volume)
Returns:
List of trading instructions. Each instruction has the format:
{
"date": "2024-01-15", # Trading date
"action": "open" / "close", # Open or close position
"underlying": "BTC-USDT", # Underlying code
"legs": [ # List of option legs
{
"type": "call" / "put", # Option type
"strike": 50000, # Strike price
"expiry": "2024-02-15", # Expiration date
"qty": 1 # Quantity (positive = long, negative = short)
}
]
}
"""
Multi-Leg Combination Example
Iron Condor opening signal:
{
"date": "2024-01-15",
"action": "open",
"underlying": "000300.SH",
"legs": [
{"type": "put", "strike": 3800, "expiry": "2024-02-15", "qty": -1}, # Sell put
{"type": "put", "strike": 3700, "expiry": "2024-02-15", "qty": 1}, # Buy protective put
{"type": "call", "strike": 4200, "expiry": "2024-02-15", "qty": -1}, # Sell call
{"type": "call", "strike": 4300, "expiry": "2024-02-15", "qty": 1}, # Buy protective call
]
}
Ready-made engines for covered call, cash-secured put, iron condor,
vol-gated short strangle and protective put live in
example_signal_engine.py next to this file.
config.json Format
{
"codes": ["000300.SH"],
"start_date": "2020-01-01",
"end_date": "2024-12-31",
"source": "tushare",
"engine": "options",
"initial_cash": 1000000,
"commission": 0.001,
"options_config": {
"risk_free_rate": 0.05,
"iv_source": "historical",
"contract_multiplier": 1.0,
"same_day_fill": false,
"default_iv": 0.3
}
}
Key fields:
enginemust be set to"options"so the runner selects the option backtest engineoptions_config.risk_free_rate: risk-free rate, default0.05options_config.iv_source: volatility source, currently supports"historical"(30-day rolling historical volatility computed from underlying closes)options_config.contract_multiplier: contract multiplier, default1.0options_config.same_day_fill:false(default) fills a signal dated T on the next bar's close;truerestores the legacy same-date fill (signal and fill share T's close and IV)options_config.default_iv: volatility used for bars without a full rolling window (warm-up and NaN gaps), default0.3; must be finite and positive
BS Model Principles
Black-Scholes formula (European options):
Call = S * N(d1) - K * e^(-rT) * N(d2)
Put = K * e^(-rT) * N(-d2) - S * N(-d1)
d1 = [ln(S/K) + (r + sigma^2/2) *
자주 묻는 질문
실제 옵션 가격이 필요한가요?
아닙니다. 기초자산 가격으로 Black-Scholes를 써서 이론 가격을 만듭니다.
어떤 시장에 맞나요?
스킬은 암호화폐 옵션과 주식 옵션 모두에 적합하다고 설명합니다.
아이언 콘도르란 무엇인가요?
풋 스프레드와 콜 스프레드를 함께 팔아 프리미엄을 얻는, 가격이 일정 범위에 머무는 것을 노리는 전략입니다.
상세 정보
작성자의 원본 설명
Options strategy framework supporting Black-Scholes pricing, Greeks analysis, and multi-leg backtesting. Suitable for cryptocurrency and equity options.
repo: HKUDS/Vibe-Trading
인기도
- GitHub 스타
- 37k
- 순위
- #7539
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
vibe-trading
37k에이전트에게 백테스트, 팩터 분석, 옵션 가격 결정, 여러 시장의 시장 데이터를 포함하는 완전한 금융 연구 도구 모음을 제공합니다.
adr-hshare
37k에이전트에게 미국 ADR과 홍콩 주식처럼 여러 시장에 상장된 중국 기업의 가격을 비교하는 방법을 보여 줍니다.
akshare
37k에이전트가 API 키 없이 중국과 해외 주식, 선물, 외환, 경제 지표의 무료 시장 데이터를 가져오도록 돕습니다.
alpha-zoo
37k에이전트가 만들어진 주식 팩터 라이브러리를 둘러보고, 선택한 시장에서 팩터 묶음이 수익률을 얼마나 잘 예측하는지 시험하도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.