Skip to main content
skill CX Codex

strategy-compare — Claude Code skill: side-by-side strategy stats

Runs several trading strategies or directions on one symbol and puts their metrics in a single table. Useful when you need to pick what to test next.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add marketcalls/vectorbt-backtesting-skills --skill strategy-compare -a claude-code
Open on GitHub

What strategy-compare does

The skill takes a symbol plus a list of strategies and writes a script to backtesting/strategy_comparison/ named {symbol}_strategy_comparison.py. Data is fetched once through OpenAlgo, every strategy runs on the same series, and the metrics land in one table: total return, Sharpe, Sortino, max drawdown, win rate, trade count and profit factor. A NIFTY benchmark is added via NSE_INDEX, and equity curves for all variants are overlaid in Plotly with template="plotly_dark". The comparison is saved to CSV.

Indicators come from OpenAlgo ta by default, not from VectorBT built-ins. Switching to TA-Lib happens only when you ask for it by name. For Supertrend and Donchian there is no choice: TA-Lib has no equivalent, so OpenAlgo ta handles them. Signals are cleaned with ta.exrem(), and .fillna(False) always runs before that call.

Pass a DuckDB path and the script reads straight from it with duckdb.connect(path, read_only=True). In that standalone mode openalgo.ta may not import, so an inline exrem() fallback is used instead. Fees are set for Indian equity delivery: fees=0.00111 and fixed_fees=20. With no strategies listed, the skill compares ema-crossover, rsi, donchian and supertrend; the token long-vs-short switches the run to longonly, shortonly and both for the first real strategy.

What it helps with

  • compare several strategies on one symbol in a single table
  • check how long-only and short-only behave on the same data
  • add a NIFTY benchmark to backtest results
  • compute metrics with Indian delivery fees applied
  • save the comparison to CSV and overlay equity curves

Example prompts for the agent

  • /strategy-compare RELIANCE ema-crossover rsi donchian
  • /strategy-compare SBIN long-vs-short ema-crossover
  • /strategy-compare NIFTY

How to install strategy-compare

1Skills CLI (Vercel)

npx skills add marketcalls/vectorbt-backtesting-skills --skill strategy-compare -a claude-code

2Manually: put the files in place

~/.claude/skills/strategy-compare/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/strategy-compare/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about strategy-compare

How do I install strategy-compare in Claude?

Run npx skills add marketcalls/vectorbt-backtesting-skills --skill strategy-compare -a claude-code. The skill file then sits at ~/.claude/skills/strategy-compare/SKILL.md.

What does strategy-compare do?

It runs multiple strategies or directions on the same symbol and lines their metrics up side by side. The table covers total return, Sharpe, Sortino, max drawdown, win rate, trade count and profit factor.

Which strategies are compared when none are given?

With only a symbol, the skill uses ema-crossover, rsi, donchian and supertrend. If long-vs-short appears among the arguments, it compares longonly, shortonly and both for the first real strategy.

Similar skills

Everything for Finance and business →

From the same set4

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor