delta-f/deltafstation/backtest
Claude Code and agent skill by delta-f/deltafstation
- community
Checking that the SKILL.md file is still in the repository.
Trigger this skill when users ask for backtesting, strategy testing, or running strategies. New strategies must be written via ensure_strategy (full source), then run_backtest_auto with symbol; default BOLLStrategy when no strategy_id.
Install
npx vskill@latest install delta-f/deltafstation/backtestSKILL.md
Backtest Skill
Context
Server injects this block for backtest-related user messages (keyword gating is outside this file).
Data
Market data uses yfinance; pass symbol as a yfinance ticker (e.g. 000001.SS, AAPL, GLD).
Dates
For relative ranges (e.g. last 2 years), use the Server date line in the system message as end_date, compute start_date, both YYYY-MM-DD.
Goal
- Input can be as little as a trading symbol (uses default
BOLLStrategyif it exists underdata/strategies). - For a new or custom strategy (e.g. RSI, KDJ): first call `ensure_strategy` with
class_nameand fullsource_code, then call `run_backtest_auto` withsymbolandstrategy_idequal to that class name. - If the user only asks for a quick demo and
BOLLStrategyis present, you may skipensure_strategyand only callrun_backtest_auto.
Tools
1. ensure_strategy (when you need new code)
- Required:
class_name,source_code(complete file). - Optional:
file_basename,overwrite. - Strategy must subclass
BaseStrategyfromdeltafq.strategy.baseand implementgenerate_signals(self, data: pd.DataFrame) -> pd.Serieswith values in{-1, 0, 1}(or as engine expects).
Indicator and signal policy
- Do not default to
deltafq.indicators.TechnicalIndicatorsordeltafq.strategy.SignalGenerator. That package does not guarantee every indicator you need; treat it as optional, not the standard path. - You (the model) implement whatever math is required—typically pandas / numpy on
data["Open"],High,Low,Close,Volume—and derive the signal series yourself. Same for any custom or niche factor.
Minimal shape (structure only — you fill in all indicator and signal logic):
For interface-only reference (uses deltafq helpers internally): `data/strategies/boll_strategy.py`.
2. run_backtest_auto
- Required:
symbol - Optional:
strategy_id(defaults toBOLLStrategy), dates, capital, fees,trade_preview_count - If
strategy_idcannot be loaded fromdata/strategies, the tool returns `strategy_not_found` — useensure_strategyfirst, then retry.
Tool behavior expectations
run_backtest_auto should:
- Ensure/refresh local CSV data for symbol.
- Resolve strategy: load
strategy_idor defaultBOLLStrategy; do not auto-generate placeholder files. - Return structured result JSON with
status,result_id,resolved,summary_metrics,trade_preview.
Response style
After tool returns:
- Summarize key metrics in concise Chinese (include
summary_metrics.total_tradesandsummary_metrics.avg_trades_per_daywhen present). - If
ensure_strategywas used, mention the saved class name and file. - If
strategy_not_foundwas returned, explain that the model must write the strategy withensure_strategyfirst.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbackend/core/agent/skills/backtest/SKILL.md
Popularity
- Repository stars
- 56
- Repository forks
- 30
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/delta-f/deltafstation/backtest)