来源信息
- 仓库
- brycewang-stanford/Auto-Empirical-Research-Skills
- 最近来源活动
- 2026年4月3日 02:07
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 3,291
- 分支
- 432
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
菜单
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills --skill akshare-finance-data命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
中英双语学术降 AIGC / bilingual academic de-AIGC skill. Removes AI-generated writing signatures from empirical papers in economics, management, and the social sciences — in both English and Chinese. Covers Turnitin AI, GPTZero, Originality.ai on the English side and 知网 AMLC, 万方, 维普 on the Chinese side. Uses a six-step loop (intake → audit → claim-evidence check → differentiated rewrite → five-dimension self-score → cold-reader recheck) with two pattern libraries (22 English + 17 Chinese patterns), section-by-section strategies for empirical papers, and hard protections that keep every number, coefficient, and citation intact.
Use when a research task needs reproducible Kaggle discovery, metadata inspection, bounded public-data downloads, competition or kernel discovery, model discovery, or an explicitly approved Kaggle write/delete operation through the official CLI.
基于 SOC 职业分类
正在显示 SKILL.md
| name | akshare-finance-data |
| description | Access Chinese and global financial data using the AkShare Python library |
| metadata | {"openclaw":{"emoji":"💹","category":"domains","subcategory":"finance","keywords":["akshare","financial data","chinese stocks","market data","economic indicators","quantitative finance"],"source":"https://github.com/akfamily/akshare"}} |
AkShare is an open-source Python library providing free access to Chinese and global financial market data. It aggregates data from 50+ sources including Sina Finance, East Money, Tushare, Yahoo Finance, and central bank websites. No API key required for most functions. Essential for financial research, quantitative analysis, and economic studies involving Chinese market data.
pip install akshare --upgrade
# Verify
python -c "import akshare as ak; print(ak.__version__)"
import akshare as ak
import pandas as pd
# Real-time quotes for all A-shares
df = ak.stock_zh_a_spot_em()
print(df.head())
# Columns: 代码, 名称, 最新价, 涨跌幅, 成交量, 成交额, ...
# Historical daily data for a specific stock
df = ak.stock_zh_a_hist(symbol="000001", period="daily",
start_date="20200101", end_date="20261231")
print(df.columns)
# 日期, 开盘, 收盘, 最高, 最低, 成交量, 成交额, 振幅, 涨跌幅, 换手率
# Minute-level data
df = ak.stock_zh_a_hist_min_em(symbol="000001", period="5",
start_date="2026-01-01 09:30:00",
end_date="2026-03-10 15:00:00")
# ETF list
df = ak.fund_etf_spot_em()
# Open-end fund NAV history
df = ak.fund_open_fund_info_em(symbol="000001", indicator="单位净值走势")
# Fund manager information
df = ak.fund_manager_em(symbol="000001")
# China government bond yields
df = ak.bond_china_yield(start_date="20200101", end_date="20261231")
# Corporate bond issuance
df = ak.bond_cb_jsl() # Convertible bonds from jisilu.cn
# GDP quarterly data
df = ak.macro_china_gdp()
# CPI monthly data
df = ak.macro_china_cpi()
# PMI (Purchasing Managers' Index)
df = ak.macro_china_pmi()
# Money supply (M0, M1, M2)
df = ak.macro_china_money_supply()
# US economic data
df = ak.macro_usa_gdp() # US GDP
df = ak.macro_usa_cpi() # US CPI
df = ak.macro_usa_unemployment_rate() # US unemployment
# CNY exchange rates
df = ak.currency_boc_sina(symbol="美元", start_date="20200101", end_date="20261231")
# All major currency pairs
df = ak.fx_spot_quote()
# Chinese commodity futures
df = ak.futures_zh_daily_sina(symbol="RB0") # Rebar futures
# Gold and silver prices
df = ak.futures_foreign_commodity_realtime(symbol="黄金")
import akshare as ak
import pandas as pd
def build_stock_panel(symbols: list, start: str, end: str) -> pd.DataFrame:
"""Build a panel dataset of stock returns and fundamentals."""
panels = []
for symbol in symbols:
# Price data
price = ak.stock_zh_a_hist(symbol=symbol, period="daily",
start_date=start, end_date=end)
price = price.rename(columns={"日期": "date", "收盘": "close",
"涨跌幅": "return", "成交额": "volume"})
price["symbol"] = symbol
price["date"] = pd.to_datetime(price["date"])
# Financial statements (annual)
try:
fin = ak.stock_financial_analysis_indicator(symbol=symbol)
fin = fin[["日期", "净资产收益率(%)", "资产负债率(%)"]].rename(
columns={"日期": "report_date", "净资产收益率(%)": "roe",
"资产负债率(%)": "leverage"})
except Exception:
fin = pd.DataFrame()
panels.append(price[["date", "symbol", "close", "return", "volume"]])
panel = pd.concat(panels, ignore_index=True)
panel = panel.set_index([, ]).sort_index()
panel
symbols = [, , , , ]
panel = build_stock_panel(symbols, , )
()
def event_study(symbol: str, event_date: str, window: int = 10):
"""Simple event study around a given date."""
# Get data with buffer
start = pd.to_datetime(event_date) - pd.Timedelta(days=window*3)
end = pd.to_datetime(event_date) + pd.Timedelta(days=window*3)
df = ak.stock_zh_a_hist(symbol=symbol, period="daily",
start_date=start.strftime("%Y%m%d"),
end_date=end.strftime("%Y%m%d"))
df["date"] = pd.to_datetime(df["日期"])
df["return"] = df["涨跌幅"].astype(float)
df = df.set_index("date").sort_index()
# Market return (CSI 300)
market = ak.stock_zh_index_daily(symbol="sh000300")
market["date"] = pd.to_datetime(market["date"])
market = market.set_index("date")
market["mkt_return"] = market["close"].pct_change() * 100
# Merge and compute abnormal returns
merged = df[["return"]].join(market[["mkt_return"]], how="inner")
merged["abnormal_return"] = merged["return"] - merged["mkt_return"]
# Event window
event_idx = merged.index.get_indexer([pd.to_datetime(event_date)], method="nearest")[0]
event_window = merged.iloc[event_idx-window:event_idx+window+1]
event_window["CAR"] = event_window["abnormal_return"].cumsum()
event_window[[, , , ]]
| Issue | Solution |
|---|---|
| Data source temporarily unavailable | AkShare aggregates from web sources; retry or use try/except |
| Inconsistent column names across functions | Always check df.columns before processing |
| Date format varies (string vs datetime) | Standardize: pd.to_datetime(df["日期"]) |
| Some functions require specific symbol format | A-shares: 6-digit code; indices: sh000001; HK: 00700 |
| Rate limiting from upstream sources | Add time.sleep(1) between batch requests |