Skip to main content
ClaudeWave
Skill12k repo starsupdated today

akshare

AKShare is a free, open-source Python library that aggregates financial market data from Chinese and global public sources without requiring API keys or registration. Use it to retrieve historical OHLCV data, real-time quotes, and macro indicators for A-shares, US stocks, Hong Kong stocks, futures, and forex rates across multiple timeframes from intraday to daily periods.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/akshare && cp -r /tmp/akshare/agent/src/skills/akshare ~/.claude/skills/akshare
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

## Overview

AKShare is a completely free, open-source Python financial data library. No registration or API key required. It aggregates data from public sources (Sina, East Money, etc.) covering Chinese and global markets.

- GitHub: https://github.com/akfamily/akshare (18k+ stars)
- Install: `pip install akshare`

## Quick Start

```python
import akshare as ak

# A-share daily OHLCV (前复权)
df = ak.stock_zh_a_hist(symbol="000001", period="daily",
                         start_date="20240101", end_date="20260101", adjust="qfq")

# US stock daily
df = ak.stock_us_hist(symbol="105.AAPL", period="daily",
                       start_date="20240101", end_date="20260101", adjust="qfq")

# HK stock daily
df = ak.stock_hk_hist(symbol="00700", period="daily",
                       start_date="20240101", end_date="20260101", adjust="qfq")
```

## Top 10 High-Frequency Interfaces

### A-shares

| Function | Description | Key Params |
|----------|-------------|------------|
| `stock_zh_a_hist()` | A-share OHLCV | symbol, period, start_date, end_date, adjust |
| `stock_zh_a_spot_em()` | Real-time A-share quotes | (none) |
| `stock_individual_info_em()` | Stock basic info | symbol |
| `stock_zh_a_hist_min_em()` | Intraday bars | symbol, period(1/5/15/30/60) |

### US / HK

| Function | Description | Key Params |
|----------|-------------|------------|
| `stock_us_hist()` | US stock OHLCV | symbol (e.g. "105.AAPL"), period, start_date, end_date |
| `stock_hk_hist()` | HK stock OHLCV | symbol (e.g. "00700"), period, start_date, end_date |

### Macro / Forex / Futures

| Function | Description |
|----------|-------------|
| `macro_china_gdp()` | China GDP data |
| `macro_china_cpi()` | China CPI data |
| `futures_main_sina()` | Futures main contract quotes |
| `currency_boc_sina()` | BOC forex rates |

## Column Names

AKShare returns Chinese column names by default:

| Chinese | English | Description |
|---------|---------|-------------|
| 日期 | date | Trade date |
| 开盘 | open | Open price |
| 最高 | high | High price |
| 最低 | low | Low price |
| 收盘 | close | Close price |
| 成交量 | volume | Volume |
| 成交额 | amount | Turnover |
| 涨跌幅 | pct_change | % change |
| 换手率 | turnover_rate | Turnover rate |

## Date Format

- Input: `YYYYMMDD` string (e.g. `"20240101"`)
- Output: `日期` column as string, convert with `pd.to_datetime()`

## Symbol Format

- A-shares: pure digits `"000001"` (no .SZ suffix)
- US stocks: `"105.AAPL"` (NASDAQ prefix 105), `"106.BABA"` (NYSE prefix 106)
- HK stocks: `"00700"` (5-digit zero-padded)

## Built-in Loader

The project has a built-in AKShare DataLoader at `backtest/loaders/akshare_loader.py`. When backtesting, the runner automatically falls back to AKShare when tushare/yfinance are unavailable.

## Reference Docs

For less common interfaces, see the `references/` subdirectory or the official docs at https://akshare.akfamily.xyz/
vibe-tradingSkill

Professional finance research toolkit — backtesting (7 engines + benchmark comparison panel), factor analysis, Alpha Zoo (452 pre-built alphas across qlib158/alpha101/gtja191/academic), options pricing, 77 finance skills, 29 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 7 data sources (tushare, yfinance, okx, akshare, mootdx, ccxt, futu).

adr-hshareSkill

ADR/H-share/A-share cross-listing premium analysis — track pricing gaps between US-listed ADRs, HK-listed H-shares, and A-shares for arbitrage signals, dual-listing valuation, and delisting risk assessment.

alpha-zooSkill

Browse and bench the bundled alpha zoos — prebuilt cross-sectional factor libraries (Kakushadze 101, GTJA 191, Qlib 158, Fama-French / Carhart). Use when the user asks "which alphas exist", wants metadata on a named alpha, or wants to run IC/IR on a whole zoo over a universe.

ashare-pre-st-filterSkill

A 股 ST/*ST 风险预测框架 — 基于最新中报/三季报或业绩预告/快报,预测下一财年是否会因营收、利润、净资产、分红不达标而被风险警示,并将新浪监管处罚记录作为独立证据面纳入风险等级。仅适用于 A 股,不预测财务造假。

asset-allocationSkill

Asset allocation theory and optimizer usage — MPT / Black-Litterman / risk budgeting / all-weather strategy, including guides for 4 optimizers and rebalancing rules.

backtest-diagnoseSkill

Diagnose failed or underperforming backtests, locate the root cause, and fix the issue

behavioral-financeSkill

Behavioral finance applications: theories of overreaction and underreaction, behavioral explanations for momentum and reversal, investor sentiment cycles, cognitive-bias checklists, and debiasing quantitative strategies.

candlestickSkill

Candlestick pattern recognition engine, pure pandas vectorized implementation of 15 classic candlestick patterns (5 single-candle + 5 double-candle + 4 triple-candle + 1 trend confirmation), generating a composite signal from bullish/bearish pattern scores.