본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트37k · #7532

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/minute-analysis/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 for 5m, and no more than 1 year for 1H

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 1m datasets 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬