Tushare Data
zillionare/zillionare
面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。
Academic backtesting framework for quantitative research. An agent skill from gauss314/skills.
$ npx skills add gauss314/skills --skill backtesting -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install gauss314/skills backtesting --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/gauss314/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/backtesting .claude/skills/backtesting && 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 "backtesting" agent skill from https://github.com/gauss314/skills/tree/main/skills/backtesting into .claude/skills/backtesting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "backtesting", 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/gauss314/skills/tree/main/skills/backtestingType 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 gauss314/skills --skill backtesting -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install gauss314/skills backtesting --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gauss314/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/backtesting .agents/skills/backtesting && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "backtesting" agent skill from https://github.com/gauss314/skills/tree/main/skills/backtesting into .agents/skills/backtesting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "backtesting", 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 gauss314/skills --skill backtesting -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install gauss314/skills backtesting --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gauss314/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/backtesting .cursor/skills/backtesting && 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 "backtesting" agent skill from https://github.com/gauss314/skills/tree/main/skills/backtesting into .cursor/skills/backtesting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "backtesting", 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/gauss314/skills.git --path skills/backtesting--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 gauss314/skills --skill backtesting -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install gauss314/skills backtesting --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gauss314/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/backtesting .gemini/skills/backtesting && 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 "backtesting" agent skill from https://github.com/gauss314/skills/tree/main/skills/backtesting into .gemini/skills/backtesting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "backtesting", 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 gauss314/skills backtestingInstalls 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 gauss314/skills --skill backtesting -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/gauss314/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/backtesting .github/skills/backtesting && 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 "backtesting" agent skill from https://github.com/gauss314/skills/tree/main/skills/backtesting into .github/skills/backtesting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "backtesting", 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 gauss314/skills --skill backtesting -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install gauss314/skills backtesting --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gauss314/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/backtesting .opencode/skills/backtesting && 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 "backtesting" agent skill from https://github.com/gauss314/skills/tree/main/skills/backtesting into .opencode/skills/backtesting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "backtesting", 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.
backtestingAcademic backtesting framework for quantitative research. An agent skill from gauss314/skills.
Backtesting is an agent skill from gauss314/skills. Academic backtesting framework for quantitative research. ~30 risk and performance ratios, 10 classes of indicators, event-driven engine with 6+ strategies, MPT optimizer, forward-looking simulation with Johnson SU + t-Copula, walk-forward CV, stress testing, fundamental analysis (Altman Z, Piotroski, DuPont). All flat Python + numpy.
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 35 other files, including scripts, reference files and assets (for example `assets/defaults.json`, `assets/sample_portfolios.json` and `assets/validation_cases.json`).
It sits in Business, Finance & HR, covering Trading and backtesting and Event-driven systems. It works with NumPy and Python. The repository describes itself as: Financial market data consumption skills for claude code and AI agents. The licence is MIT.
Read from SKILL.md and the folder at commit 5156f81. 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.
Ships 1 file in scripts/, which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Backtesting loads about 2.4k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 412 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 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); the scripts in this folder are not scanned.
The full file from gauss314/skills at commit 5156f81, republished under its MIT licence (© gauss314). 412 words, ~2,357 tokens.
.claude/skills/backtesting/SKILL.md (or your agent's skills folder). This skill also uses 33 other files; get the full folder from GitHub.This skill implements the full 5-stage backtesting methodology from the course material: Data → Research → Metrics → Parameterisation → Validation. It provides:
All scripts use only numpy, pandas, and scipy. No heavy dependencies.
Part of the Gauss314 Skills Repository.
skills/backtesting/
├── SKILL.md ← This file
├── references/
│ ├── BACKTESTING_THEORY.md ← Marco conceptual: GIGO, trilema, 5 etapas (ES)
│ ├── RATIOS.md ← Fórmulas, convención de retornos, advertencias (ES)
│ ├── FEATURES.md ← Taxonomía de 10 clases de indicadores con edges (ES)
│ ├── SIMULATIONS.md ← Pipeline Johnson SU + cópula (ES)
│ ├── VALIDATION.md ← Suite de validación de 4 niveles (ES)
│ └── OTHER_FEATURES.md ← Fundamental, Sentimiento, Exógenos (ES)
├── assets/
│ ├── sp500_returns.csv ← SPY benchmark daily returns (lin + log), 1980-today
│ ├── momentum_sma50_200_returns.csv ← SMA(50)/SMA(200) crossover strategy returns
│ ├── contrarian_bbands_returns.csv ← Bollinger Band contrarian strategy returns
│ ├── sample_portfolios.json ← Real investor portfolios (Buffett, Dalio, Ackman, 60/40)
│ ├── defaults.json ← Default parameters (VaR alpha, windows, etc.)
│ └── validation_cases.json ← 6 known cases for ratio validation
├── scripts/
│ ├── __init__.py
│ ├── ratios.py ← 30+ flat numpy functions for all risk/performance ratios
│ ├── indicators.py ← 10 classes of technical/statistical/fundamental indicators
│ ├── engine.py ← Event-driven BacktestEngine with 8 built-in strategies
│ ├── backtesting.py ← CLI: run, sweep, walkforward, montecarlo, optmpt, event, validate
│ ├── simulations.py ← CLI: marginal, copula, run, portfolio, scenarios
│ ├── forward.py ← CLI: project, risk, stress, summary
│ ├── distributions.py ← Fit + KS test for Normal/t/NCt/Laplace/JohnsonSU
│ ├── copulas.py ← t/Gaussian/Clayton/Gumbel/Frank copulas + sampling
│ ├── fundamental_ratios.py ← Income/balance/cashflow metrics, DuPont, Altman Z, Piotroski
│ └── validate.py ← 4-level validation: CLI modes, math consistency, edge cases, regression
└── tests/
└── test_ratios.py ← 18 pytest tests for core ratios| File | Role | Key Functions / Modes |
|---|---|---|
ratios.py | The core library. Every ratio is a flat function accepting 1-D arrays. | sharpe_ratio, max_drawdown, var_all, cvar_all, kelly_fraction, payoff_ratio, profit_factor, rachev_a/b/c, common_sense_ratio, ruin_curve, compute_all |
indicators.py | 10 classes of indicators, covering all types from the course taxonomy. | rsi, adx, bbands, macd, atr, cross_indicator, range_bound, zscore_norm, poisson_rate, binomial_ratio, fourier_terms, best_fit_dist |
engine.py | BacktestEngine class and 8 strategy functions. | BacktestEngine, strategy_sma_crossover, strategy_rsi_cross, strategy_bbands_contrarian, strategy_growth_momentum_combo |
backtesting.py | Main CLI. Run full backtests, walks, sweeps, optimization. | run, sweep, walkforward, montecarlo, optmpt, event, validate, bench |
simulations.py | Forward-looking simulation with Johnson SU + copula. | marginal, copula, run, portfolio, scenarios |
forward.py | Risk projection and stress testing. | project, risk, stress, summary |
distributions.py | Distribution fitting and comparison. | fit, best_fit, compare_distributions, sample |
copulas.py | Copula fitting and sampling. | fit_t, fit_gaussian, sample_t, sample_gaussian, validate_copula |
fundamental_ratios.py | Fundamental analysis ratios. | income_metrics, valuation_metrics, dupont, altman_z, piotroski |
validate.py | 4-level integration testing suite. | 33 checks across CLI, math, edge cases, regression |
# Compute all 30+ ratios on a CSV of prices
py scripts/backtesting.py run --prices assets/sp500_returns.csv
# Compute with benchmark comparison
py scripts/backtesting.py run --prices assets/momentum_sma50_200_returns.csv --benchmark assets/sp500_returns.csv# Full validation (33 checks across 4 levels)
py scripts/validate.py
# Single level
py scripts/validate.py --nivel 1Validates CLI modes, mathematical consistency of all ratios, edge case resilience, and post-fix regression. See references/VALIDATION.md for the detailed breakdown of all 33 checks.
# Load a CSV with OHLCV data and run SMA crossover
py scripts/backtesting.py event --data my_stock.csv --strategy sma_crossover --fast 50 --slow 200 --commission 0.001# 2D sweep over fast/slow MA windows
py scripts/backtesting.py sweep --prices assets/sp500_returns.csv --p1-min 10 --p1-max 100 --p1-step 10
# 2D over 2 parameters
py scripts/backtesting.py sweep --prices assets/sp500_returns.csv --p1-min 10 --p1-max 50 --p1-step 5 --p2-min 25 --p2-max 200 --p2-step 25py scripts/backtesting.py walkforward --prices assets/sp500_returns.csv --splits 5 --gap 21py scripts/backtesting.py optmpt --assets assets/sp500_returns.csv --iterations 5000py scripts/simulations.py marginal --returns assets/sp500_returns.csv
py scripts/simulations.py copula --returns assets/sp500_returns.csv --df 4
py scripts/forward.py project --returns assets/sp500_returns.csv --horizon 252 --paths 10000 --drift 0.08
py scripts/forward.py risk --returns assets/sp500_returns.csv --horizon 252 --paths 10000py scripts/simulations.py portfolio --name warren_buffett
py scripts/simulations.py scenarios --name warren_buffett --cagr -0.3,-0.15,0,0.2,0.35,0.5from scripts.ratios import *
prices = np.array([100, 105, 102, 110, 108, 115])
r = linear_returns(prices) # [0.05, -0.0286, 0.0784, -0.0182, 0.0648]
lr = log_returns(prices) # [0.0488, -0.0290, 0.0755, -0.0183, 0.0628]
sharpe_ratio(r) # 0.847
max_drawdown(prices) # -0.0370
kelly_fraction(lr) # 0.0793
var_all(r, alpha=0.05) # {'empirical': ..., 'normal': ..., 'johnsonsu': ...}
profit_factor(lr) # 2.314
payoff_ratio(lr) # 1.578
rachev_c(lr, alpha=0.05) # 1.234
common_sense_ratio(lr) # 2.856from scripts.engine import BacktestEngine
eng = BacktestEngine(initial_capital=1.0, commission=0.001, slippage=0.0005)
eng.load_data(df_ohlcv)
result = eng.run(strategy='sma_crossover', strategy_params={'fast': 50, 'slow': 200})
print(result['metrics']['sharpe_ratio']) # 0.847
print(result['trades'])
print(result['metrics'])| Library | Required | Used for |
|---|---|---|
numpy | ✅ | Vectorised computation, arrays, cumprod |
pandas | ✅ | CSV I/O, rolling operations, DataFrames |
scipy.stats | ✅ | Distribution fitting, KS test, copulas |
statsmodels | Optional | STL decomposition in indicators.py (Class 5) |
To run the full validation suite (py scripts/validate.py) you also need pytest for the Level 4 regression check.
No arch, quantlib, sklearn required.
references/BACKTESTING_THEORY.md — marco conceptual del backtesting (ES)references/RATIOS.md — fórmulas, convención de retornos, advertencias (ES)references/FEATURES.md — taxonomía de 10 clases de indicadores con edges (ES)references/SIMULATIONS.md — pipeline de Johnson SU + cópula (ES)references/VALIDATION.md — suite de validación de 4 niveles (ES)references/OTHER_FEATURES.md — fundamental, sentimiento, exógenos (ES)© gauss314, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 33 other files (scripts, references, assets) in skills/backtesting of gauss314/skills.
Open the folder on GitHubat commit 5156f81
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Backtesting this skillgauss314/skills | 245 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Tushare Datazillionare/zillionare | 318 | 2 repos | ~2.3k | Automated safety check: Pass | None | |
| Quant Blog Writingzillionare/zillionare | 318 | — | ~895 | Automated safety check: Pass | None | |
| Elliott Wave Signal EngineHKUDS/Vibe-Trading | 35k | — | ~482 | Automated safety check: Pass | MIT | |
| Candlestick Pattern SignalsHKUDS/Vibe-Trading | 35k | — | ~468 | Automated safety check: Pass | MIT | |
| Event-Driven Sentiment SignalsHKUDS/Vibe-Trading | 35k | — | ~2.1k | Automated safety check: Pass | MIT |
zillionare/zillionare
面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。
zillionare/zillionare
撰写文笔精炼、富有深度的量化交易博文,论点清晰、证据确凿、叙事层次更加丰富。适用于量化交易博文、因子研究、回测复盘、数据源排查、市场微观结构、策略原理、风险控制、职业观察、量化人物故事等选题。文章将聚焦具体角度,提供详实的大纲、证据规划及成稿,力求内容兼具思想深度与诚实性,而非单纯口号式宣传;同时,通过人物经历、引言、贡献及行业背景的融入,让文章更具可读性和吸引力。
HKUDS/Vibe-Trading
Detects Elliott Wave structures in price data with a Zigzag swing finder and Fibonacci checks, and turns completed waves into long, short or flat signals.
HKUDS/Vibe-Trading
Detects 15 classic candlestick patterns with vectorized pandas code and combines bullish and bearish scores into a long, short or flat trading signal.
HKUDS/Vibe-Trading
Scores news, announcements and macro events with the LLM, stores them in an event CSV and blends the decaying event signal with technical signals in signal_engine.py.
HKUDS/Vibe-Trading
Generates trading signals from the Ichimoku five-line system using Tenkan and Kijun crossovers, cloud position and cloud direction, implemented in pandas.
gauss314/skills
Datos de Google Finance via batchexecute (API RPC interna sin auth ni API key).
gauss314/skills
History of Market (historyofmarket.com) — API publica con 88 datasets historicos de indices US desde 1871.
gauss314/skills
Datos macro y sociales de Argentina via la API oficial Series de Tiempo del Estado (apis.datos.gob.ar/series).
gauss314/skills
Morningstar Screener via API JSON publica: descarga masiva de 53 universes (102K+ listings, 39 paises, NYSE/Nasdaq/BCBA/etc) con 33 campos (precio, market cap, ratios, retornos…
gauss314/skills
Pricing completo de opciones europeas y americanas. An agent skill from gauss314/skills.
gauss314/skills
Construcción y optimización cuantitativa de portafolios: Markowitz (scipy.optimize + Monte Carlo), Black-Litterman (prior CAPM, views absolutas/relativas, posterior bayesiano), HRP/HERC/NCO…
Categories
Academic backtesting framework for quantitative research. An agent skill from gauss314/skills. Backtesting is an agent skill from gauss314/skills. Academic backtesting framework for quantitative research.
Backtesting fits situations like: tasks that involve Trading and backtesting; tasks that involve Event-driven systems.
Run `npx skills add gauss314/skills --skill backtesting -a claude-code`. Or copy the skill folder (skills/backtesting in gauss314/skills) into .claude/skills/backtesting in your project. Claude Code loads it when a task matches its description.
Run `npx skills add gauss314/skills --skill backtesting -a codex`. Or copy the skill folder (skills/backtesting in gauss314/skills) into .agents/skills/backtesting 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 gauss314/skills --skill backtesting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/backtesting, .gemini/skills/backtesting, .github/skills/backtesting and .opencode/skills/backtesting in your project.
SKILL.md names no scripts, command-line tools or credentials: Backtesting is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Backtesting is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 10k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Backtesting: Tushare Data (zillionare/zillionare, 318 stars), Quant Blog Writing (zillionare/zillionare, 318 stars), Elliott Wave Signal Engine (HKUDS/Vibe-Trading, 35k stars) and Candlestick Pattern Signals (HKUDS/Vibe-Trading, 35k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
gauss314 (a GitHub user) maintains it in gauss314/skills, which has 245 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on June 14, 2026.
Source: gauss314/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.