minute-analysis
하는 일
이 스킬은 1분봉이나 5분봉 같은 짧은 간격의 가격 캔들을 가져와 장중 시험을 실행합니다. 하루 안에서 거래하는 트레이더를 위한 스킬입니다.
사용하는 경우
- ✓암호화폐나 주식의 5분봉이나 1시간봉 가격 막대를 보고 싶을 때.
- ✓과거 분 단위 데이터로 장중 전략을 시험하고 싶을 때.
- ✓거래를 위해 VWAP나 TWAP 같은 장중 지표가 필요한 경우.
스킬 링크
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/minute-analysis/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“지난 2주 동안의 비트코인 5분봉 캔들을 가져와서 간단한 전략을 시험해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 데이터 출처에서 캔들을 내려받고 VWAP 같은 장중 지표를 계산합니다. 설정 파일에서 짧은 간격을 지정하면, 이 캔들은 백테스트 엔진에도 입력될 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Minute-Level Data Analysis and Backtesting
Purpose
Retrieve minute-level candlestick data through data-source APIs and calculate intraday indicators (VWAP, TWAP, volume distribution, and more).
Supports minute-level backtesting: set "interval": "5m" in config.json and use the backtest tool to run intraday strategies.
Backtest Configuration
For minute-level backtests, simply add the interval field in config.json:
{
"source": "okx",
"codes": ["BTC-USDT"],
"start_date": "2026-03-01",
"end_date": "2026-03-15",
"interval": "5m",
"initial_cash": 1000000,
"commission": 0.0005
}
- The annualization factor is inferred automatically from
source + interval(OKX 5m = 365 x 288 = 105120) - Minute-level datasets are large. Recommended time limits: no more than 7 days for
1m, no more than 30 days for5m, and no more than 1 year for1H
Supported Data Sources and Intervals
| Data Source | Supported Intervals | Notes |
|---|---|---|
| OKX | 1m/5m/15m/30m/1H/4H | Cryptocurrency, trades 7x24 |
| Tushare | 1m/5m/15m/30m/1H | China A-shares, requires score >= 2000 |
| yfinance | 1m/5m/15m/30m/1H | Hong Kong / US equities (free, no key required) |
OKX Minute Candlestick API
import requests
import pandas as pd
resp = requests.get("https://www.okx.com/api/v5/market/candles", params={
"instId": "BTC-USDT",
"bar": "1m", # 1m/5m/15m/30m/1H/4H
"limit": "300", # At most 300 rows per request
})
data = resp.json()["data"]
columns = ["ts", "open", "high", "low", "close", "vol", "volCcy", "volCcyQuote", "confirm"]
df = pd.DataFrame(reversed(data), columns=columns)
df["ts"] = pd.to_datetime(df["ts"].astype("int64"), unit="ms")
for col in ["open", "high", "low", "close", "vol"]:
df[col] = df[col].astype(float)
Indicator Calculation Templates
VWAP (Volume-Weighted Average Price)
typical_price = (df["high"] + df["low"] + df["close"]) / 3
df["vwap"] = (typical_price * df["vol"]).cumsum() / df["vol"].cumsum()
TWAP (Time-Weighted Average Price)
df["twap"] = df["close"].expanding().mean()
Volume Distribution
df["vol_pct"] = df["vol"] / df["vol"].sum() * 100
hourly_vol = df.set_index("ts").resample("1h")["vol"].sum()
Parameters
| Parameter | Description |
|---|---|
| inst_id | Trading pair, such as "BTC-USDT" |
| bar / interval | Candlestick interval: 1m/5m/15m/30m/1H/4H |
| limit | Number of records to retrieve (OKX returns at most 300 per request) |
Common Pitfalls
- OKX returns at most 300 rows per request. The loader paginates automatically, but
1mdatasets are still very large - The time range for minute-level backtests should not be too long, otherwise both data retrieval and backtesting will become slow or time out
- Tushare minute endpoints require a score >= 2000. If the score is insufficient, the API returns empty data
- Timestamps are Unix timestamps in milliseconds and should be converted with
unit="ms" - Transaction costs for minute strategies should be set lower (for example 0.05% instead of 0.1%) because intraday trading is frequent
Dependencies
pip install pandas numpy requests
자주 묻는 질문
어떤 데이터 출처를 지원하나요?
암호화폐는 OKX, 중국 A주는 Tushare, 홍콩과 미국 주식은 yfinance를 지원합니다.
요청할 수 있는 데이터 양에 제한이 있나요?
네. 스킬은 1분 데이터는 최대 7일, 5분 데이터는 최대 30일을 권장합니다.
API 키가 필요한가요?
OKX와 yfinance는 키가 필요 없습니다. Tushare는 2000점 이상의 계정이 필요합니다.
상세 정보
작성자의 원본 설명
Minute-level data analysis and backtesting. Retrieves minute candlesticks through OKX/Tushare/yfinance and can be used both for analysis and as input to the backtest engine.
repo: HKUDS/Vibe-Trading
인기도
- GitHub 스타
- 37k
- 순위
- #7532
- 라이선스
- 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을 출력하도록 돕습니다.