PluginBench
Skill
Pass
Audit score 90

quick-stats

marketcalls/vectorbt-backtesting-skills

Quickly backtest a symbol with EMA crossover strategy and print key stats inline—no file creation.

What is quick-stats?

Generates and executes a single-cell backtest for any stock symbol using a default EMA 10/20 crossover strategy. Fetches live data, applies Indian delivery fees, compares against NIFTY benchmark, and prints a compact results summary with equity curve. Use this to rapidly evaluate strategy performance on a stock without setup overhead.

  • Fetch OHLC data from OpenAlgo, DuckDB, or yfinance fallback
  • Apply EMA 10/20 crossover signals with ta.exrem() cleaning
  • Calculate returns, Sharpe/Sortino ratios, max drawdown, win rate, and profit factor
  • Include Indian delivery fees (0.111% + ₹20 per order)
  • Fetch NIFTY benchmark and compute alpha vs. strategy
  • Plot equity curve using Plotly dark template

How to install quick-stats

npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill quick-stats
Prerequisites
  • OpenAlgo API access (or DuckDB database, or yfinance as fallback)
  • Jupyter notebook or Python script environment
  • vectorbt and ta (OpenAlgo) libraries installed
Claude Code
Cursor
Windsurf
Cline

How to use quick-stats

  1. 1.Run the skill with a symbol: `/quick-stats RELIANCE` or `/quick-stats HDFCBANK NSE 1h`
  2. 2.Copy the generated code block into a Jupyter cell or Python script
  3. 3.Execute the cell—data is fetched, backtest runs, and stats print inline
  4. 4.Review the compact summary table and equity curve plot
  5. 5.Adjust symbol, exchange, or interval as needed and re-run

Use cases

Good for
  • Quickly test if a stock is suitable for EMA crossover trading before deeper analysis
  • Compare strategy performance across multiple symbols in minutes
  • Evaluate alpha generation relative to NIFTY index
  • Validate data quality and signal generation for a new symbol
  • Run inline in Jupyter notebooks without creating intermediate files
Who it's for
  • Retail traders evaluating quick strategy ideas
  • Quantitative analysts screening multiple symbols
  • Backtesting practitioners who want rapid prototyping
  • Indian equity traders familiar with NSE/delivery trading

quick-stats FAQ

What if I want to use TA-Lib instead of OpenAlgo ta?

Explicitly mention 'talib' or 'TA-Lib' in your request. The skill defaults to OpenAlgo ta for EMA signals.

Can I use my own data source?

Yes. Provide a DuckDB database path and the skill will fetch from it; otherwise it falls back to yfinance.

What fees are applied?

Indian delivery equity fees: 0.111% + ₹20 per order. These reflect typical NSE delivery trading costs.

How do I interpret the alpha value?

Alpha is the strategy's excess return over NIFTY. Positive alpha means the strategy outperformed the benchmark.

Does the skill create any files?

No. All output is printed to console or displayed in the notebook cell inline.

Full instructions (SKILL.md)

Source of truth, from marketcalls/vectorbt-backtesting-skills.


name: quick-stats description: Quickly fetch data and print key backtest stats for a symbol with a default EMA crossover strategy. No file creation needed - runs inline in a notebook cell or prints to console. argument-hint: "[symbol] [exchange] [interval]" allowed-tools: Read, Bash, Glob, Grep

Generate a quick inline backtest and print stats. Do NOT create a file - output code directly for the user to run or execute in a notebook.

Arguments

  • $0 = symbol (e.g., SBIN, RELIANCE). Default: SBIN
  • $1 = exchange. Default: NSE
  • $2 = interval. Default: D

Instructions

Generate a single code block the user can paste into a Jupyter cell or run as a script. The code must:

  1. Fetch data from OpenAlgo (or DuckDB if user provides a DB path, or yfinance as fallback)
  2. Use OpenAlgo ta for EMA 10/20 crossover by default (never VectorBT built-in); only use TA-Lib if the user explicitly says "talib"/"TA-Lib"
  3. Clean signals with ta.exrem() (always .fillna(False) before exrem)
  4. Use Indian delivery fees: fees=0.00111, fixed_fees=20
  5. Fetch NIFTY benchmark via OpenAlgo (symbol="NIFTY", exchange="NSE_INDEX")
  6. Print a compact results summary:
Symbol: SBIN | Exchange: NSE | Interval: D
Strategy: EMA 10/20 Crossover
Period: 2023-01-01 to 2026-02-27
Fees: Delivery Equity (0.111% + Rs 20/order)
-------------------------------------------
Total Return:    45.23%
Sharpe Ratio:    1.45
Sortino Ratio:   2.01
Max Drawdown:   -12.34%
Win Rate:        42.5%
Profit Factor:   1.67
Total Trades:    28
-------------------------------------------
Benchmark (NIFTY): 32.10%
Alpha:           +13.13%
  1. Explain key metrics in plain language for normal traders
  2. Show equity curve plot using Plotly (template="plotly_dark")

Example Usage

/quick-stats RELIANCE /quick-stats HDFCBANK NSE 1h