Quant Buddy Market Data and Backtesting
pseudo-longinus/quant-buddy-skills
Queries A-share, Hong Kong and US stock quotes, valuation and financial data through the Quant Buddy API, and runs screening, factor calculation and strategy backtests.
Runs an AI investment research desk around the aihf hedge-fund CLI, with research cycles, backtests and iFinD data, under a risk gate and a rule against placing real trades.
SKILL.md written in Chinese; this summary is our English description.
$ npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install JingHao-Leon/dsh-alpha-desk alpha-desk --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/JingHao-Leon/dsh-alpha-desk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skill .claude/skills/alpha-desk && rm -rf skills-srcUse ~/.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/
Install the "alpha-desk" agent skill from https://github.com/JingHao-Leon/dsh-alpha-desk/tree/main/skill into .claude/skills/alpha-desk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "alpha-desk", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/JingHao-Leon/dsh-alpha-desk/tree/main/skillType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install JingHao-Leon/dsh-alpha-desk alpha-desk --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JingHao-Leon/dsh-alpha-desk.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skill .agents/skills/alpha-desk && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "alpha-desk" agent skill from https://github.com/JingHao-Leon/dsh-alpha-desk/tree/main/skill into .agents/skills/alpha-desk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "alpha-desk", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install JingHao-Leon/dsh-alpha-desk alpha-desk --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JingHao-Leon/dsh-alpha-desk.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skill .cursor/skills/alpha-desk && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "alpha-desk" agent skill from https://github.com/JingHao-Leon/dsh-alpha-desk/tree/main/skill into .cursor/skills/alpha-desk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "alpha-desk", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/JingHao-Leon/dsh-alpha-desk.git --path skill--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install JingHao-Leon/dsh-alpha-desk alpha-desk --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JingHao-Leon/dsh-alpha-desk.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skill .gemini/skills/alpha-desk && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "alpha-desk" agent skill from https://github.com/JingHao-Leon/dsh-alpha-desk/tree/main/skill into .gemini/skills/alpha-desk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "alpha-desk", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install JingHao-Leon/dsh-alpha-desk alpha-deskInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/JingHao-Leon/dsh-alpha-desk.git skills-src && mkdir -p .github/skills && cp -r skills-src/skill .github/skills/alpha-desk && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "alpha-desk" agent skill from https://github.com/JingHao-Leon/dsh-alpha-desk/tree/main/skill into .github/skills/alpha-desk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "alpha-desk", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install JingHao-Leon/dsh-alpha-desk alpha-desk --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JingHao-Leon/dsh-alpha-desk.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skill .opencode/skills/alpha-desk && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "alpha-desk" agent skill from https://github.com/JingHao-Leon/dsh-alpha-desk/tree/main/skill into .opencode/skills/alpha-desk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "alpha-desk", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
alpha-deskRuns an AI investment research desk around the aihf hedge-fund CLI, with research cycles, backtests and iFinD data, under a risk gate and a rule against placing real trades.
The skill orchestrates virattt/ai-hedge-fund, whose command is aihf, inside a dsh session, alongside iFinD data and local technical analysis skills for A-share and Hong Kong stocks. Compliance comes first: the output is research and education rather than investment advice, so every conclusion carries a disclaimer. Real trading is not executed, and broker order and fund transfer commands are refused even when the risk-gate plugin is absent. The agent also warns that aihf spends your LLM API quota.
Setup checks that aihf is installed through pipx or uv tool and that a financial data API key and one LLM key are present, stopping to ask instead of inventing data. A mandate YAML defines strategy, investor-style models (graham, buffett, munger, lynch, druckenmiller) plus a quantitative earnings-drift model, risk, capital and rebalance frequency, while tickers are passed at run time; three sample mandates are included.
One workflow runs a single research cycle and saves a JSON record for review, and the agent reads out each model's reasoning before the combined position change. Another runs a backtest and reports return against the benchmark, maximum drawdown, win rate and the rebalances that helped or hurt most, after estimating the LLM cost and noting that past results do not predict future returns.
Read from SKILL.md and the folder at commit 1fe6dec. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
python3pythonpipxuvFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
DEEPSEEK_API_KEYANTHROPIC_API_KEYFINANCIAL_DATASETS_API_KEYOPENAI_API_KEYGOOGLE_API_KEYXAI_API_KEYKIMI_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Alpha Desk Investment Research loads about 1.3k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 285 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
需要两类 key(导出在 shell 环境,或写入 `~/.hedge-fund/.env`):t-gw 访问同花顺 iFinD,凭证由脚本自行解析(plugins/ifind/.env 或本机 Kimi 桌面端配置),不需要用户提供任何账号,也不依赖环境变量注入。- 禁止:修改 `~/.hedge-fund/.env` 之外的任何凭证文件。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.
The full file from JingHao-Leon/dsh-alpha-desk at commit 1fe6dec, republished under its MIT licence (© JingHao-Leon). 285 words, ~1,315 tokens.
.claude/skills/alpha-desk/SKILL.md (or your agent's skills folder).把 dsh 会话变成一个投研交易台:底层引擎是 virattt/ai-hedge-fund(MIT,CLI 名 aihf),上层由 dsh 的 skill / hook / cron / memory 扩展点编排。
硬性合规线(每次回复都要遵守):
command -v aihf && aihf --help | head -5未安装则:pipx install aihf(或 uv tool install aihf)。
运行需要两类 key(导出在 shell 环境,或写入 ~/.hedge-fund/.env):
FINANCIAL_DATASETS_API_KEY — 行情与基本面数据(financialdatasets.ai,有免费档)DEEPSEEK_API_KEY(推荐,与 dsh 同栈)或 ANTHROPIC_API_KEY / OPENAI_API_KEY / GOOGLE_API_KEY / XAI_API_KEY / KIMI_API_KEYaihf 默认推理模型是 claude-sonnet-5(走 Anthropic)。用 DeepSeek 时,任选其一:
export HEDGE_FUND_LLM_MODEL=deepseek-v4-pro(全局默认)--model deepseek-v4-pro(单次覆盖)缺 key 时停下来让用户提供,不要伪造数据、不要编造回测结果。所有数字必须来自 aihf 的真实输出。
mandate 是一个 YAML,描述"交易台"本身——策略、投资大师模型、风控、资金、再平衡频率——不含股票代码;标的是运行时通过 --tickers 传入的。本仓库 mandates/ 目录自带三份:
| 文件 | 风格 | 再平衡 | 适用场景 |
|---|---|---|---|
deep-value-weekly.yaml | 格雷厄姆×2 + 巴菲特 + 芒格,70% 价值 + 30% 财报漂移量化 | weekly | 默认首选,稳健演示 |
fundamental-ls-market-neutral.yaml | 五位大师投票的多空市场中性 | monthly | 展示多空推理 |
inflections-daily.yaml | 德鲁肯米勒 + 林奇的宏观拐点 | daily | 压力测试风控 |
可用的 alpha 模型(models[].name):graham、buffett、munger、lynch、druckenmiller(LLM 驱动);pead(财报漂移,量化,不消耗 LLM 额度)。用户想自定义组合时,复制一份 mandate 改写即可。
aihf mandates/deep-value-weekly.yaml --tickers AAPL,MSFT,NVDA --out records/cycle-$(date +%F).json--out 落盘到 records/ 供复盘。strategies[].signals[](每个模型的 value ∈ [-1,1] 看多/看空强度 + reasoning 文字理由)、positions(成交后持股)、equity_before、skipped(数据缺失的票及原因)。aihf mandates/deep-value-weekly.yaml --tickers AAPL,MSFT,NVDA --backtest --start 2025-08-01 --out records/backtest-$(date +%F).json--start 到 --date(默认今天)按 mandate 的再平衡频率逐周期运行,输出含净值曲线与基准(mandate 里的 benchmark)对比指标。aihf 只覆盖美股。用户问 A股/港股时,改用 stock-technical-indicators 技能(如已安装)。两边结果可以同框对比(例:"同一套价值逻辑在美股和 A股各自选出什么"),但要讲清两边引擎和数据源不同,结论不可直接互换。
需要权威基本面/公告/股东/预测数据时(财务报表、业务分部、股东户数、业绩预告、智能选股),用本仓库 plugins/ifind/ifind_tool.py——它经 Kimi agent-gw 访问同花顺 iFinD,凭证由脚本自行解析(plugins/ifind/.env 或本机 Kimi 桌面端配置),不需要用户提供任何账号,也不依赖环境变量注入。
# 1. 先读 API 目录(9 个 API 的参数、ticker 格式、覆盖范围约定)
terminal/.venv/bin/python plugins/ifind/ifind_tool.py describe
# 2. 按目录的参数约定调用(必须用 terminal/.venv/bin/python,它有 agent-gw SDK)
terminal/.venv/bin/python plugins/ifind/ifind_tool.py call ifind_get_financial_statements \
--params-json '{"ticker": "600519.SH", ...}'规则:
600519.SH、港股 0001.HK、美股 AAPL.O)。用户要求"每天盘前/盘后自动跑"时,用 dsh 的定时任务能力注册调度,例如:
定时任务产出的记录同样落盘 records/。
每次给出可结算的方向性观点(某标的在某时间窗内看多/看空/横盘)时,除了写进记忆,还要入台账:
python3 tools/ledger.py new --symbol <代码> --market cn|hk|us --direction long|short|neutral \
--confidence <0~1> --horizon <YYYY-MM-DD> --rationale "<理由,必填>" \
--source "workflow:<来源>" [--invalidate-if "<失效条件>"]规则:
rationale 必填且要具体(依据什么数据/逻辑)——没有理由的观点不入台账。confidence 是自评置信度,事后会做校准统计(声明 0.7 的预测是否 70% 命中),不要拍脑袋给 0.9。new 会自动 git commit;尽快 push(公开时间戳才成立)。commit 后不可改写已入库的预测。python3 tools/ledger.py settle,然后 python3 tools/ledger.py report --write 更新 stats.md,并把结果 commit + push。records/ 里的实际信号与走势,逐条判定对错,并总结哪类假设胜率高。skipped 非空 → 告知用户哪些票数据缺失(常见于新股、退市、数据源未覆盖),不要静默忽略。ANTHROPIC_API_KEY not found 之类错误 → 说明用户没配 LLM key 或没指定模型;提示配 DEEPSEEK_API_KEY 并加 --model deepseek-v4-pro,不要擅自换成别的 provider。ls mandates/ 列出可用的,让用户选。--live 类参数。~/.hedge-fund/.env 之外的任何凭证文件。© JingHao-Leon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skill of JingHao-Leon/dsh-alpha-desk.
Open the folder on GitHubat commit 1fe6dec
Alpha Desk Investment Research 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Alpha Desk Investment Research this skillJingHao-Leon/dsh-alpha-desk | 181 | — | ~1.3k | Automated safety check: Notes | MIT | |
| Quant Buddy Market Data and Backtestingpseudo-longinus/quant-buddy-skills | 193 | — | ~11k | Automated safety check: Pass | MIT | |
| Stock Market Data MCP QueryYourdaylight/stock_datasource | 189 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Vibe-Trading Finance ToolkitHKUDS/Vibe-Trading | 35k | — | ~6.5k | Automated safety check: Pass | MIT | |
| Fundamental Factor ScreeningHKUDS/Vibe-Trading | 35k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Stock Analysisalirezarezvani/claude-skills | 28k | — | ~8.5k | Automated safety check: Pass | MIT |
pseudo-longinus/quant-buddy-skills
Queries A-share, Hong Kong and US stock quotes, valuation and financial data through the Quant Buddy API, and runs screening, factor calculation and strategy backtests.
Yourdaylight/stock_datasource
Queries historical A-share, Hong Kong stock, ETF and index data through an MCP server: daily K-lines, financial statements, market indicators and screening.
HKUDS/Vibe-Trading
Finance research toolkit with backtesting, factor analysis, a library of prebuilt alphas, options pricing and a Shadow Account loop that tests rules extracted from your trade journal.
HKUDS/Vibe-Trading
Builds value or growth stock screens from PE, PB, ROE and financial statement fields for backtests, using tushare data for A-shares and yfinance for Hong Kong and US stocks.
alirezarezvani/claude-skills
Produce a rigorous, sector-relative, multi-factor fundamental analysis of a publicly listed company — Indian (NSE/BSE) or US/global.
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.
Works with
Categories
Runs an AI investment research desk around the aihf hedge-fund CLI, with research cycles, backtests and iFinD data, under a risk gate and a rule against placing real trades. The skill orchestrates virattt/ai-hedge-fund, whose command is aihf, inside a dsh session, alongside iFinD data and local technical analysis skills for A-share and Hong Kong stocks. Compliance comes first: the output is research and education rather than investment advice, so every conclusion carries a disclaimer.
Alpha Desk Investment Research fits situations like: running an AI hedge-fund analysis cycle on a few US stock tickers; backtesting an investing strategy over a past period; comparing how investor-style models would view the same stocks; querying filings, shareholder counts or earnings forecasts through iFinD.
Run `npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a claude-code`. Or copy the skill folder (skill in JingHao-Leon/dsh-alpha-desk) into .claude/skills/alpha-desk in your project. Claude Code loads it when a task matches its description.
Run `npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a codex`. Or copy the skill folder (skill in JingHao-Leon/dsh-alpha-desk) into .agents/skills/alpha-desk in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JingHao-Leon/dsh-alpha-desk --skill alpha-desk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/alpha-desk, .gemini/skills/alpha-desk, .github/skills/alpha-desk and .opencode/skills/alpha-desk in your project.
Going by SKILL.md and its folder, Alpha Desk Investment Research needs the command-line tools its instructions call (python3, python, pipx and uv) and credentials named DEEPSEEK_API_KEY, ANTHROPIC_API_KEY, FINANCIAL_DATASETS_API_KEY and OPENAI_API_KEY. Our summary lists: The aihf CLI, installed with pipx or uv tool; A financial data API key and one LLM API key.
SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Alpha Desk Investment Research is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Alpha Desk Investment Research: Quant Buddy Market Data and Backtesting (pseudo-longinus/quant-buddy-skills, 193 stars), Stock Market Data MCP Query (Yourdaylight/stock_datasource, 189 stars), Vibe-Trading Finance Toolkit (HKUDS/Vibe-Trading, 35k stars) and Fundamental Factor Screening (HKUDS/Vibe-Trading, 35k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
JingHao-Leon (a GitHub user) maintains it in JingHao-Leon/dsh-alpha-desk, which has 181 GitHub stars. The repository was last updated on September 23, 2026.
Source: JingHao-Leon/dsh-alpha-desk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.