Agent skill

Minute-Level Data and Backtesting

by HKUDS in HKUDS/Vibe-Trading

Fetches minute candlesticks from OKX, Tushare or yfinance, computes intraday VWAP, TWAP and volume distribution, and runs minute-level backtests by setting an interval in config.json.

MITAuto-check passedBusiness, Finance & HR

Install Minute-Level Data and Backtesting

skills CLI
$ npx skills add HKUDS/Vibe-Trading --skill minute-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/Vibe-Trading minute-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/minute-analysis .claude/skills/minute-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
minute-analysis
GitHub stars
35k
Token cost
~868 tokens
SKILL.md length
266 words
Files
2
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Fetches minute candlesticks from OKX, Tushare or yfinance, computes intraday VWAP, TWAP and volume distribution, and runs minute-level backtests by setting an interval in config.json.

  • Pulling minute candles for intraday analysis from OKX, Tushare or yfinance
  • SKILL.md covers Purpose, Backtest Configuration, Supported Data Sources and… and OKX Minute Candlestick API, plus 4 more sections
  • Runs Python scripts from its folder; calls pip; reaches okx.com
  • Running a 5-minute backtest by adding interval to config.json

What it does

The skill retrieves minute-level candles through data source APIs and shows indicator templates for VWAP, TWAP and the hourly volume distribution. For backtests the only change is an interval field in config.json, such as 5m, and the annualization factor is inferred from the source and interval. Supported sources are OKX for crypto from 1m to 4H, Tushare for A-shares and yfinance for Hong Kong and US stocks.

Practical limits are spelled out: minute datasets are large, so the recommended ranges are no more than 7 days for 1m, 30 days for 5m and a year for 1H. OKX returns at most 300 rows per request and the loader paginates, Tushare minute endpoints need a score of at least 2000 or return empty data, and timestamps are millisecond Unix values that need unit ms when converted. An example_signal_engine.py file is included.

When your agent uses it

  • Pulling minute candles for intraday analysis from OKX, Tushare or yfinance
  • Running a 5-minute backtest by adding interval to config.json
  • Computing VWAP, TWAP or intraday volume distribution
  • Choosing a safe time range for 1m or 5m backtests

Example prompts

  • “Download 5-minute BTC-USDT candles from OKX for the last week and compute VWAP.”
  • “Backtest my signal engine on 5m bars by setting the interval in config.json.”
  • “Why does my Tushare minute query come back empty?”
  • “Show the hourly volume distribution for this trading pair.”

Requirements

  • API access to OKX, Tushare (score of at least 2000) or yfinance
  • Python with pandas and requests

What it can do on your machine

Read from SKILL.md and the folder at commit 14cabaf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • okx.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Minute-Level Data and Backtesting loads about 868 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 266 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~868

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/Vibe-Trading at commit 14cabaf, republished under its MIT licence (© HKUDS). 266 words, ~868 tokens.

Download SKILL.mdSave it as .claude/skills/minute-analysis/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
minute-analysis
description
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.
category
strategy

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:

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 SourceSupported IntervalsNotes
OKX1m/5m/15m/30m/1H/4HCryptocurrency, trades 7x24
Tushare1m/5m/15m/30m/1HChina A-shares, requires score >= 2000
yfinance1m/5m/15m/30m/1HHong Kong / US equities (free, no key required)

OKX Minute Candlestick API

python
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)
python
typical_price = (df["high"] + df["low"] + df["close"]) / 3
df["vwap"] = (typical_price * df["vol"]).cumsum() / df["vol"].cumsum()
TWAP (Time-Weighted Average Price)
python
df["twap"] = df["close"].expanding().mean()
Volume Distribution
python
df["vol_pct"] = df["vol"] / df["vol"].sum() * 100
hourly_vol = df.set_index("ts").resample("1h")["vol"].sum()

Parameters

ParameterDescription
inst_idTrading pair, such as "BTC-USDT"
bar / intervalCandlestick interval: 1m/5m/15m/30m/1H/4H
limitNumber 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

bash
pip install pandas numpy requests

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in agent/src/skills/minute-analysis of HKUDS/Vibe-Trading.

  • SKILL.md
  • example_signal_engine.py

Open the folder on GitHubat commit 14cabaf

Compare with similar skills

Minute-Level Data and Backtesting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Minute-Level Data and Backtesting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Minute-Level Data and Backtesting this skillHKUDS/Vibe-Trading35k—~868Automated safety check: PassMIT
Tushare Datazillionare/zillionare3192 repos~2.3kAutomated safety check: PassNone
WorldQuant BRAIN Alpha ResearchQuantML-Research/wq-alpha-research405—~4.9kAutomated safety check: PassNone
Regimejackson-video-resources/markov-hedge-fund-method483—~1.6kAutomated safety check: PassCustom licence
Polymarket Tennislivetennisapi/livetennisapi-mcp152—~3kAutomated safety check: PassMIT
Yahoo Finance24mlight/StockClaw1012 repos~1.1kAutomated safety check: NotesMIT

Similar skills

  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    319 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed
  • WorldQuant BRAIN Alpha Research

    QuantML-Research/wq-alpha-research

    Chinese-language playbook for WorldQuant BRAIN alphas: choose fields, write expressions, backtest, diagnose check failures, tune turnover, submit and build portfolios.

    405 GitHub stars~4.9k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • Regime

    jackson-video-resources/markov-hedge-fund-method

    Detect the market regime (Bull / Bear / Sideways) for ANY asset and turn it into a tradeable signal or a risk filter.

    483 GitHub stars~1.6k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Polymarket Tennis

    livetennisapi/livetennisapi-mcp

    Build observe-only Polymarket and Kalshi tennis market tooling on the polymarket-tennis Python package (MIT) plus the Live Tennis API free tier.

    152 GitHub stars~3k tokensUpdated 2 days ago
    Business, Finance & HRAuto-check passed
  • Yahoo Finance

    24mlight/StockClaw

    Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance.

    101 GitHub starsUsed in 2 repos~1.1k tokens
    Business, Finance & HRAuto-check: notes
  • Okx Sentiment Tracker

    dex-original/okx-agent-trade-kit

    A skill your agent uses when the user asks about: 'any crypto news', 'latest news', 'market update', 'daily briefing', 'BTC news', 'ETH news', 'news on SOL', 'search SEC ETF', 'regulation news'…

    109 GitHub starsUsed in 1 repo~3.8k tokens
    Business, Finance & HRAuto-check passed

More from HKUDS/Vibe-Trading

All 89 skills in this repo
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • OKX Market Data

    HKUDS/Vibe-Trading

    Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

    35k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • A-Share ST Risk Screener

    HKUDS/Vibe-Trading

    Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.

    35k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.

    35k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.

    35k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed

Questions about Minute-Level Data and Backtesting

What does Minute-Level Data and Backtesting do?

Fetches minute candlesticks from OKX, Tushare or yfinance, computes intraday VWAP, TWAP and volume distribution, and runs minute-level backtests by setting an interval in config.json. The skill retrieves minute-level candles through data source APIs and shows indicator templates for VWAP, TWAP and the hourly volume distribution.json, such as 5m, and the annualization factor is inferred from the source and interval.

When should I use Minute-Level Data and Backtesting?

Minute-Level Data and Backtesting fits situations like: pulling minute candles for intraday analysis from OKX, Tushare or yfinance; running a 5-minute backtest by adding interval to config.json; computing VWAP, TWAP or intraday volume distribution; choosing a safe time range for 1m or 5m backtests.

How do I install Minute-Level Data and Backtesting in Claude Code?

Run `npx skills add HKUDS/Vibe-Trading --skill minute-analysis -a claude-code`. Or copy the skill folder (agent/src/skills/minute-analysis in HKUDS/Vibe-Trading) into .claude/skills/minute-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Minute-Level Data and Backtesting in Codex?

Run `npx skills add HKUDS/Vibe-Trading --skill minute-analysis -a codex`. Or copy the skill folder (agent/src/skills/minute-analysis in HKUDS/Vibe-Trading) into .agents/skills/minute-analysis in your project. Codex loads it when a task matches its description.

Can I use Minute-Level Data and Backtesting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --skill minute-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/minute-analysis, .gemini/skills/minute-analysis, .github/skills/minute-analysis and .opencode/skills/minute-analysis in your project.

What does Minute-Level Data and Backtesting need to run?

Going by SKILL.md and its folder, Minute-Level Data and Backtesting needs Python for the scripts in its folder and the command-line tools its instructions call (pip). Our summary lists: API access to OKX, Tushare (score of at least 2000) or yfinance; Python with pandas and requests.

Does Minute-Level Data and Backtesting access the network?

SKILL.md names 1 domain. In commands or code: okx.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Minute-Level Data and Backtesting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Minute-Level Data and Backtesting use?

Minute-Level Data and Backtesting is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Minute-Level Data and Backtesting use?

About 868 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Minute-Level Data and Backtesting?

Skills that share tags, products or a category with Minute-Level Data and Backtesting: Tushare Data (zillionare/zillionare, 319 stars), WorldQuant BRAIN Alpha Research (QuantML-Research/wq-alpha-research, 405 stars), Regime (jackson-video-resources/markov-hedge-fund-method, 483 stars) and Polymarket Tennis (livetennisapi/livetennisapi-mcp, 152 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Minute-Level Data and Backtesting?

HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 34,949 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.

Source: HKUDS/Vibe-Trading on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.