Skip to main content
skill CX Codex

optimize · marketcalls — Claude Code skill: what it does, how to install

Generates Python parameter grid search scripts for VectorBT strategies, plots Plotly heatmaps, and benchmarks returns against NIFTY.

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

What optimize does

The skill creates an optimization script named {symbol}_{strategy}_optimize.py inside backtesting/{strategy_name}/. The generated code retrieves market data using OpenAlgo API or an optional read-only DuckDB database. By default, it computes technical indicators using openalgo.ta and cleans entry signals with ta.exrem(), avoiding VectorBT built-in indicators unless TA-Lib is explicitly requested.

Optimization runs in a tqdm loop across strategy parameter grids. It tracks total return, Sharpe ratio, max drawdown, and trade count for each run. Alongside printing top-10 parameter sets, the script outputs two dark Plotly heatmaps, saves raw results to CSV, and generates a comparison table against the NIFTY index.

Because the generated code embeds Indian market delivery fees (fees=0.00111, fixed_fees=20) and specific lot sizes for NIFTY and BANKNIFTY futures, running backtests for other exchanges requires manually editing commission logic and lot configurations.

What it helps with

  • run parameter grid searches for VectorBT trading strategies
  • generate Plotly heatmaps for total return and Sharpe ratio
  • calculate trade performance with Indian equity delivery fees
  • compare custom strategy metrics against the NIFTY benchmark

Example prompts for the agent

  • /optimize ema-crossover RELIANCE NSE D
  • /optimize rsi SBIN
  • /optimize supertrend NIFTY NFO 5m

How to install optimize

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/optimize/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/optimize/

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

Questions about optimize

How to install optimize in Claude Code?

Run npx skills add marketcalls/vectorbt-backtesting-skills --skill optimize -a claude-code in your terminal.

What does the optimize skill do?

It writes a standalone Python script that performs grid optimization on VectorBT strategies, visualizes metrics via Plotly heatmaps, and saves results to CSV.

What data sources does the generated script support?

It connects to the OpenAlgo historical data API using .env credentials, or queries local market data files directly via DuckDB.

Similar skills

Everything for Finance and business →

optimize by other authors comes first.

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