optimize

Installation
Summary

Backtesting strategy parameter optimization with VectorBT, generating performance heatmaps and benchmark comparisons.

  • Accepts strategy name, symbol, exchange, and interval; creates optimization script in backtesting/{strategy}/ directory
  • Loads market data from OpenAlgo via .env configuration or directly from DuckDB; uses TA-Lib for all indicators with OpenAlgo ta for specialty indicators like Supertrend and Donchian
  • Tests parameter combinations across sensible ranges (e.g., EMA 5-50 for fast, 10-60 for slow), tracking total return, Sharpe ratio, max drawdown, and trade count per combo
  • Generates Plotly heatmaps for total return and Sharpe ratio; fetches NIFTY benchmark and prints strategy vs benchmark comparison table with plain-language results explanation
  • Applies Indian delivery fees (0.00111 + 20 fixed) and futures lot-size awareness (NIFTY 65, BANKNIFTY 30); saves results to CSV
SKILL.md

Create a parameter optimization script for a VectorBT strategy.

Arguments

Parse $ARGUMENTS as: strategy symbol exchange interval

  • $0 = strategy name (e.g., ema-crossover, rsi, donchian). Default: ema-crossover
  • $1 = symbol (e.g., SBIN, RELIANCE, NIFTY). Default: SBIN
  • $2 = exchange (e.g., NSE, NFO). Default: NSE
  • $3 = interval (e.g., D, 1h, 5m). Default: D

If no arguments, ask the user which strategy to optimize.

Instructions

Related skills
Installs
912
GitHub Stars
132
First Seen
Feb 25, 2026