strategy-compare

Generates Python scripts comparing multiple trading strategies side-by-side on the same symbol.

Updated Aug 15, 2026
One-click install
npx skills add https://github.com/qqlcx5/skills-hub --skill strategy-compare-qqlcx5
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategy-compare
Source: https://github.com/qqlcx5/skills-hub/tree/main/skills/strategy-compare
Command: npx skills add https://github.com/qqlcx5/skills-hub --skill strategy-compare-qqlcx5

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires duckdb, plotly, openalgo.

What problem does it solve? Evaluating which trading strategy performs best on a given symbol normally requires writing repetitive backtest code for each strategy and manually assembling the results. This Skill generates a single comparison script that runs multiple strategies on identical data and produces a unified metrics table. ## Core Features & Use Cases - Side-by-Side Backtesting: Runs strategies like ema-crossover, rsi, donchian, and supertrend on the same symbol with identical data and Indian delivery fee settings. - Long vs Short Analysis: Compares long-only, short-only, and combined variants of a strategy via the long-vs-short mode. - Benchmark Comparison: Includes the NIFTY index as a benchmark and prints Total Return, Sharpe, Sortino, Max Drawdown, Win Rate, Trades, and Profit Factor. - Use Case: Run /strategy-compare RELIANCE ema-crossover rsi donchian to get a script that fetches data via OpenAlgo or DuckDB, backtests all three strategies, plots overlaid equity curves with Plotly, and saves results to CSV. ## Quick Start Ask the agent to compare the ema-crossover, rsi, and donchian strategies on RELIANCE and show which one performs best against the NIFTY benchmark.

Frequently Asked Questions about strategy-compare

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compare multiple trading strategies on the same stock?

Run the comparison with a symbol followed by strategy names, such as RELIANCE ema-crossover rsi donchian. The generated script fetches data once, backtests each strategy with identical settings, and prints a side-by-side metrics table including Total Return, Sharpe, and Max Drawdown.

How to backtest long vs short versions of a trading strategy?

Include long-vs-short in the strategy list, for example SBIN long-vs-short ema-crossover. The script then runs long-only, short-only, and combined variants of the first real strategy so you can see which direction performs better.

Can I use DuckDB data instead of OpenAlgo for backtesting?

Yes, provide a DuckDB path and the script loads data directly via duckdb.connect in read-only mode. If openalgo.ta is not importable in standalone DuckDB setups, an inline exrem fallback is used for signal cleaning.

What fees does the backtest use for Indian stocks?

The script applies Indian delivery equity fees of 0.00111 plus a fixed fee of 20 per trade. These settings are applied consistently across all strategies so the comparison remains fair.

Why use OpenAlgo ta instead of TA-Lib for indicators?

OpenAlgo ta is the default for all indicators because specialty indicators like Supertrend and Donchian have no TA-Lib equivalent. TA-Lib is only used when the user explicitly requests it.