Install
$ agentstack add skill-garroshub-backtesting-skill-backtesting-skill ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Backtesting Skill
Overview
Run ziplime backtests from deterministic templates and a constrained JSON schema. Map the user strategy into schema fields, run the script, and report results in one standard format.
Workflow
- Identify whether the user request maps to a supported template:
oversold_bounce_long_onlysma_crossover_long_onlytrend_dip_buy_long_only
- Build a schema JSON using
references/schema.md. - Run the backtest script:
python scripts/run_backtest_from_schema.py --schema
- If bundle is missing and user allows Yahoo ingestion, run with:
python scripts/run_backtest_from_schema.py --schema --ingest-if-missing
- If the user asks for OOS checks, enable
validation_splitin schema and report train/test results explicitly. - Return concise results using the global output standard (all templates):
- Core metrics (
total_return,sharpe,max_drawdown,alpha,beta,algo_volatility) - Extended performance metrics (
Performance,Win Days,Sharpe,Avg. Drawdown,Beta,Avg. Drawdown Days,Alpha,Volatility,Recovery Factor,Profit Factor,Calmar) - Trade summary (
trade_count,win_rate,avg_hold_days,avg_trade_return,expectancy_return,best_trade_return,worst_trade_return) - Capacity diagnostics (
avg_daily_turnover,annualized_turnover,participation_vs_adv_floor,participation_risk) - Risk attribution (
corr_with_benchmark, up/down beta, up/down capture, rolling risk endpoints) - Stability diagnostics for grid runs (
stability_diagnostics) - Final equity
- Chosen params or top grid-search params
- Practical tradability assessment (required, brief):
- Future-leakage check (signal timestamp vs execution semantics)
- Slippage and commission assumptions, and likely live impact direction
- Overfitting risk comment (grid size, parameter concentration, need for OOS/walk-forward)
- Capacity/liquidity note (turnover sensitivity and instrument suitability)
Global Output Standard (All Runs)
- Apply this output contract to every backtest result, regardless of template or symbol.
- Always include: core metrics, extended metrics, final equity, chosen params/top grid params.
- Always include a brief practical tradability assessment with all 4 checks:
- future leakage / execution semantics
- slippage + commission realism
- overfitting risk
- capacity/liquidity constraints
- Keep grid search defaults small and fast; only run exhaustive grids when explicitly requested.
Template Mapping Rules
- If user asks for waterfall/panic-reversal mean reversion and long-only, use
oversold_bounce_long_only. - If user asks for moving-average cross long-only, use
sma_crossover_long_only. - If user asks for trend-dip long-only with MA regime filter, use
trend_dip_buy_long_only. - If request cannot map safely to supported templates, ask for a template-constrained restatement.
Execution Notes
- Keep
max_leverage=1.0and no short orders. - Prefer existing bundles. Only ingest when explicitly requested or enabled.
- Use the same frequency for bundle load and
emission_rate. - Use out-of-sample checks by date split when user requests robustness.
- Default to quick, reasonable grid sizes; run exhaustive grids only when explicitly requested.
- Use
executionschema fields when the user asks to tune slippage, commission, or fill behavior. - Use
data.symbolsfor multi-symbol runs onsma_crossover_long_onlyandtrend_dip_buy_long_only. - Use
max_positions,rank_metric, andrebalance_rulefor lightweight portfolio construction controls. - Keep runtime
data.sourceonbundle; treat other data sources as reserved interface checks unless adapter support is added. - Use
live_datafields only as reserved interface validation (for exampleibkr), not for live order execution in this runner.
Commands
- Single run:
python scripts/run_backtest_from_schema.py --schema schema.json- Grid search:
- set
"grid_search": {"enabled": true, ...}in schema, then run the same command. - Optional ingestion path:
python scripts/run_backtest_from_schema.py --schema schema.json --ingest-if-missing- Validation-only (no ziplime runtime required):
python scripts/run_backtest_from_schema.py --schema schema.json --validate-only
Common Mistakes
- Bundle frequency mismatch (
5mbundle but daily emission or inverse). - Running intraday templates against daily-only bundles.
- Expecting Yahoo minute data to cover very long history windows.
- Adding unconstrained custom logic instead of using schema parameters.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: garroshub
- Source: garroshub/backtesting-skill
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.